Total Complexity | 3 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
21 | final class CacheServiceProvider extends BaseServiceProvider |
||
22 | { |
||
23 | /** |
||
24 | * {@inheritdoc} |
||
25 | */ |
||
26 | 39 | public function register(): void |
|
27 | { |
||
28 | 39 | parent::register(); |
|
29 | |||
30 | 39 | if ($this->app['config']->get('cache') === null) { |
|
31 | 39 | $this->app['config']->set('cache', $this->getDefaultConfig()); |
|
32 | } |
||
33 | 39 | } |
|
34 | |||
35 | /** |
||
36 | * Returns the default application cache config. |
||
37 | * |
||
38 | * We keep it simple using the `array` driver. |
||
39 | */ |
||
40 | 39 | private function getDefaultConfig(): array |
|
47 | ], |
||
48 | ], |
||
52 |