| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 69 | 24 | protected function factoryStorage() |
|
| 70 | { |
||
| 71 | 24 | $config = ['cache_path' => $this->config['storage_directory']]; |
|
| 72 | 24 | $this->storage = new $this->config['storage_class']($config); |
|
| 73 | |||
| 74 | 24 | if (!($this->storage instanceof StorageInterface)) { |
|
| 75 | 2 | throw new CacheException('Incorrect storage type: ' . $this->config['storage_class']); |
|
| 76 | } |
||
| 77 | |||
| 78 | 24 | return $this; |
|
| 79 | } |
||
| 81 |