ServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 15 2
A register() 0 3 1
1
<?php
2
3
namespace Thinkone\NovaPageSettings;
4
5
use Illuminate\Support\Facades\Gate;
6
7
class ServiceProvider extends \Illuminate\Support\ServiceProvider
8
{
9
    /**
10
     * Bootstrap any application services.
11
     *
12
     * @return void
13
     */
14 10
    public function boot()
15
    {
16 10
        if ($this->app->runningInConsole()) {
17 10
            $this->publishes([
18 10
                __DIR__ . '/../config/nova-page-settings.php' => config_path('nova-page-settings.php'),
19 10
            ], 'config');
20
21
22 10
            $this->commands([
23 10
            ]);
24
        }
25
26 10
        Gate::policy(
27 10
            \Thinkone\NovaPageSettings\QueryAdapter\InternalSettingsModel::class,
28 10
            config('nova-page-settings.adapter_model_policy')
29 10
        );
30
    }
31
32
    /**
33
     * Register any application services.
34
     *
35
     * @return void
36
     */
37 10
    public function register()
38
    {
39 10
        $this->mergeConfigFrom(__DIR__ . '/../config/nova-page-settings.php', 'nova-page-settings');
40
    }
41
}
42