ElasticLaravelServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 30
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 12 2
A register() 0 4 1
1
<?php
2
3
namespace MAbadir\ElasticLaravel;
4
5
use Illuminate\Support\ServiceProvider;
6
use MAbadir\ElasticLaravel\Console\Commands\ElasticIndexer;
7
8
class ElasticLaravelServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Perform post-registration booting of services.
12
     *
13
     * @return void
14
     */
15
    public function boot()
16
    {
17
        $this->publishes([
18
            __DIR__.'/../config/elastic.php' => config_path('elastic.php'),
19
        ]);
20
21
        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...
22
            $this->commands([
23
                ElasticIndexer::class
24
            ]);
25
        }
26
    }
27
28
    /**
29
     * Register any package services.
30
     *
31
     * @return void
32
     */
33
    public function register()
34
    {
35
        //
36
    }
37
}