Conditions | 4 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
42 | protected function validate($config): void |
||
43 | { |
||
44 | // Check that $config is an array |
||
45 | if (! is_array($config)) { |
||
46 | throw new InvalidConfigException('The config must be an array.'); |
||
47 | } |
||
48 | |||
49 | // Check boolean parameters |
||
50 | if (! isset($config['interface']) || ! is_bool($config['interface'])) { |
||
51 | throw new InvalidConfigException('"interface" parameter must be set as a boolean.'); |
||
52 | } |
||
63 |