Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
| 1 | <?php |
||
| 11 | class RunCommand extends AbstractCronCommand |
||
| 12 | { |
||
| 13 | const REGEX_RUN_MODEL = '#^([a-z0-9_]+/[a-z0-9_]+)::([a-z0-9_]+)$#i'; |
||
| 14 | /** |
||
| 15 | * @var array |
||
| 16 | */ |
||
| 17 | protected $infos; |
||
| 18 | |||
| 19 | protected function configure() |
||
| 20 | { |
||
| 21 | $this |
||
| 22 | ->setName('sys:cron:run') |
||
| 23 | ->addArgument('job', InputArgument::OPTIONAL, 'Job code') |
||
| 24 | ->setDescription('Runs a cronjob by job code'); |
||
| 25 | $help = <<<HELP |
||
| 26 | If no `job` argument is passed you can select a job from a list. |
||
| 27 | See it in action: http://www.youtube.com/watch?v=QkzkLgrfNaM |
||
| 28 | HELP; |
||
| 29 | $this->setHelp($help); |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param InputInterface $input |
||
| 34 | * @param OutputInterface $output |
||
| 35 | * @throws \Exception |
||
| 36 | * @return int|void |
||
| 37 | */ |
||
| 38 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 96 | |||
| 97 | /** |
||
| 98 | * @param InputInterface $input |
||
| 99 | * @param OutputInterface $output |
||
| 100 | * @param array $jobs |
||
| 101 | * @return string |
||
| 102 | * @throws \InvalidArgumentException |
||
| 103 | * @throws \Exception |
||
| 104 | */ |
||
| 105 | protected function askJobCode(InputInterface $input, OutputInterface $output, $jobs) |
||
| 127 | } |
||
| 128 |
Scrutinizer analyzes your
composer.json/composer.lockfile if available to determine the classes, and functions that are defined by your dependencies.It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.