classes/phing/tasks/ext/PhpLintTask.php

\PhpLintTask

A PHP lint task. Checking syntax of one or more PHP source file.

Use {@link Project#createTask} to register a new Task.

Extends from
\Task
author
Knut Urdalen
author
Stefan Priebsch
copyright
2001,2002 THYRELL. All rights reserved
package
phing.tasks.ext
version
$Id: PhpLintTask.php 1226 2011-07-25 14:50:58Z mrook $

Properties

Propertyprotected  $badFiles= 'array'
Default valuearrayDetails
Type
Propertyprotected  $cache= 'null'
Default valuenullDetails
Type
Propertyprotected  $deprecatedAsError= 'false'
Default valuefalseDetails
Type
Propertyprotected  $errorProperty= ''
Details
Type
Propertyprotected  $file= ''
Details
Type
Propertyprotected  $filesets= 'array'
Default valuearrayDetails
Type
Propertyprotected  $haltOnFailure= 'false'
Default valuefalseDetails
Type
Propertyprotected  $hasErrors= 'false'
Default valuefalseDetails
Type
Propertyprotected  $interpreter= ''
Details
Type
Propertyprotected  $logLevel= 'Project'
Default valueProjectDetails
Type
Propertyprotected  $tofile= 'null'
Default valuenullDetails
Type

Methods

methodpublic  __construct( ) :
Initialize the interpreter with the Phing property
methodpublic  createFileSet( ) : \FileSet
Nested creator, creates a FileSet for this task
Returns
Type Description
\FileSet
methodprotected  lint( string $file ) : void
Performs the actual syntax check
Parameters
Name Type Description
$file string
methodpublic  main( ) :
Execute lint check against PhingFile or a FileSet
methodpublic  setCacheFile( \PhingFile $file ) :
Whether to store last-modified times in cache
Parameters
Name Type Description
$file \PhingFile
methodpublic  setDeprecatedAsError( boolean $deprecatedAsError ) :
Sets whether to treat deprecated warnings (introduced in PHP 5.3) as errors
Parameters
Name Type Description
$deprecatedAsError boolean
methodpublic  setErrorproperty( string $propname ) :
Set an property name in which to put any errors.
Parameters
Name Type Description
$propname string
methodpublic  setFile( \PhingFile $file ) :
File to be performed syntax check on
Parameters
Name Type Description
$file \PhingFile
methodpublic  setHaltOnFailure( boolean $aValue ) :
The haltonfailure property
Parameters
Name Type Description
$aValue boolean
methodpublic  setInterpreter( string $sPhp ) :
Override default php interpreter
Parameters
Name Type Description
$sPhp string
Details
todo
Do some sort of checking if the path is correct but would require traversing the systems executeable path too
methodpublic  setLevel( string $level ) :
Set level of log messages generated (default = info)
Parameters
Name Type Description
$level string
methodpublic  setToFile(  $tofile ) :
File to save error messages to
Parameters
Name Type Description
$tofile
Documentation was generated by DocBlox 0.13.1.