Total Complexity | 4 |
Total Lines | 55 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
14 | class ServiceProvider extends LaravelServiceProvider |
||
15 | { |
||
16 | /** |
||
17 | * Indicates if loading of the provider is deferred. |
||
18 | * |
||
19 | * @var bool |
||
20 | */ |
||
21 | protected $defer = true; |
||
22 | |||
23 | /** |
||
24 | * Bootstrap the application services. |
||
25 | * |
||
26 | * @return void |
||
27 | */ |
||
28 | public function boot() |
||
29 | { |
||
30 | // |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * Register the application services. |
||
35 | * |
||
36 | * @return void |
||
37 | */ |
||
38 | public function register() |
||
39 | { |
||
40 | $this->registerClient(); |
||
41 | |||
42 | $this->app->alias(Client::class, 'ncentral'); |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * Register the client object |
||
47 | * |
||
48 | * A Client needs to have some properties set, so in Laravel, we are going to pull them from the configs. |
||
49 | */ |
||
50 | protected function registerClient() |
||
51 | { |
||
52 | $this->app->singleton( |
||
53 | Client::class, |
||
54 | function (Application $app) { |
||
55 | return new Client(); |
||
56 | } |
||
57 | ); |
||
58 | } |
||
59 | |||
60 | /** |
||
61 | * Get the services provided by the provider. |
||
62 | * |
||
63 | * @return array |
||
64 | */ |
||
65 | public function provides() |
||
69 | ]; |
||
70 | } |
||
71 | } |
||
72 |
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