C.88 ZendCodeAnalyzerTask
Prev | Appendix C. Optional tasks | Next

## C.88 ZendCodeAnalyzerTask

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

Table C.118: 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

### C.88.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.

NOTE: the `analyze` tag has been deprecated as of Phing 2.4.

### C.88.2 Supported Nested Tags

- `fileset`

Prev | Up | Next
C.87 XmlPropertyTask | Home | C.89 ZendGuardEncodeTask