C.101 ZendCodeAnalyzerTask

The ZendCodeAnalyzerTask analyze PHP source files using the Zend Code Analyzer tool that ships with all versions of Zend Studio.

Table C.131: Attributes

NameTypeDescriptionDefaultRequired
analyzerPathStringPath to Zend Code Analyzer binaryn/aYes
fileStringPath to PHP source filen/aNo
disableStringDisable warnings separated by comman/aNo
enableStringEnable warnings separated by comman/aNo
haltonwarningBooleanStop the build process if warnings occurred during the run. falseNo

C.101.1 Example

<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.

C.101.2 Supported Nested Tags