FilterServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
namespace HChamran\LaravelFilter\Providers;
4
5
use Illuminate\Support\ServiceProvider;
0 ignored issues
show
Bug introduced by
The type Illuminate\Support\ServiceProvider was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
class FilterServiceProvider extends ServiceProvider
8
{
9
    protected $commands = [
10
      'HChamran\LaravelFilter\Commands\FilterMakeCommand'
11
    ];
12
13
    /**
14
     * Register services.
15
     *
16
     * @return void
17
     */
18
    public function register()
19
    {
20
        $this->commands($this->commands);
21
        $this->mergeConfigFrom(__DIR__ . '/../Config/filter.php', 'filter');
22
    }
23
24
    /**
25
     * Bootstrap services.
26
     *
27
     * @return void
28
     */
29
    public function boot()
30
    {
31
        $this->publishes([
32
            __DIR__ . '/../Config/filter.php' => config_path('filter.php'),
0 ignored issues
show
Bug introduced by
The function config_path was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

32
            __DIR__ . '/../Config/filter.php' => /** @scrutinizer ignore-call */ config_path('filter.php'),
Loading history...
33
        ]);
34
    }
35
}
36