ServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 13
c 1
b 0
f 0
dl 0
loc 30
ccs 0
cts 15
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 3 1
A boot() 0 20 2
1
<?php
2
3
namespace NovaAdDirector;
4
5
use NovaAdDirector\Console\Commands\AdConfigurationCreate;
6
7
class ServiceProvider extends \Illuminate\Support\ServiceProvider
8
{
9
    public function boot()
10
    {
11
        if ($this->app->runningInConsole()) {
12
            $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
13
14
            $this->publishes([
15
                __DIR__ . '/../config/nova-ad-director.php' => config_path('nova-ad-director.php'),
16
            ], 'config');
17
18
            $this->publishes([
19
                __DIR__.'/../resources/lang' => resource_path('lang/vendor/nova-ad-director'),
20
            ], 'lang');
21
22
23
            $this->commands([
24
                AdConfigurationCreate::class,
25
            ]);
26
        }
27
28
        $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'nova-ad-director');
29
    }
30
31
    /**
32
     * @inheritDoc
33
     */
34
    public function register()
35
    {
36
        $this->mergeConfigFrom(__DIR__ . '/../config/nova-ad-director.php', 'nova-ad-director');
37
    }
38
}
39