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