ShipProvider   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 7
lcom 0
cbo 1
dl 0
loc 60
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 12 3
A boot() 0 6 1
A register() 0 11 3
1
<?php
2
3
namespace App\Ship\Providers;
4
5
use App\Ship\Parents\Providers\MainProvider;
6
7
/**
8
 * Class ShipProvider
9
 *
10
 * @author  Mahmoud Zalt  <[email protected]>
11
 */
12
class ShipProvider extends MainProvider
13
{
14
15
    /**
16
     * Register any Service Providers on the Ship layer (including third party packages).
17
     *
18
     * @var array
19
     */
20
    public $serviceProviders = [];
21
22
    /**
23
     * Register any Alias on the Ship layer (including third party packages).
24
     *
25
     * @var  array
26
     */
27
    protected $aliases = [];
28
29
30
    public function __construct()
31
    {
32
        parent::__construct(app());
33
        
34
        if (class_exists('Barryvdh\Debugbar\ServiceProvider')) {
35
            $this->serviceProviders[] = \Barryvdh\Debugbar\ServiceProvider::class;
36
        }
37
38
        if (class_exists('Barryvdh\Debugbar\Facade')) {
39
            $this->aliases[] = \Barryvdh\Debugbar\Facade::class;
40
        }
41
    }
42
    /**
43
     * Bootstrap any application services.
44
     *
45
     * @return void
46
     */
47
    public function boot()
48
    {
49
        // ...
50
        parent::boot();
51
        // ...
52
    }
53
54
    /**
55
     * Register any application services.
56
     *
57
     * @return void
58
     */
59
    public function register()
60
    {
61
        /**
62
         * Load the ide-helper service provider only in non production environments.
63
         */
64
        if ($this->app->environment() !== 'production' && class_exists('Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider')) {
65
            $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
66
        }
67
68
        parent::register();
69
    }
70
    
71
}
72