PHPMD\RuleSetFactory::listAvailableRuleSets PHP Method

listAvailableRuleSets() public method

Lists available rule-set identifiers.
public listAvailableRuleSets ( ) : array(string)
return array(string)
    public function listAvailableRuleSets()
    {
        return array_merge(self::listRuleSetsInDirectory($this->location . '/rulesets/'), self::listRuleSetsInDirectory(getcwd() . '/rulesets/'));
    }

Usage Example

 protected function runCommand(array $args)
 {
     $argv = $this->parseSugaredArgv($args);
     $config = $this->getConfig($argv['namespace']);
     $ruleSetFactory = new RuleSetFactory();
     $options = new CommandLineOptions($argv['args'], $ruleSetFactory->listAvailableRuleSets(), $config);
     $command = new Command();
     return $command->run($options, $ruleSetFactory);
 }
All Usage Examples Of PHPMD\RuleSetFactory::listAvailableRuleSets