PHP Class PHPMD\PHPMD

Author: Manuel Pichler ([email protected])
Afficher le fichier Open project: horde/horde Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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

getIgnorePattern() public méthode

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

getInput() public méthode

Returns the input source file or directory path.
public getInput ( ) : string
Résultat string

getOptions() public méthode

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

hasViolations() public méthode

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

processFiles() public méthode

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
Résultat void

setFileExtensions() public méthode

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

setIgnorePattern() public méthode

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

setOptions() public méthode

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