PHP Class PHPMD\TextUI\Command

Author: Manuel Pichler ([email protected])
Exibir arquivo Open project: phpmd/phpmd Class Usage Examples

Public Methods

Method Description
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.

Private Methods

Method Description
getVersion ( ) : string Returns the current version number.

Method Details

main() public static method

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.
return integer

run() public method

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
return integer