| Total Complexity | 6 |
| Total Lines | 68 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class SettingsMakeCommand extends GeneratorCommand |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * The console command name. |
||
| 11 | * |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | protected $name = 'administrator:resource:settings'; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * The console command description. |
||
| 18 | * |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | protected $description = 'Create new administrator settings resource [Requires terranet/options package.'; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * The type of class being generated. |
||
| 25 | * |
||
| 26 | * @var string |
||
| 27 | */ |
||
| 28 | protected $type = 'Resource'; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Execute the console command. |
||
| 32 | * |
||
| 33 | * @return bool|null |
||
| 34 | * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException |
||
| 35 | */ |
||
| 36 | public function handle() |
||
| 37 | { |
||
| 38 | if (!class_exists(\Terranet\Options\Manager::class, true)) { |
||
| 39 | $this->alert("Dependency missing. Run 'composer require adminarchitect/options'."); |
||
| 40 | } |
||
| 41 | |||
| 42 | parent::handle(); |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Get the stub file for the generator. |
||
| 47 | * |
||
| 48 | * @return string |
||
| 49 | */ |
||
| 50 | protected function getStub() |
||
| 51 | { |
||
| 52 | return __DIR__.'/stubs/module.settings.stub'; |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Get the default namespace for the class. |
||
| 57 | * |
||
| 58 | * @param string $rootNamespace |
||
| 59 | * |
||
| 60 | * @return string |
||
| 61 | */ |
||
| 62 | protected function getDefaultNamespace($rootNamespace) |
||
| 63 | { |
||
| 64 | return $rootNamespace.'\\'.config('administrator.paths.module'); |
||
| 65 | } |
||
| 66 | |||
| 67 | protected function getArguments() |
||
| 70 | } |
||
| 71 | |||
| 72 | protected function getNameInput() |
||
| 75 | } |
||
| 76 | } |
||
| 77 |
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