| Total Complexity | 3 |
| Total Lines | 57 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class BarMetricCommand extends GeneratorCommand |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * The console command name. |
||
| 12 | * |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | protected $name = 'nova:barmetric'; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * The console command description. |
||
| 19 | * |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | protected $description = 'Create a new metric (barmetric) class'; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * The type of class being generated. |
||
| 26 | * |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | protected $type = 'Metric'; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Build the class with the given name. |
||
| 33 | * |
||
| 34 | * @param string $name |
||
| 35 | * @return string |
||
| 36 | */ |
||
| 37 | protected function buildClass($name) |
||
| 38 | { |
||
| 39 | $stub = parent::buildClass($name); |
||
| 40 | |||
| 41 | $key = preg_replace('/[^a-zA-Z0-9]+/', '', $this->argument('name')); |
||
| 42 | |||
| 43 | return str_replace('uri-key', Str::snake($key, '-'), $stub); |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Get the stub file for the generator. |
||
| 48 | * |
||
| 49 | * @return string |
||
| 50 | */ |
||
| 51 | protected function getStub() |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Get the default namespace for the class. |
||
| 58 | * |
||
| 59 | * @param string $rootNamespace |
||
| 60 | * @return string |
||
| 61 | */ |
||
| 62 | protected function getDefaultNamespace($rootNamespace) |
||
| 67 |
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