@@ -30,7 +30,7 @@ |
||
30 | 30 | $exception->getMessage() |
31 | 31 | )); |
32 | 32 | } |
33 | - if (! is_array($configArray)) { |
|
33 | + if (!is_array($configArray)) { |
|
34 | 34 | throw new InvalidConfigException('Invalid YAML config'); |
35 | 35 | } |
36 | 36 | return $configArray; |
@@ -52,15 +52,15 @@ discard block |
||
52 | 52 | protected function validate($config): void |
53 | 53 | { |
54 | 54 | // Check that $config is an array |
55 | - if (! Validator::arrayType()->validate($config)) { |
|
55 | + if (!Validator::arrayType()->validate($config)) { |
|
56 | 56 | throw new InvalidConfigException('The config must be an array.'); |
57 | 57 | } |
58 | 58 | |
59 | 59 | // Check boolean parameters |
60 | - if (! Validator::key('interface', Validator::boolType())->validate($config)) { |
|
60 | + if (!Validator::key('interface', Validator::boolType())->validate($config)) { |
|
61 | 61 | throw new InvalidConfigException('"interface" parameter must be set as a boolean.'); |
62 | 62 | } |
63 | - if (! Validator::key('auto', Validator::boolType())->validate($config)) { |
|
63 | + if (!Validator::key('auto', Validator::boolType())->validate($config)) { |
|
64 | 64 | throw new InvalidConfigException('"auto" parameter must be set as a boolean.'); |
65 | 65 | } |
66 | 66 | |
@@ -77,11 +77,11 @@ discard block |
||
77 | 77 | private function validatePhpdoc($config): void |
78 | 78 | { |
79 | 79 | // Check that dirs key exists |
80 | - if (! Validator::key('phpdoc', Validator::arrayType())->validate($config)) { |
|
80 | + if (!Validator::key('phpdoc', Validator::arrayType())->validate($config)) { |
|
81 | 81 | throw new InvalidConfigException('"phpdoc" parameter is not an array.'); |
82 | 82 | } |
83 | 83 | // Validate each phpdoc |
84 | - if (! Validator::arrayVal() |
|
84 | + if (!Validator::arrayVal() |
|
85 | 85 | ->each(Validator::stringType(), Validator::stringType())->validate($config['phpdoc']) |
86 | 86 | ) { |
87 | 87 | throw new InvalidConfigException('Some annotation in "phpdoc" parameter are not strings.'); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | protected function decode(string $configPath): array |
22 | 22 | { |
23 | 23 | $configArray = require $configPath; |
24 | - if (! is_array($configArray)) { |
|
24 | + if (!is_array($configArray)) { |
|
25 | 25 | throw new InvalidConfigException('Invalid PHP config'); |
26 | 26 | } |
27 | 27 | return $configArray; |