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