Changeset 48

Show
Ignore:
Timestamp:
03/15/06 20:05:10 (3 years ago)
Author:
knut
Message:

Added complete list of available warnings in ZendCodeAnalyzer

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/classes/phing/tasks/ext/ZendCodeAnalyzerTask.php

    r47 r48  
    66 *  
    77 * Available warnings: 
    8  *  
    9  * zend-error                 var: Deprecated. Please use the public/private/protected modifiers 
    10  * var-arg-unused             Function argument 'parser' is never used. 
    11  * var-once                   Variable 'comment' encountered only once. May be a typo? 
    12  * var-value-unused           Value assigned to variable 'args' is never used 
    13  * return-empty-val           Function 'set_object' has both empty return and return with value. 
    14  * if-if-else                 In if-if-else construction else relates to the closest if. Use braces to make the code clearer. 
    15  * bool-assign                Assignment seen where boolean expression is expected. Did you mean '==' instead of '='? 
    16  * var-use-before-def         Variable 'matches' is used before it was assigned. 
    17  * empty-cond                 Condition without a body 
    18  * var-ref-notmodified        Function parameter 'parser' is passed by reference but never modified. Consider passing by value. 
    19  * include-var                include/require with user-accessible variable can be dangerous. Consider using constant instead. 
    20  * expr-unused                Expression result is never used 
    21  * bad-escape                 Bad escape sequence: \/, did you mean \\/? 
    22  * var-use-before-def-global  Global variable 'argv' is used without being assigned. You are probably relying on register_globals feature of PHP. Note that this feature is off by default. 
    23  * call-time-ref              Call-time reference is deprecated. Define function as accepting parameter by reference instead. 
    24  * return-noref               Function 'loadlintschema' returns reference but the value is not assigned by reference. Maybe you meant '=&' instead of '='? 
    25  * unreach-code               Unreachable code in function 'loginUser'. 
    26  * var-global-unused          Global variable 'fixErrors' is defined but never used. 
    27  * break-depth                Break/continue with depth more than current nesting level.  
    28  *  
     8 * <b>zend-error</b> - %s(line %d): %s 
     9 * <b>oneline-comment</b> - One-line comment ends with ?> tag. 
     10 * <b>bool-assign</b> - Assignment seen where boolean expression is expected. Did you mean '==' instead of '='? 
     11 * <b>bool-print</b> - Print statement used when boolean expression is expected. 
     12 * <b>bool-array</b> - Array used when boolean expression is expected. 
     13 * <b>bool-object</b> - Object used when boolean expression is expected. 
     14 * <b>call-time-ref</b> - Call-time reference is deprecated. Define function as accepting parameter by reference instead. 
     15 * <b>if-if-else</b> - In if-if-else construction else relates to the closest if. Use braces to make the code clearer. 
     16 * <b>define-params</b> - define() requires two or three parameters. 
     17 * <b>define-const</b> - First parameter for define() should be string. Maybe you forgot quotes? 
     18 * <b>break-var</b> - Break/continue with variable is dangerous - break level can be out of scope. 
     19 * <b>break-depth</b> - Break/continue with depth more than current nesting level. 
     20 * <b>var-once</b> - Variable '%s' encountered only once. May be a typo? 
     21 * <b>var-arg-unused</b> - Function argument '%s' is never used. 
     22 * <b>var-global-unused</b> - Global variable '%s' is defined but never used. 
     23 * <b>var-use-before-def</b> - Variable '%s' is used before it was assigned. 
     24 * <b>var-use-before-def-global</b> - Global variable '%s' is used without being assigned. You are probably relying on register_globals feature of PHP. Note that this feature is off by default. 
     25 * <b>var-no-global</b> - PHP global variable '%s' is used as local. Maybe you wanted to define '%s' as global? 
     26 * <b>var-value-unused</b> - Value assigned to variable '%s' is never used 
     27 * <b>var-ref-notmodified</b> - Function parameter '%s' is passed by reference but never modified. Consider passing by value. 
     28 * <b>return-empty-val</b> - Function '%s' has both empty return and return with value. 
     29 * <b>return-empty-used</b> - Function '%s' has empty return but return value is used. 
     30 * <b>return-noref</b> - Function '%s' returns reference but the value is not assigned by reference. Maybe you meant '=&' instead of '='? 
     31 * <b>return-end-used</b> - Control reaches the end of function '%s'(file %s, line %d) but return value is used. 
     32 * <b>sprintf-miss-args</b> - Missing arguments for sprintf: format reqires %d arguments but %d are supplied. 
     33 * <b>sprintf-extra-args</b> - Extra arguments for sprintf: format reqires %d arguments but %d are supplied. 
     34 * <b>unreach-code</b> - Unreachable code in function '%s'. 
     35 * <b>include-var</b> - include/require with user-accessible variable can be dangerous. Consider using constant instead. 
     36 * <b>non-object</b> - Variable '%s' used as object, but has different type. 
     37 * <b>bad-escape</b> - Bad escape sequence: \%c, did you mean \\%c? 
     38 * <b>empty-cond</b> - Condition without a body 
     39 * <b>expr-unused</b> - Expression result is never used 
     40 * 
    2941 * @author   Knut Urdalen <knut.urdalen@telio.no> 
    3042 * @package  phing.tasks.ext