ServiceProvider   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
eloc 10
c 1
b 0
f 0
dl 0
loc 28
ccs 11
cts 11
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 14 4
A register() 0 3 1
1
<?php
2
3
namespace NovaResourceDynamicExport;
4
5
class ServiceProvider extends \Illuminate\Support\ServiceProvider
6
{
7
    /**
8
     * @inheritDoc
9
     */
10 10
    public function boot()
11
    {
12 10
        if (DynamicExport::$useRoutes) {
13 10
            $this->loadRoutesFrom(__DIR__.'/../routes/web.php');
14
        }
15
16 10
        if ($this->app->runningInConsole()) {
17 10
            if (DynamicExport::$runsMigrations) {
18 10
                $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
19
            }
20
21 10
            $this->publishes([
22 10
                __DIR__ . '/../config/nova-resource-dynamic-export.php' => config_path('nova-resource-dynamic-export.php'),
23 10
            ], 'config');
24
        }
25
    }
26
27
    /**
28
     * @inheritDoc
29
     */
30 10
    public function register()
31
    {
32 10
        $this->mergeConfigFrom(__DIR__ . '/../config/nova-resource-dynamic-export.php', 'nova-resource-dynamic-export');
33
    }
34
}
35