# tasks/ext/PhpLintTask.php

## \PhpLintTask
jump to top

Package: phing\tasks\ext

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

Parent(s)
  \Task < \ProjectComponent
Author
  Knut Urdalen
Author
  Stefan Priebsch
Version
  $Id: PhpLintTask.php 1328 2011-10-20 09:40:21Z mrook $

### Properties

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

Type
  n/a

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

Type
  n/a

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

Type
  n/a

`$errorProperty= ''`
Details

Type
  n/a

`$file= ''`
Details

Type
  n/a

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

Type
  n/a

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

Type
  n/a

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

Type
  n/a

`$interpreter= ''''`
Default value`''`Details

Type
  n/a

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

Type
  n/a

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

Type
  n/a

### Methods

`__construct( ) : void`

Initialize the interpreter with the Phing property

`createFileSet( ) : \FileSet`

Nested creator, creates a FileSet for this task

Returns

Type | Description
--- | ---
\FileSet | The created fileset object

`getDescription( ) : void`

`getLocation( ) : void`

`getOwningTarget( ) : void`

`getProject( ) : void`

`getRegisterSlot( ) : void`

`getRuntimeConfigurableWrapper( ) : void`

`getTaskName( ) : void`

`getTaskType( ) : void`

`init( ) : void`

`lint( string $file ) : void`

Performs the actual syntax check

Parameters

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

`log( ) : void`

`main( ) : void`

Execute lint check against PhingFile or a FileSet

`maybeConfigure( ) : void`

`perform( ) : void`

`setCacheFile( \PhingFile $file ) : void`

Whether to store last-modified times in cache

Parameters

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

`setDeprecatedAsError( boolean $deprecatedAsError ) : void`

Sets whether to treat deprecated warnings (introduced in PHP 5.3) as errors

Parameters

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

`setDescription( ) : void`

`setErrorproperty( string $propname ) : void`

Set an property name in which to put any errors.

Parameters

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

`setFile( \PhingFile $file ) : void`

File to be performed syntax check on

Parameters

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

`setHaltOnFailure( boolean $aValue ) : void`

The haltonfailure property

Parameters

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

`setInterpreter( string $sPhp ) : void`

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 ) : void`

Set level of log messages generated (default = info)

Parameters

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

`setLocation( ) : void`

`setOwningTarget( ) : void`

`setProject( ) : void`

`setRuntimeConfigurableWrapper( ) : void`

`setTaskName( ) : void`

`setTaskType( ) : void`

`setToFile( $tofile ) : void`

File to save error messages to

Parameters

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

Documentation was generated by DocBlox 0.17.1.