| Conditions | 4 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 10 | public function createSimpleCache(): Cache |
||
| 11 | { |
||
| 12 | if (!file_exists('/tmp/simple-cache') |
||
| 13 | && !mkdir('/tmp/simple-cache', 0777, true) |
||
| 14 | && !is_dir( |
||
| 15 | '/tmp/simple-cache' |
||
| 16 | )) { |
||
| 17 | throw new \RuntimeException(sprintf('Directory "%s" was not created', '/tmp/simple-cache')); |
||
| 18 | } |
||
| 19 | |||
| 20 | return new Cache( |
||
| 21 | $this->getCacheType(), [ |
||
| 22 | 'storage' => '/tmp/simple-cache', |
||
| 23 | ] |
||
| 32 |