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