| Conditions | 4 |
| Paths | 6 |
| Total Lines | 17 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | 12 | private function createAdapter(array $config): CacheItemPoolInterface |
|
| 21 | { |
||
| 22 | 12 | if (!isset($config['driver'])) { |
|
| 23 | 3 | $config['driver'] = 'filesystem'; |
|
| 24 | } |
||
| 25 | 12 | switch ($config['driver']) { |
|
| 26 | 12 | case 'array': |
|
| 27 | 3 | $driver = $this->createArrayAdapter($config); |
|
| 28 | 3 | break; |
|
| 29 | 9 | case 'apcu': |
|
| 30 | 3 | $driver = $this->createApcuAdapter($config); |
|
| 31 | 3 | break; |
|
| 32 | default: |
||
| 33 | 6 | $driver = $this->createFilesystemAdapter($config); |
|
| 34 | 6 | break; |
|
| 35 | } |
||
| 36 | 12 | return $driver; |
|
| 37 | } |
||
| 54 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.