Total Complexity | 8 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Coverage | 88.46% |
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()) { |
|
17 | return; |
||
18 | } |
||
19 | |||
20 | 35 | if (! $this->app instanceof Laravel) { |
|
21 | return; |
||
22 | } |
||
23 | |||
24 | 35 | $this->publishes( |
|
25 | [ |
||
26 | 35 | $this->getConfigPath() => config_path('query-builder.php'), |
|
27 | ], |
||
28 | 35 | 'config' |
|
29 | ); |
||
30 | 35 | } |
|
31 | |||
32 | 35 | public function register(): void |
|
33 | { |
||
34 | 35 | $this->registerConfig(); |
|
35 | 35 | $this->app->singleton( |
|
36 | 35 | QueryBuilderFactory::class, |
|
37 | 35 | function () { |
|
38 | 1 | return new QueryBuilderFactory(config('query-builder.builders')); |
|
39 | 35 | } |
|
40 | ); |
||
41 | 35 | } |
|
42 | |||
43 | 35 | protected function getConfigPath(): string |
|
44 | { |
||
45 | 35 | return __DIR__ . '/../config/query-builder.php'; |
|
46 | } |
||
47 | |||
48 | 35 | protected function registerConfig(): void |
|
49 | { |
||
50 | 35 | if ($this->app instanceof Lumen) { |
|
51 | $this->app->configure('query-builder'); |
||
52 | } |
||
53 | |||
54 | 35 | $this->mergeConfigFrom($this->getConfigPath(), 'query-builder'); |
|
55 | 35 | } |
|
56 | |||
57 | 1 | public function provides() |
|
61 | ]; |
||
62 | } |
||
63 | } |
||
64 |
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