@@ -50,13 +50,13 @@ discard block |
||
| 50 | 50 | private function validateBooleans($config): void |
| 51 | 51 | { |
| 52 | 52 | // Check boolean parameters |
| 53 | - if (! Validator::key('overwrite', Validator::boolType())->validate($config)) { |
|
| 53 | + if (!Validator::key('overwrite', Validator::boolType())->validate($config)) { |
|
| 54 | 54 | throw new InvalidConfigException('"overwrite" parameter must be set as a boolean.'); |
| 55 | 55 | } |
| 56 | - if (! Validator::key('backup', Validator::boolType())->validate($config)) { |
|
| 56 | + if (!Validator::key('backup', Validator::boolType())->validate($config)) { |
|
| 57 | 57 | throw new InvalidConfigException('"backup" parameter must be set as a boolean.'); |
| 58 | 58 | } |
| 59 | - if (! Validator::key('ignore', Validator::boolType())->validate($config)) { |
|
| 59 | + if (!Validator::key('ignore', Validator::boolType())->validate($config)) { |
|
| 60 | 60 | throw new InvalidConfigException('"ignore" parameter must be set as a boolean.'); |
| 61 | 61 | } |
| 62 | 62 | } |
@@ -70,8 +70,8 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | private function validateIncludeRegex($config): void |
| 72 | 72 | { |
| 73 | - if (! Validator::key('include', Validator::stringType())->validate($config) |
|
| 74 | - && ! Validator::key('include', Validator::nullType())->validate($config) |
|
| 73 | + if (!Validator::key('include', Validator::stringType())->validate($config) |
|
| 74 | + && !Validator::key('include', Validator::nullType())->validate($config) |
|
| 75 | 75 | ) { |
| 76 | 76 | throw new InvalidConfigException('"include" parameter must be set as a string or a null value.'); |
| 77 | 77 | } |
@@ -86,8 +86,8 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | private function validateExcludeRegex($config): void |
| 88 | 88 | { |
| 89 | - if (! Validator::key('exclude', Validator::stringType())->validate($config) |
|
| 90 | - && ! Validator::key('exclude', Validator::nullType())->validate($config) |
|
| 89 | + if (!Validator::key('exclude', Validator::stringType())->validate($config) |
|
| 90 | + && !Validator::key('exclude', Validator::nullType())->validate($config) |
|
| 91 | 91 | ) { |
| 92 | 92 | throw new InvalidConfigException('"exclude" parameter must be set as a string or a null value.'); |
| 93 | 93 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | private function validateDirs($config): void |
| 104 | 104 | { |
| 105 | 105 | // Check that dirs key exists |
| 106 | - if (! Validator::key('dirs')->validate($config)) { |
|
| 106 | + if (!Validator::key('dirs')->validate($config)) { |
|
| 107 | 107 | throw new InvalidConfigException('"dirs" parameter is not an array.'); |
| 108 | 108 | } |
| 109 | 109 | // Clean dirs value |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | $this->config['dirs'] = $config['dirs'] = []; |
| 112 | 112 | } |
| 113 | 113 | // Validate each dirs |
| 114 | - if (! Validator::arrayVal() |
|
| 114 | + if (!Validator::arrayVal() |
|
| 115 | 115 | ->each(Validator::stringType(), Validator::stringType())->validate($config['dirs']) |
| 116 | 116 | ) { |
| 117 | 117 | throw new InvalidConfigException('Some directories in "dirs" parameter are not strings.'); |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | private function validateFiles($config): void |
| 129 | 129 | { |
| 130 | 130 | // Check that files key exists |
| 131 | - if (! Validator::key('files')->validate($config)) { |
|
| 131 | + if (!Validator::key('files')->validate($config)) { |
|
| 132 | 132 | throw new InvalidConfigException('"files" parameter is not an array.'); |
| 133 | 133 | } |
| 134 | 134 | // Clean files value |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | $this->config['files'] = $config['files'] = []; |
| 137 | 137 | } |
| 138 | 138 | // Validate each files |
| 139 | - if (! Validator::arrayVal() |
|
| 139 | + if (!Validator::arrayVal() |
|
| 140 | 140 | ->each(Validator::stringType(), Validator::stringType())->validate($config['files']) |
| 141 | 141 | ) { |
| 142 | 142 | throw new InvalidConfigException('Some files in "files" parameter are not strings.'); |