The ZendCodeAnalyzerTask analyze PHP source files using the Zend
Code Analyzer tool that ships with all versions of Zend Studio.
Table C.130: Attributes
| Name | Type | Description | Default | Required |
|---|---|---|---|---|
analyzerPath | String | Path to Zend Code Analyzer binary | n/a | Yes |
file | String | Path to PHP source file | n/a | No |
disable | String | Disable warnings separated by comma | n/a | No |
enable | String | Enable warnings separated by comma | n/a | No |
haltonwarning | Boolean | Stop the build process if warnings occurred during the run. | false | No |
<zendcodeanalyzer analyzerPath="/usr/local/Zend/ZendStudioClient-5.1.0/bin/ZendCodeAnalyzer" file="SomeClass.php"/>
Analyze one PHP source file with all default warnings enabled.
<zendcodeanalyzer
analyzerPath="/usr/local/Zend/ZendStudioClient-5.1.0/bin/ZendCodeAnalyzer"
disable="var-ref-notmodified,if-if-else">
<fileset dir=".">
<include name="**/*.php"/>
</fileset>
</zendcodeanalyzer>
Analyze a set of PHP source files and disable a few warnings.