phing-tasks-ext

# Class: ZendCodeAnalyzerTask Source Location: /tasks/ext/ZendCodeAnalyzerTask.php
### Class Overview
    ProjectComponent
       |
       --Task
          |
          --ZendCodeAnalyzerTask
ZendCodeAnalyzerTask analyze PHP source code using the ZendCodeAnalyzer included in Zend Studio 5.1 #### Author(s): Knut Urdalen <knut.urdalen@gmail.com> #### Version: $Id: ZendCodeAnalyzerTask.php 539 2009-08-26 08:36:05Z mrook $ #### Copyright: � 2001,2002 THYRELL. All rights reserved | ### Variables $analyzerPath $counter $disable $enable $file $filesets | ### Methods analyze createFileSet main setAnalyzerPath setDisable setEnable setFile setHaltonwarning
### Inherited Variables #### Class: Task Task::$description Task::$location Task::$target Task::$taskName Task::$taskType Task::$wrapper #### Class: ProjectComponent ProjectComponent::$project | ### Inherited Methods #### Class: Task Task::getDescription() Returns the textual description of the task Task::getLocation() Returns the location within the buildfile this task occurs. Used by BuildException to give detailed error messages. Task::getOwningTarget() Returns the owning target of this task. Task::getRegisterSlot() Returns a name Task::getRuntimeConfigurableWrapper() Returns the wrapper object for runtime configuration Task::getTaskName() Returns the name of task, used only for log messages Task::getTaskType() Returns the name of the task under which it was invoked, usually the XML tagname Task::init() Called by the parser to let the task initialize properly. Task::log() Provides a project level log event to the task. Task::main() Called by the project to let the task do it's work. This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running <em>phing target1 target2</em> will run all tasks in target3 twice. Task::maybeConfigure() Configure this task if it hasn't been done already. Task::perform() Perfrom this task Task::setDescription() Sets a textual description of the task Task::setLocation() Sets the location within the buildfile this task occurs. Called by the parser to set location information. Task::setOwningTarget() Sets the owning target this task belongs to. Task::setRuntimeConfigurableWrapper() Sets the wrapper object this task should use for runtime configurable elements. Task::setTaskName() Sets the name of this task for log messages Task::setTaskType() Sets the type of the task. Usually this is the name of the XML tag #### Class: ProjectComponent ProjectComponent::getProject() Returns a reference to current project ProjectComponent::log() Logs a message with the given priority. ProjectComponent::setProject() References the project to the current component.
### Class Details [line 65] ZendCodeAnalyzerTask analyze PHP source code using the ZendCodeAnalyzer included in Zend Studio 5.1 Available warnings: zend-error %s(line %d): %s oneline-comment - One-line comment ends with tag. bool-assign - Assignment seen where boolean expression is expected. Did you mean '==' instead of '='? bool-print - Print statement used when boolean expression is expected. bool-array - Array used when boolean expression is expected. bool-object - Object used when boolean expression is expected. call-time-ref - Call-time reference is deprecated. Define function as accepting parameter by reference instead. if-if-else - In if-if-else construction else relates to the closest if. Use braces to make the code clearer. define-params - define() requires two or three parameters. define-const - First parameter for define() should be string. Maybe you forgot quotes? break-var - Break/continue with variable is dangerous - break level can be out of scope. break-depth - Break/continue with depth more than current nesting level. var-once - Variable '%s' encountered only once. May be a typo? var-arg-unused - Function argument '%s' is never used. var-global-unused - Global variable '%s' is defined but never used. var-use-before-def - Variable '%s' is used before it was assigned. var-use-before-def-global - 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. var-no-global - PHP global variable '%s' is used as local. Maybe you wanted to define '%s' as global? var-value-unused - Value assigned to variable '%s' is never used var-ref-notmodified - Function parameter '%s' is passed by reference but never modified. Consider passing by value. return-empty-val - Function '%s' has both empty return and return with value. return-empty-used - Function '%s' has empty return but return value is used. return-noref - Function '%s' returns reference but the value is not assigned by reference. Maybe you meant '=&' instead of '='? return-end-used - Control reaches the end of function '%s'(file %s, line %d) but return value is used. sprintf-miss-args - Missing arguments for sprintf: format reqires %d arguments but %d are supplied. sprintf-extra-args - Extra arguments for sprintf: format reqires %d arguments but %d are supplied. unreach-code - Unreachable code in function '%s'. include-var - include/require with user-accessible variable can be dangerous. Consider using constant instead. non-object - Variable '%s' used as object, but has different type. bad-escape - Bad escape sequence: \%c, did you mean \\%c? empty-cond - Condition without a body expr-unused - Expression result is never used #### Tags:
author: | Knut Urdalen <knut.urdalen@gmail.com>
version: | $Id: ZendCodeAnalyzerTask.php 539 2009-08-26 08:36:05Z mrook $
copyright: | � 2001,2002 THYRELL. All rights reserved
[ Top ] ### Class Variables #### $analyzerPath = "" [line 67] #### Tags:
access: | protected
Type: | mixed
[ Top ] #### $counter = 0 [line 70] #### Tags:
access: | protected
Type: | mixed
[ Top ] #### $disable = array() [line 71] #### Tags:
access: | protected
Type: | mixed
[ Top ] #### $enable = array() [line 72] #### Tags:
access: | protected
Type: | mixed
[ Top ] #### $file = "" [line 68] #### Tags:
access: | protected
Type: | mixed
[ Top ] #### $filesets = array() [line 69] #### Tags:
access: | protected
Type: | mixed
[ Top ] ### Class Methods ### method analyze [line 168]
`void analyze( string $file)`
Analyze file #### Tags:
access: | protected
#### Parameters:
string | $file |
[ Top ] ### method createFileSet [line 126]
`FileSet createFileSet( )`
Nested creator, creates a FileSet for this task #### Tags:
return: | The created fileset object
[ Top ] ### method main [line 134]
`void main( )`
Analyze against PhingFile or a FileSet #### Tags:
access: | public
Overrides Task::main() (Called by the project to let the task do it's work. This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running <em>phing target1 target2</em> will run all tasks in target3 twice.) [ Top ] ### method setAnalyzerPath [line 90]
`void setAnalyzerPath( string $analyzerPath)`
Path to ZendCodeAnalyzer binary #### Tags:
access: | public
#### Parameters:
string | $analyzerPath |
[ Top ] ### method setDisable [line 99]
`void setDisable( string $disable)`
Disable warning levels. Seperate warning levels with ',' #### Tags:
access: | public
#### Parameters:
string | $disable |
[ Top ] ### method setEnable [line 108]
`void setEnable( string $enable)`
Enable warning levels. Seperate warning levels with ',' #### Tags:
access: | public
#### Parameters:
string | $enable |
[ Top ] ### method setFile [line 81]
`void setFile( $file)`
File to be analyzed #### Tags:
access: | public
#### Parameters:
PhingFile | $file |
[ Top ] ### method setHaltonwarning [line 116]
`void setHaltonwarning( boolean $value)`
Sets the haltonwarning flag #### Parameters:
boolean | $value |
[ Top ] Documentation generated on Mon, 19 Oct 2009 10:52:27 +0200 by phpDocumentor 1.4.3