PHP Класс PHPMD\TextUI\Command

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

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

Метод Описание
main ( array $args ) : integer The main method that can be used by a calling shell script, the return value can be used as exit code.
run ( CommandLineOptions $opts, RuleSetFactory $ruleSetFactory ) : integer This method creates a PHPMD instance and configures this object based on the user's input, then it starts the source analysis.

Приватные методы

Метод Описание
getVersion ( ) : string Returns the current version number.

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

main() публичный статический метод

The main method that can be used by a calling shell script, the return value can be used as exit code.
public static main ( array $args ) : integer
$args array The raw command line arguments array.
Результат integer

run() публичный метод

The return value of this method can be used as an exit code. A value equal to EXIT_SUCCESS means that no violations or errors were found in the analyzed code. Otherwise this method will return a value equal to EXIT_VIOLATION. The use of flag --ignore-violations-on-exit will result to a EXIT_SUCCESS even if any violation is found.
public run ( CommandLineOptions $opts, RuleSetFactory $ruleSetFactory ) : integer
$opts CommandLineOptions
$ruleSetFactory PHPMD\RuleSetFactory
Результат integer