Completed
Pull Request — master (#68)
by D.
35:04 queued 25:10
created

AppServiceProvider::createUserLog()   A

Complexity

Conditions 4
Paths 5

Size

Total Lines 18
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 11
CRAP Score 4

Importance

Changes 0
Metric Value
dl 0
loc 18
ccs 11
cts 11
cp 1
rs 9.2
c 0
b 0
f 0
cc 4
eloc 11
nc 5
nop 1
crap 4
1
<?php
2
3
namespace SET\Providers;
4
5
use Illuminate\Support\Facades\Cache;
6
use Illuminate\Support\ServiceProvider;
7
use SET\Handlers\DBConfigs\DBConfigs;
8
use SET\Setting;
9
10
class AppServiceProvider extends ServiceProvider
11
{
12
    /**
13
     * Bootstrap any application services.
14
     *
15
     * @return void
16
     */
17
    public function boot()
18
    {
19
20 156
        DBConfigs::execute();
21
22 156
        Setting::saving(function ($setting) {
23
            Cache::forever($setting->key, $setting->value);
24
        });
25
26 2
    }
27 156
28 156
    /**
29 10
     * Register any application services.
30 156
     *
31 156
     * @return void
32
     */
33
    public function register()
34
    {
35
        if ($this->app->environment() == 'local') {
36
            $this->app->register('Laracasts\Generators\GeneratorsServiceProvider');
37
        }
38 156
    }
39
}
40