Conditions | 3 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | private function validateAdapter(string $alias, array $config): void |
||
26 | { |
||
27 | $adapter = $config['adapter']['__class'] ?? false; |
||
28 | if (!$adapter) { |
||
29 | throw new \RuntimeException("Adapter is not defined in the \"$alias\" storage config."); |
||
30 | } |
||
31 | |||
32 | if (!$adapter instanceof FilesystemAdapter) { |
||
33 | throw new \RuntimeException('Adapter must implement \League\Flysystem\FilesystemAdapter interface.'); |
||
34 | } |
||
37 |