PHP Класс PHPMD\PHPMD

Автор: Manuel Pichler ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

getFileExtensions() публичный Метод

Returns an array with valid php source file extensions.
С версии: 0.2.0
public getFileExtensions ( ) : array(string)
Результат array(string)

getIgnorePattern() публичный Метод

Returns an array with string patterns that mark a file path as invalid.
С версии: 0.2.0
public getIgnorePattern ( ) : array(string)
Результат array(string)

getInput() публичный Метод

Returns the input source file or directory path.
public getInput ( ) : string
Результат string

getOptions() публичный Метод

Returns additional options for PHPMD or one of it's parser backends.
public getOptions ( ) : array
Результат array

hasViolations() публичный Метод

This method will return true when the processed source code contains violations.
С версии: 0.2.5
public hasViolations ( ) : boolean
Результат boolean

processFiles() публичный Метод

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
Результат void

setFileExtensions() публичный Метод

Sets a list of filename extensions for valid php source code files.
public setFileExtensions ( array $fileExtensions ) : void
$fileExtensions array
Результат void

setIgnorePattern() публичный Метод

Sets a list of ignore patterns that is used to exclude directories from the source analysis.
public setIgnorePattern ( array $ignorePatterns ) : void
$ignorePatterns array
Результат void

setOptions() публичный Метод

Sets additional options for PHPMD or one of it's parser backends.
public setOptions ( array $options ) : void
$options array Additional backend or PHPMD options.
Результат void