|
158 | 158 | are followed by a space before the opening parenthesis.
|
159 | 159 | PEAR standard stipulates this to distinguish it from function calls.
|
160 | 160 | -->
|
161 |
| - <test name="spaceAfterControlStmt"/> |
| 161 | + <test name="spaceAfterControlStatement"/> |
162 | 162 |
|
163 | 163 | <!-- Check that there is no space after a function name in a function call -->
|
164 | 164 | <test name="noSpaceAfterFunctionName" level="info"></test>
|
165 | 165 |
|
166 | 166 | <!-- Check for the (required) presence of a white space after some tokens : "," "}" "-" -->
|
167 |
| - <test name="checkWhiteSpaceAfter"/> |
| 167 | + <test name="whiteSpaceAfter"/> |
168 | 168 |
|
169 | 169 | <!-- Check for the (required) presence of a white space before some tokens : "{" "-" -->
|
170 |
| - <test name="checkWhiteSpaceBefore"> |
| 170 | + <test name="whiteSpaceBefore"> |
171 | 171 | <exception value=":"/> <!-- Because of the switch/case -->
|
172 | 172 | </test>
|
173 | 173 |
|
|
184 | 184 | <!-- Check that the lenght of the line doesn't pass the max value -->
|
185 | 185 | <test name="lineLength" level="info">
|
186 | 186 | <property name="maxLineLength" value="160"/>
|
187 |
| - <property name="checkHTMLLines" value="false"/> |
| 187 | + <property name="htmlLines" value="false"/> |
188 | 188 | </test>
|
189 | 189 |
|
190 | 190 | <!-- Checks that the lenght (in lines) of a function doesn't pass the max value -->
|
|
212 | 212 |
|
213 | 213 | <!-- Check for prohibited functions -->
|
214 | 214 | <!-- @see http://www.php.net/manual/en/indexes.php -->
|
215 |
| - <test name="checkProhibitedFunctions"> |
| 215 | + <test name="prohibitedFunctions"> |
216 | 216 | <item value="echo"/>
|
217 | 217 | <item value="system"/>
|
218 | 218 | <item value="print_r"/>
|
|
234 | 234 |
|
235 | 235 | <!-- Check for prohibited tokens -->
|
236 | 236 | <!-- @see http://www.php.net/manual/en/tokens.php -->
|
237 |
| - <test name="checkProhibitedTokens"> |
| 237 | + <test name="prohibitedTokens"> |
238 | 238 | <item value="T_BAD_CHARACTER"/>
|
239 | 239 | <item value="T_DECLARE"/>
|
240 | 240 | <item value="T_ENDDECLARE"/>
|
|
262 | 262 | <test name="defaultValuesOrder"/>
|
263 | 263 |
|
264 | 264 | <!-- Check for silenced errors before function calls (@function) -->
|
265 |
| - <test name="checkSilencedError"> |
| 265 | + <test name="silencedError"> |
266 | 266 | <exception value="rename"/> <!-- Exceptions to this rule -->
|
267 | 267 | <exception value="mkdir"/>
|
268 | 268 | <exception value="chmod"/>
|
|
274 | 274 | <!-- Avoid passing parameters by reference -->
|
275 | 275 | <test name="avoidPassingReferences"/>
|
276 | 276 |
|
277 |
| - <test name="showTODOs"/> |
| 277 | + <test name="showTodo"/> |
278 | 278 |
|
279 | 279 | <!-- Use boolean operators (&&) instead of logical operators (AND) -->
|
280 | 280 | <test name="useBooleanOperators"/>
|
281 | 281 |
|
282 | 282 | <!-- Check empty block like if ($a) {} -->
|
283 |
| - <test name="checkEmptyBlock"> |
| 283 | + <test name="emptyBlock"> |
284 | 284 | <!-- <exception value="catch"/> -->
|
285 | 285 | </test>
|
286 | 286 |
|
287 | 287 | <!-- Check empty statement ( ;; ) -->
|
288 |
| - <test name="checkEmptyStatement"/> |
| 288 | + <test name="emptyStatement"/> |
289 | 289 |
|
290 | 290 | <!-- Check for the presence of heredoc -->
|
291 |
| - <test name="checkHeredoc"/> |
| 291 | + <test name="heredoc"/> |
292 | 292 |
|
293 | 293 | <!-- Check for braces around code blocs (if, else, elseif, do, while, for, foreach) -->
|
294 | 294 | <test name="needBraces"/>
|
|
306 | 306 | Avoid using unary operators (++) inside a control statement
|
307 | 307 | With the exception of for iterators, all variable incrementation or decrementation should occur in their own toplevel statement to increase readability.
|
308 | 308 | -->
|
309 |
| - <test name="checkUnaryOperator"> |
| 309 | + <test name="unaryOperator"> |
310 | 310 | <exception value="for"/>
|
311 | 311 | </test>
|
312 | 312 |
|
313 | 313 | <!--
|
314 | 314 | With inner assignments it is difficult to see all places where a variable is set.
|
315 | 315 | With the exception of for iterators, all assignments should occur in their own toplevel statement to increase readability.
|
316 | 316 | -->
|
317 |
| - <test name="checkInnerAssignment"> |
| 317 | + <test name="innerAssignment"> |
318 | 318 | <exception value="for"/>
|
319 | 319 | </test>
|
320 | 320 |
|
321 | 321 | <!-- Only one class declaration per PHP file -->
|
322 | 322 | <test name="oneClassPerFile"/>
|
323 | 323 |
|
324 | 324 | <!-- Detect empty files -->
|
325 |
| - <test name="checkEmptyFile"/> |
| 325 | + <test name="emptyFile"/> |
326 | 326 |
|
327 | 327 | <!-- **************** -->
|
328 | 328 | <!-- Unused -->
|
329 | 329 | <!-- **************** -->
|
330 | 330 |
|
331 | 331 | <!-- Detect unused private functions (detecting unused public ones is more difficult) -->
|
332 |
| - <test name="checkUnusedPrivateFunctions"/> |
| 332 | + <test name="unusedPrivateFunctions"/> |
333 | 333 |
|
334 | 334 | <!-- Detect unused variables -->
|
335 |
| - <test name="checkUnusedVariables"/> |
| 335 | + <test name="unusedVariables"/> |
336 | 336 |
|
337 | 337 | <!-- Detect unused function parameters -->
|
338 |
| - <test name="checkUnusedFunctionParameters"/> |
| 338 | + <test name="unusedFunctionParameters"/> |
339 | 339 |
|
340 | 340 | <!-- Detect unused code (after return or throw) -->
|
341 |
| - <test name="checkUnusedCode"/> |
| 341 | + <test name="unusedCode"/> |
342 | 342 |
|
343 | 343 | <!-- ******************* -->
|
344 | 344 | <!-- Optimisation -->
|
|
353 | 353 | <!-- ******************* -->
|
354 | 354 |
|
355 | 355 | <!-- Replace deprecated methods -->
|
356 |
| - <test name="checkDeprecation"> |
| 356 | + <test name="deprecation"> |
357 | 357 | <deprecated old="call_user_method" new="call_user_func" version="4.1"/>
|
358 | 358 | <deprecated old="call_user_method_array" new="call_user_func_array" version="4.1"/>
|
359 | 359 | <deprecated old="define_syslog_variables" new="none" version="5.4"/>
|
|
404 | 404 | <!-- ******************* -->
|
405 | 405 |
|
406 | 406 | <!-- Replace deprecated methods -->
|
407 |
| - <test name="checkAliases"> |
| 407 | + <test name="aliases"> |
408 | 408 | <alias old="chop" new="rtrim()"/>
|
409 | 409 | <alias old="close" new="closedir()"/>
|
410 | 410 | <alias old="die" new="exit()"/>
|
|
432 | 432 | <!-- ********************************************* -->
|
433 | 433 |
|
434 | 434 | <!-- Replace methods -->
|
435 |
| - <test name="checkReplacements"> |
| 435 | + <test name="replacements"> |
436 | 436 | <replacement old="$_POST" new="$this->input->post()"/>
|
437 | 437 | <replacement old="$_GET" new="$this->input->get()"/>
|
438 | 438 | <!-- <replacement old="$_SERVER" new="$this->input->server()"/> -->
|
|
0 commit comments