Beispiel #1
0
 /**
  * @param OutputInterface $output
  * @param RuleInterface $rule
  */
 private function printRule(OutputInterface $output, RuleInterface $rule)
 {
     $table = new Table($output);
     $table->setStyle('compact')->setRows([['Name', $rule->getName()], ['Category', $rule->getCategory()], ['Severity', $rule->getSeverity()], ['Message', $rule->getMessage()]]);
     $table->render();
     $output->writeln('---------------------------------------------');
 }
Beispiel #2
0
 /**
  * @param InputInterface $input
  * @param RuleInterface $rule
  * @return bool
  */
 private function isRuleSkipped(InputInterface $input, RuleInterface $rule)
 {
     if ($input->getArgument('category') === null) {
         return false;
     }
     return strtolower($rule->getCategory()) !== strtolower($input->getArgument('category'));
 }