PHP Class PHPMD\PHPMD

Author: Manuel Pichler ([email protected])
Datei anzeigen Open project: horde/horde Class Usage Examples

Public Methods

Method Description
getFileExtensions ( ) : array(string) Returns an array with valid php source file extensions.
getIgnorePattern ( ) : array(string) Returns an array with string patterns that mark a file path as invalid.
getInput ( ) : string Returns the input source file or directory path.
getOptions ( ) : array Returns additional options for PHPMD or one of it's parser backends.
hasViolations ( ) : boolean This method will return true when the processed source code contains violations.
processFiles ( string $inputPath, string $ruleSets, array $renderers, RuleSetFactory $ruleSetFactory ) : void This method will process all files that can be found in the given input path. It will apply rules defined in the comma-separated $ruleSets argument. The result will be passed to all given renderer instances.
setFileExtensions ( array $fileExtensions ) : void Sets a list of filename extensions for valid php source code files.
setIgnorePattern ( array $ignorePatterns ) : void Sets a list of ignore patterns that is used to exclude directories from the source analysis.
setOptions ( array $options ) : void Sets additional options for PHPMD or one of it's parser backends.

Method Details

getFileExtensions() public method

Returns an array with valid php source file extensions.
Since: 0.2.0
public getFileExtensions ( ) : array(string)
return array(string)

getIgnorePattern() public method

Returns an array with string patterns that mark a file path as invalid.
Since: 0.2.0
public getIgnorePattern ( ) : array(string)
return array(string)

getInput() public method

Returns the input source file or directory path.
public getInput ( ) : string
return string

getOptions() public method

Returns additional options for PHPMD or one of it's parser backends.
public getOptions ( ) : array
return array

hasViolations() public method

This method will return true when the processed source code contains violations.
Since: 0.2.5
public hasViolations ( ) : boolean
return boolean

processFiles() public method

This method will process all files that can be found in the given input path. It will apply rules defined in the comma-separated $ruleSets argument. The result will be passed to all given renderer instances.
public processFiles ( string $inputPath, string $ruleSets, array $renderers, RuleSetFactory $ruleSetFactory ) : void
$inputPath string
$ruleSets string
$renderers array
$ruleSetFactory RuleSetFactory
return void

setFileExtensions() public method

Sets a list of filename extensions for valid php source code files.
public setFileExtensions ( array $fileExtensions ) : void
$fileExtensions array
return void

setIgnorePattern() public method

Sets a list of ignore patterns that is used to exclude directories from the source analysis.
public setIgnorePattern ( array $ignorePatterns ) : void
$ignorePatterns array
return void

setOptions() public method

Sets additional options for PHPMD or one of it's parser backends.
public setOptions ( array $options ) : void
$options array Additional backend or PHPMD options.
return void