| Total Complexity | 9 |
| Total Lines | 55 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class Architect |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Get the AdminArchitect URI path. |
||
| 12 | * |
||
| 13 | * @return \Illuminate\Config\Repository|mixed |
||
| 14 | */ |
||
| 15 | public static function path() |
||
| 16 | { |
||
| 17 | return config('administrator.prefix', 'cms'); |
||
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Finds first module which uses a model. |
||
| 22 | * |
||
| 23 | * @param Model|string $model |
||
| 24 | * @param string $urlKey |
||
| 25 | * |
||
| 26 | * @return mixed |
||
| 27 | */ |
||
| 28 | public static function resourceByEntity($model, string $urlKey = null) |
||
| 29 | { |
||
| 30 | return app('scaffold.modules')->first(function ($module) use ($model, $urlKey) { |
||
| 31 | $urlEquals = $urlKey ? $module->url() === $urlKey : true; |
||
| 32 | |||
| 33 | if (\is_string($model)) { |
||
| 34 | return \get_class($module->model()) === $model && $urlEquals; |
||
| 35 | } |
||
| 36 | |||
| 37 | return \get_class($module->model()) === \get_class($model) && $urlEquals; |
||
| 38 | }); |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Humanize the given value into a proper name. |
||
| 43 | * |
||
| 44 | * @param string $value |
||
| 45 | * |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | public static function humanize($value) |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @return ArchitectRoutes |
||
| 59 | */ |
||
| 60 | public static function routes() |
||
| 65 |
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