| Conditions | 3 |
| Paths | 4 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public static function validate(array $options): array |
||
| 22 | { |
||
| 23 | $adapter = null; |
||
| 24 | if (isset($options['adapter'])) { |
||
| 25 | $adapter = $options['adapter']; |
||
| 26 | } |
||
| 27 | |||
| 28 | if (!isset(Factory::ADAPTERS[$adapter])) { |
||
| 29 | throw new InvalidArgumentException('valid storage adapter is required'); |
||
| 30 | } |
||
| 31 | |||
| 32 | return $options; |
||
| 33 | } |
||
| 34 | } |
||
| 35 |