B.44 PhpLintTask

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

Table B.46: Attributes

fileStringPath to source filen/aNo
haltonfailureBooleanStop the build process if the linting process encounters an error.falseNo
errorpropertyStringThe name of a property that will be set to contain the error string (if any).n/aNo
interpreterStringPath to alternative PHP interpreterDefaults to the ${php.interpreter} property which is the interpreter used to execute phing itself.No
cachefileStringIf set, enables writing of last-modified times to cachefile, to speed up processing of files that rarely changenoneNo
levelStringControl the level at which phplint reports status messages. One of error, warning, info, verbose, debug.debugNo
tofileStringFile to write list of 'bad files' to.n/aNo
deprecatedAsErrorBooleanWhether to treat deprecated warnings (introduced in PHP 5.3) as errors.falseNo

B.44.1 Example

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

Checking syntax of one particular source file.

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

Check syntax of a fileset of source files.

B.44.2 Supported Nested Tags