Total Complexity | 7 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 4 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | class PhpFileStorage extends FileStorage |
||
18 | { |
||
19 | /** |
||
20 | * @var string settings file suffix. |
||
21 | */ |
||
22 | public $fileSuffix = '.php'; |
||
23 | |||
24 | /** |
||
25 | * @param string $key |
||
26 | * @return mixed |
||
27 | */ |
||
28 | 3 | public function getValue($key) |
|
29 | { |
||
30 | 3 | $fileName = $this->getFile($key); |
|
31 | 3 | if (file_exists($fileName)) { |
|
32 | 3 | return include $fileName; |
|
33 | } |
||
34 | 3 | return false; |
|
35 | } |
||
36 | |||
37 | /** |
||
38 | * @param string $key |
||
39 | * @param mixed $value |
||
40 | * @return bool |
||
41 | */ |
||
42 | 3 | public function setValue($key, $value) |
|
55 | } |
||
56 | |||
57 | /** |
||
58 | * Forcibly caches data of this file in OPCache or APC. |
||
59 | * @param string $fileName file name. |
||
60 | * @since 1.0.4 |
||
61 | */ |
||
62 | 3 | protected function forceScriptCache($fileName) |
|
69 |