ModelSettingsServiceProvider::register()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Glorand\Model\Settings;
4
5
use Glorand\Model\Settings\Console\CreateSettingsFieldForModel;
6
use Glorand\Model\Settings\Console\CreateSettingsTable;
7
use Illuminate\Support\ServiceProvider;
8
9
class ModelSettingsServiceProvider extends ServiceProvider
10
{
11 234
    public function boot()
12
    {
13 234
        if ($this->app->runningInConsole()) {
14 234
            $this->commands([
15 234
                CreateSettingsFieldForModel::class,
16
                CreateSettingsTable::class,
17
            ]);
18
        }
19
20 234
        $this->publishes([
21 234
            __DIR__ . '/../config/model_settings.php' => config_path('model_settings.php'),
22
        ]);
23 234
    }
24
25 234
    public function register()
26
    {
27 234
        $this->mergeConfigFrom(__DIR__ . '/../config/model_settings.php', 'model_settings');
28 234
    }
29
}
30