PullProductionDataServiceProvider   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 2
dl 0
loc 33
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 12 2
A register() 0 4 1
A provides() 0 6 1
1
<?php
2
3
namespace DigiFactory\PullProductionData;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class PullProductionDataServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application services.
11
     */
12
    public function boot()
13
    {
14
        if ($this->app->runningInConsole()) {
15
            $this->publishes([
16
                __DIR__.'/../config/config.php' => config_path('pull-production-data.php'),
17
            ], 'config');
18
19
            $this->commands([
20
                PullProductionDataCommand::class,
21
            ]);
22
        }
23
    }
24
25
    /**
26
     * Register the application services.
27
     */
28
    public function register()
29
    {
30
        $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'pull-production-data');
31
    }
32
33
    public function provides()
34
    {
35
        return [
36
            PullProductionDataCommand::class,
37
        ];
38
    }
39
}
40