Completed
Push — Issue17117 ( 828429 )
by D.
06:27
created

AppServiceProvider::nullToEmptyString()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 2
eloc 2
nc 2
nop 2
crap 2
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 162
    public function boot()
18
    {
19 162
        DBConfigs::execute();
20
21 162
        Setting::saving(function ($setting) {
22 10
            Cache::forever($setting->key, $setting->value);
23 162
        });
24 162
    }
25
26
    /**
27
     * Register any application services.
28
     *
29
     * @return void
30
     */
31 162
    public function register()
32
    {
33 162
        if ($this->app->environment() == 'local') {
34
            $this->app->register('Laracasts\Generators\GeneratorsServiceProvider');
35
        }
36 162
    }
37
}
38