B.43 PhpLintTask

The PhpLintTask checks syntax (lint) on one or more PHP source code files.

Table B.45: Attributes

NameTypeDescriptionDefaultRequired
file String Path to source filen/aNo
haltonfailure Boolean Stop the build process if the linting process encounters an error. false No
errorproperty String The name of a property that will be set to contain the error string (if any).n/aNo
interpreter String Path to alternative PHP interpreterDefaults to the ${php.interpreter} property which is the interpreter used to execute phing itself. No
cachefile String If set, enables writing of last-modified times to cachefile, to speed up processing of files that rarely change noneNo
level String Control the level at which phplint reports status messages. One of error, warning, info, verbose, debug. debug No
tofile String File to write list of 'bad files' to.n/aNo
deprecatedAsError Boolean Whether to treat deprecated warnings (introduced in PHP 5.3) as errors. false No

B.43.1 Example

<phplint file="path/to/source.php"/>

Checking syntax of one particular source file.

<phplint>
    <fileset dir="src">
        <include name="**/*.php"/>
    </fileset>
</phplint>
        

Check syntax of a fileset of source files.

B.43.2 Supported Nested Tags