Completed
Push — develop ( fbe971...cec1b5 )
by Paul
02:00
created
src/Executor/FileExecutor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     public function invoke(string $sourcePath, string $targetPath): void
77 77
     {
78
-        if (! $this->fileValidator->validate($sourcePath)) {
78
+        if (!$this->fileValidator->validate($sourcePath)) {
79 79
             return;
80 80
         }
81 81
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     {
108 108
         $targetPathExists = $this->fileSystem->has($targetPath);
109 109
 
110
-        if ($targetPathExists && ! $this->config->hasOverwrite()) {
110
+        if ($targetPathExists && !$this->config->hasOverwrite()) {
111 111
             throw new ExecutorException(sprintf('The target file "%s" already exists.', $targetPath));
112 112
         }
113 113
 
Please login to merge, or discard this patch.
src/Configuration/BaseConfig.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,15 +50,15 @@  discard block
 block discarded – undo
50 50
     protected function validate($config): void
51 51
     {
52 52
         // Check that $config is an array
53
-        if (! Validator::arrayType()->validate($config)) {
53
+        if (!Validator::arrayType()->validate($config)) {
54 54
             throw new InvalidConfigException('The config must be an array.');
55 55
         }
56 56
 
57 57
         // Check boolean parameters
58
-        if (! Validator::key('interface', Validator::boolType())->validate($config)) {
58
+        if (!Validator::key('interface', Validator::boolType())->validate($config)) {
59 59
             throw new InvalidConfigException('"interface" parameter must be set as a boolean.');
60 60
         }
61
-        if (! Validator::key('auto', Validator::boolType())->validate($config)) {
61
+        if (!Validator::key('auto', Validator::boolType())->validate($config)) {
62 62
             throw new InvalidConfigException('"auto" parameter must be set as a boolean.');
63 63
         }
64 64
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     private function validatePhpdoc($config): void
76 76
     {
77 77
         // Check that dirs key exists
78
-        if (! Validator::key('phpdoc', Validator::arrayType())->validate($config)) {
78
+        if (!Validator::key('phpdoc', Validator::arrayType())->validate($config)) {
79 79
             throw new InvalidConfigException('"phpdoc" parameter is not an array.');
80 80
         }
81 81
     }
Please login to merge, or discard this patch.
src/Configuration/ConsoleConfig.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
     private function validateBooleans($config): void
41 41
     {
42 42
         // Check boolean parameters
43
-        if (! Validator::key('overwrite', Validator::boolType())->validate($config)) {
43
+        if (!Validator::key('overwrite', Validator::boolType())->validate($config)) {
44 44
             throw new InvalidConfigException('"overwrite" parameter must be set as a boolean.');
45 45
         }
46
-        if (! Validator::key('ignore', Validator::boolType())->validate($config)) {
46
+        if (!Validator::key('ignore', Validator::boolType())->validate($config)) {
47 47
             throw new InvalidConfigException('"ignore" parameter must be set as a boolean.');
48 48
         }
49 49
     }
@@ -58,13 +58,13 @@  discard block
 block discarded – undo
58 58
     private function validateStrings($config): void
59 59
     {
60 60
         // Check string parameters
61
-        if (! Validator::key('include', Validator::stringType())->validate($config)
62
-            && ! Validator::key('include', Validator::nullType())->validate($config)
61
+        if (!Validator::key('include', Validator::stringType())->validate($config)
62
+            && !Validator::key('include', Validator::nullType())->validate($config)
63 63
         ) {
64 64
             throw new InvalidConfigException('"include" parameter must be set as a string or a null value.');
65 65
         }
66
-        if (! Validator::key('exclude', Validator::stringType())->validate($config)
67
-            && ! Validator::key('exclude', Validator::nullType())->validate($config)
66
+        if (!Validator::key('exclude', Validator::stringType())->validate($config)
67
+            && !Validator::key('exclude', Validator::nullType())->validate($config)
68 68
         ) {
69 69
             throw new InvalidConfigException('"exclude" parameter must be set as a string or a null value.');
70 70
         }
@@ -80,11 +80,11 @@  discard block
 block discarded – undo
80 80
     private function validateDirs($config): void
81 81
     {
82 82
         // Check that dirs key exists
83
-        if (! Validator::key('dirs', Validator::arrayType())->validate($config)) {
83
+        if (!Validator::key('dirs', Validator::arrayType())->validate($config)) {
84 84
             throw new InvalidConfigException('"dirs" parameter is not an array.');
85 85
         }
86 86
         // Validate each dirs
87
-        if (! Validator::arrayVal()
87
+        if (!Validator::arrayVal()
88 88
             ->each(Validator::stringType(), Validator::stringType())->validate($config['dirs'])
89 89
         ) {
90 90
             throw new InvalidConfigException('Some directories in "dirs" parameter are not strings.');
@@ -101,11 +101,11 @@  discard block
 block discarded – undo
101 101
     private function validateFiles($config): void
102 102
     {
103 103
         // Check that files key exists
104
-        if (! Validator::key('files', Validator::arrayType())->validate($config)) {
104
+        if (!Validator::key('files', Validator::arrayType())->validate($config)) {
105 105
             throw new InvalidConfigException('"files" parameter is not an array.');
106 106
         }
107 107
         // Validate each files
108
-        if (! Validator::arrayVal()
108
+        if (!Validator::arrayVal()
109 109
             ->each(Validator::stringType(), Validator::stringType())->validate($config['files'])
110 110
         ) {
111 111
             throw new InvalidConfigException('Some files in "files" parameter are not strings.');
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      */
158 158
     public function addDirectory(string $sourceDirectory, string $targetDirectory): void
159 159
     {
160
-        if (! Validator::arrayType()->validate($this->config['dirs'])) {
160
+        if (!Validator::arrayType()->validate($this->config['dirs'])) {
161 161
             $this->config['dirs'] = [];
162 162
         }
163 163
         $this->config['dirs'][$sourceDirectory] = $targetDirectory;
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
      */
177 177
     public function addFile(string $sourceFile, string $targetFile): void
178 178
     {
179
-        if (! Validator::arrayType()->validate($this->config['files'])) {
179
+        if (!Validator::arrayType()->validate($this->config['files'])) {
180 180
             $this->config['files'] = [];
181 181
         }
182 182
         $this->config['files'][$sourceFile] = $targetFile;
Please login to merge, or discard this patch.