Total Complexity | 4 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 85.71% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
12 | class CacheServiceProvider extends BaseBootableServiceProvider |
||
13 | { |
||
14 | 1 | public const NAME = 'cache'; |
|
15 | public const NAME_STORE = 'cache.store'; |
||
16 | 1 | ||
17 | 1 | public function register() |
|
18 | 1 | { |
|
19 | $this->registerManager(); |
||
20 | 1 | $this->registerDefaultStore(); |
|
21 | } |
||
22 | |||
23 | 1 | protected function registerManager() |
|
24 | 1 | { |
|
25 | 1 | $this->getContainer()->share(static::NAME, function () { |
|
26 | return new CacheManager(); |
||
27 | 1 | }); |
|
28 | } |
||
29 | |||
30 | 1 | protected function registerDefaultStore() |
|
31 | 1 | { |
|
32 | 1 | $this->getContainer()->share(static::NAME_STORE, function () { |
|
33 | return $this->getContainer()->get('cache')->store(); |
||
34 | }); |
||
35 | } |
||
36 | |||
37 | |||
38 | /** |
||
39 | * @inheritdoc |
||
40 | */ |
||
41 | public function provides() |
||
46 | ]; |
||
47 | } |
||
48 | } |
||
49 |