| Total Complexity | 3 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Coverage | 71.43% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | abstract class AbstractCommand extends Command |
||
| 14 | { |
||
| 15 | abstract protected function doExecute(InputInterface $input): string; |
||
| 16 | |||
| 17 | 3 | protected function execute(InputInterface $input, OutputInterface $output): int |
|
| 18 | { |
||
| 19 | 3 | $this->validateInput($input); |
|
| 20 | 3 | $symfonyStyle = new SymfonyStyle($input, $output); |
|
| 21 | try { |
||
| 22 | 3 | $memory = memory_get_usage(); |
|
| 23 | 3 | $start = microtime(true); |
|
| 24 | 3 | $symfonyStyle->info($this->doExecute($input)); |
|
| 25 | 3 | $stop = number_format(microtime(true) - $start, 2); |
|
| 26 | |||
| 27 | 3 | $symfonyStyle->success( |
|
| 28 | 3 | sprintf('Process took %f seconds. Memory used %f bytes.', $stop, memory_get_usage() - $memory) |
|
| 29 | ); |
||
| 30 | |||
| 31 | 3 | return Command::SUCCESS; |
|
| 32 | } catch (Throwable $exception) { |
||
| 33 | $symfonyStyle->error($exception->getMessage()); |
||
| 34 | |||
| 35 | return Command::FAILURE; |
||
| 36 | } |
||
| 37 | } |
||
| 38 | |||
| 39 | protected function validateInput(InputInterface $input): void |
||
| 41 | } |
||
| 42 | } |
||
| 43 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths