tasks/ext/phpmd/PHPMDTask.php

Show: inherited
Table of Contents

$Id: PHPMDTask.php 1394 2011-12-21 19:50:14Z mrook $

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This software consists of voluntary contributions made by many individuals and is licensed under the LGPL. For more information please see http://phing.info.

\PHPMDTask

Package: phing\tasks\ext\phpmd

Runs PHP Mess Detector. Checking PHP files for several potential problems based on rulesets.

Parent(s)
\Task < \ProjectComponent
Author
Benjamin Schultz  
Since
2.4.1  
Version
$Id: PHPMDTask.php 1394 2011-12-21 19:50:14Z mrook $  

Properties

Propertyprotectedarray  $allowedFileExtensions= 'array('php')'

List of valid file extensions for analyzed files.

Default valuearray('php')Details
Type
array
Propertyprotected\PhingFile  $file= 'null'

A php source code filename or directory

Default valuenullDetails
Type
\PhingFile
Propertyprotected\array<FileSet>  $filesets= 'array()'

All fileset objects assigned to this task

Default valuearray()Details
Type
\array<FileSet>
Propertyprotectedstring  $format= ''text''

The format for the report

Default value'text'Details
Type
string
Propertyprotected\array<PHPMDFormatterElement>  $formatters= 'array()'

Formatter elements.

Default valuearray()Details
Type
\array<PHPMDFormatterElement>
Propertyprotectedarray  $ignorePatterns= 'array('.git''

List of exclude directory patterns.

Default valuearray('.git'Details
Type
array
Propertyprotectedinteger  $minimumPriority= '0'

The minimum priority for rules to load.

Default value0Details
Type
integer
Propertyprotectedstring  $rulesets= ''codesize,unusedcode''

The rule-set filenames or identifier.

Default value'codesize,unusedcode'Details
Type
string

Methods

methodpubliccreateFileSet( ) : \FileSet

Nested creator, adds a set of files (nested fileset attribute).

Returns
Type Description
\FileSet The created fileset object
methodpubliccreateFormatter( ) : \PHPMDFormatterElement

Create object for nested formatter element.

Returns
Type Description
\PHPMDFormatterElement
methodpublicgetDescription( ) : void

methodpublicgetLocation( ) : void

methodpublicgetOwningTarget( ) : void

methodpublicgetProject( ) : void

methodprotectedgetRegisterSlot( ) : void

methodpublicgetRuntimeConfigurableWrapper( ) : void

methodpublicgetTaskName( ) : void

methodpublicgetTaskType( ) : void

methodpublicinit( ) : void

methodpubliclog( ) : void

methodpublicmain( ) : void

Executes PHPMD against PhingFile or a FileSet

Throws
Exception Description
\BuildException - if the phpmd classes can't be loaded.
methodpublicmaybeConfigure( ) : void

methodpublicperform( ) : void

methodpublicsetAllowedFileExtensions( string $fileExtensions ) : void

Sets a list of filename extensions for valid php source code files.

Parameters
Name Type Description
$fileExtensions string

List of valid file extensions without leading dot.

methodpublicsetDescription( ) : void

methodpublicsetFile( \PhingFile $file ) : void

Set the input source file or directory.

Parameters
Name Type Description
$file \PhingFile

The input source file or directory.

methodpublicsetIgnorePatterns( string $ignorePatterns ) : void

Sets a list of ignore patterns that is used to exclude directories from the source analysis.

Parameters
Name Type Description
$ignorePatterns string

List of ignore patterns.

methodpublicsetLocation( ) : void

methodpublicsetMinimumPriority( integer $minimumPriority ) : void

Sets the minimum rule priority.

Parameters
Name Type Description
$minimumPriority integer

Minimum rule priority.

methodpublicsetOwningTarget( ) : void

methodpublicsetProject( ) : void

methodpublicsetRulesets( string $ruleSetFileNames ) : void

Sets the rule-sets.

Parameters
Name Type Description
$ruleSetFileNames string

Comma-separated string of rule-set filenames or identifier.

methodpublicsetRuntimeConfigurableWrapper( ) : void

methodpublicsetTaskName( ) : void

methodpublicsetTaskType( ) : void

Documentation was generated by DocBlox 0.17.1.