classes/phing/tasks/ext/phpmd/PHPMDTask.php
\PHPMDTask
Runs PHP Mess Detector. Checking PHP files for several potential problems based on rulesets.
Use {@link Project#createTask} to register a new Task.
- Extends from
- \Task
- author
- Benjamin Schultz
- copyright
- 2001,2002 THYRELL. All rights reserved
- package
- phing.tasks.ext.phpmd
- since
- 2.4.1
- version
- $Id: PHPMDTask.php 1223 2011-07-15 19:27:56Z mrook $
Properties

array
$allowedFileExtensions= 'array'
List of valid file extensions for analyzed files.
arrayDetails- Type
- array

\PhingFile
$file= 'null'
A php source code filename or directory
nullDetails- Type
- \PhingFile

\array<FileSet>
$filesets= 'array'
All fileset objects assigned to this task
arrayDetails- Type
- \array<FileSet>

\array<PHPMDFormatterElement>
$formatters= 'array'
Formatter elements.
arrayDetails- Type
- \array<PHPMDFormatterElement>

array
$ignorePatterns= 'array'
List of exclude directory patterns.
arrayDetails- Type
- array

integer
$minimumPriority= '5'
The minimum priority for rules to load.
5Details- Type
- integer
Methods

createFileSet(
)
:
\FileSetNested creator, adds a set of files (nested fileset attribute).
| Type | Description |
|---|---|
| \FileSet |

createFormatter(
)
:
\PHPMDFormatterElementCreate object for nested formatter element.
| Type | Description |
|---|---|
| \PHPMDFormatterElement |

init(
)
:
Load the necessary environment for running PHPMD.
- throws
- - if the phpmd classes can't be loaded.

setAllowedFileExtensions(
string $fileExtensions
)
:
voidSets a list of filename extensions for valid php source code files.
| Name | Type | Description |
|---|---|---|
| $fileExtensions | string | List of valid file extensions without leading dot. |

setFile(
\PhingFile $file
)
:
voidSet the input source file or directory.
| Name | Type | Description |
|---|---|---|
| $file | \PhingFile | The input source file or directory. |

setIgnorePatterns(
string $ignorePatterns
)
:
voidSets a list of ignore patterns that is used to exclude directories from
the source analysis.
| Name | Type | Description |
|---|---|---|
| $ignorePatterns | string | List of ignore patterns. |

setMinimumPriority(
integer $minimumPriority
)
:
voidSets the minimum rule priority.
| Name | Type | Description |
|---|---|---|
| $minimumPriority | integer | Minimum rule priority. |