Total Complexity | 8 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Coverage | 84.62% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class QueryBuilderServiceProvider extends ServiceProvider implements DeferrableProvider |
||
13 | { |
||
14 | 41 | public function boot(): void |
|
15 | { |
||
16 | 41 | if (! $this->app->runningInConsole()) { |
|
17 | return; |
||
18 | } |
||
19 | |||
20 | 41 | if (! $this->app instanceof Laravel) { |
|
21 | return; |
||
22 | } |
||
23 | |||
24 | 41 | $this->publishes([ |
|
25 | 41 | $this->getConfigPath() => config_path('query-builder.php'), |
|
26 | 41 | ], 'config'); |
|
27 | 41 | } |
|
28 | |||
29 | 41 | public function register(): void |
|
30 | { |
||
31 | 41 | $this->registerConfig(); |
|
32 | 41 | $this->app->singleton( |
|
33 | 41 | QueryBuilderFactory::class, |
|
34 | 41 | function (): QueryBuilderFactory { |
|
35 | return new QueryBuilderFactory(config('query-builder.builders')); |
||
36 | 41 | } |
|
37 | ); |
||
38 | 41 | } |
|
39 | |||
40 | 41 | protected function getConfigPath(): string |
|
41 | { |
||
42 | 41 | return __DIR__ . '/../config/query-builder.php'; |
|
43 | } |
||
44 | |||
45 | 41 | protected function registerConfig(): void |
|
52 | 41 | } |
|
53 | |||
54 | /** |
||
55 | * @return array<class-string<\Zing\QueryBuilder\QueryBuilderFactory>> |
||
56 | */ |
||
57 | 1 | public function provides(): array |
|
60 | } |
||
61 | } |
||
62 |
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