Completed
Push — master ( 304836...019818 )
by Andrea Marco
07:40
created

QueryFiltersServiceProvider::boot()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 14
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 14
rs 9.4285
c 1
b 0
f 0
cc 2
eloc 8
nc 2
nop 0
1
<?php
2
3
namespace Cerbero\QueryFilters;
4
5
use Cerbero\QueryFilters\MakeQueryFiltersCommand;
6
use Illuminate\Support\ServiceProvider;
7
8
/**
9
 * The query filters service provider.
10
 *
11
 * @author    Andrea Marco Sartori
12
 */
13
class QueryFiltersServiceProvider extends ServiceProvider
14
{
15
    /**
16
     * Bootstrap the application services.
17
     *
18
     * @return void
19
     */
20
    public function boot()
21
    {
22
        $this->publishes([
23
            __DIR__.'/query_filters.php' => config_path('query_filters.php'),
24
        ], 'query_filters_config');
25
26
        $this->mergeConfigFrom(
27
            __DIR__.'/query_filters.php', 'query_filters'
28
        );
29
30
        if ($this->app->runningInConsole()) {
0 ignored issues
show
Bug introduced by
The method runningInConsole() does not seem to exist on object<Illuminate\Contra...Foundation\Application>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
31
            $this->commands(MakeQueryFiltersCommand::class);
32
        }
33
    }
34
}
35