Total Complexity | 7 |
Total Lines | 65 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
14 | trait Common |
||
15 | { |
||
16 | /** |
||
17 | * @var StorageInterface |
||
18 | */ |
||
19 | protected $storage; |
||
20 | |||
21 | /** |
||
22 | * @var array |
||
23 | */ |
||
24 | protected $config = [ |
||
25 | 'storage_class' => File::class, |
||
26 | 'storage_directory' => './var/cache', |
||
27 | ]; |
||
28 | |||
29 | /** |
||
30 | * check that cache directory exist and create it if not |
||
31 | * |
||
32 | * @param array $config |
||
33 | * @throws \BlueCache\CacheException |
||
34 | */ |
||
35 | 28 | public function __construct(array $config = []) |
|
40 | 26 | } |
|
41 | |||
42 | /** |
||
43 | * @return $this |
||
44 | * @throws \BlueCache\CacheException |
||
45 | */ |
||
46 | 28 | protected function registerStorage() |
|
63 | } |
||
64 | |||
65 | /** |
||
66 | * @return $this |
||
67 | * @throws \BlueCache\CacheException |
||
68 | */ |
||
69 | 24 | protected function factoryStorage() |
|
81 |