Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
51 | public function getCache() |
||
52 | { |
||
53 | if (null === $this->cache) { |
||
54 | $directory = $this->config->getCacheDirectory(); |
||
55 | if (null === $directory) { |
||
56 | $this->cache = new ArrayCache(); |
||
57 | |||
58 | return $this->cache; |
||
59 | } |
||
60 | |||
61 | $this->cache = new FilesystemCache($directory); |
||
62 | } |
||
63 | |||
64 | return $this->cache; |
||
65 | } |
||
66 | } |
||
67 |