# classes/phing/tasks/ext/PhpLintTask.php

## \PhpLintTask
jump to top

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

`$badFiles= 'array'`
Default value `array` Details

Type

`$cache= 'null'`
Default value `null` Details

Type

`$deprecatedAsError= 'false'`
Default value `false` Details

Type

`$errorProperty= ''`
Details

Type

`$file= ''`
Details

Type

`$filesets= 'array'`
Default value `array` Details

Type

`$haltOnFailure= 'false'`
Default value `false` Details

Type

`$hasErrors= 'false'`
Default value `false` Details

Type

`$interpreter= ''`
Details

Type

`$logLevel= 'Project'`
Default value `Project` Details

Type

`$tofile= 'null'`
Default value `null` Details

Type

### Methods

`__construct( ) :`
Initialize the interpreter with the Phing property
`createFileSet( ) : \FileSet`
Nested creator, creates a FileSet for this task
Returns

Type | Description
--- | ---
\FileSet |

`lint( string $file ) : void`
Performs the actual syntax check
Parameters

Name | Type | Description
--- | --- | ---
$file | string |

`main( ) :`
Execute lint check against PhingFile or a FileSet
`setCacheFile( \PhingFile $file ) :`
Whether to store last-modified times in cache
Parameters

Name | Type | Description
--- | --- | ---
$file | \PhingFile |

`setDeprecatedAsError( boolean $deprecatedAsError ) :`
Sets whether to treat deprecated warnings (introduced in PHP 5.3) as errors
Parameters

Name | Type | Description
--- | --- | ---
$deprecatedAsError | boolean |

`setErrorproperty( string $propname ) :`
Set an property name in which to put any errors.
Parameters

Name | Type | Description
--- | --- | ---
$propname | string |

`setFile( \PhingFile $file ) :`
File to be performed syntax check on
Parameters

Name | Type | Description
--- | --- | ---
$file | \PhingFile |

`setHaltOnFailure( boolean $aValue ) :`
The haltonfailure property
Parameters

Name | Type | Description
--- | --- | ---
$aValue | boolean |

`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

`setLevel( string $level ) :`
Set level of log messages generated (default = info)
Parameters

Name | Type | Description
--- | --- | ---
$level | string |

`setToFile( $tofile ) :`
File to save error messages to
Parameters

Name | Type | Description
--- | --- | ---
$tofile |  |

Documentation was generated by DocBlox 0.13.1.