PHP Class PHPMD\TextUI\Command

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

Méthodes publiques

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

Méthode Description
getVersion ( ) : string Returns the current version number.

Method Details

main() public static méthode

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.
Résultat integer

run() public méthode

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