| Conditions | 5 |
| Paths | 4 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 5 |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 27 | public function __construct(array $config) |
||
| 28 | { |
||
| 29 | if (!isset($config['adapter_name']) || !is_string($config['adapter_name'])) { |
||
| 30 | throw new InvalidCacheConfig('Invalid Adapter Name. Is Not A String OR Is Missing!'); |
||
| 31 | } |
||
| 32 | $this->adapterName = $config['adapter_name']; |
||
| 33 | |||
| 34 | |||
| 35 | unset($config['adapter_name']); |
||
| 36 | $this->settings = $config; |
||
| 37 | 9 | ||
| 38 | if (isset($config['adapter_namespace'])) { |
||
| 39 | 9 | if (!is_string($config['adapter_namespace'])) { |
|
| 40 | 1 | throw new InvalidCacheConfig('Invalid Adapter Namespace. Is Not A String!'); |
|
| 41 | } |
||
| 42 | 8 | ||
| 43 | $this->adapterNamespace = $config['adapter_namespace']; |
||
| 44 | 8 | } |
|
| 45 | 1 | } |
|
| 46 | |||
| 71 |