Passed
Push — develop ( ea766e...fdb6a9 )
by Paul
01:50
created
src/Exception/ExceptionInterface/ExceptionCatcherInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,5 +22,5 @@
 block discarded – undo
22 22
      *
23 23
      * @throws Exception If the configuration does not allow ignoring errors.
24 24
      */
25
-    public function catch(Exception $exception): void;
25
+    public function catch (Exception $exception): void;
26 26
 }
Please login to merge, or discard this patch.
src/Exception/ExceptionCatcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
     /**
45 45
      * {@inheritdoc}
46 46
      */
47
-    public function catch(Exception $exception): void
47
+    public function catch (Exception $exception): void
48 48
     {
49 49
         if ($this->config->hasIgnore()) {
50 50
             $this->output->note($exception->getMessage());
Please login to merge, or discard this patch.
src/Executor/FileExecutor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function execute(string $sourcePath, string $targetPath): void
76 76
     {
77
-        if (! $this->fileValidator->validate($sourcePath)) {
77
+        if (!$this->fileValidator->validate($sourcePath)) {
78 78
             return;
79 79
         }
80 80
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     {
102 102
         $targetPathExists = $this->fileSystem->has($targetPath);
103 103
 
104
-        if ($targetPathExists && ! $this->config->hasOverwrite()) {
104
+        if ($targetPathExists && !$this->config->hasOverwrite()) {
105 105
             throw new ExecutorException(sprintf('The target file "%s" already exists.', $targetPath));
106 106
         }
107 107
 
Please login to merge, or discard this patch.
src/Configuration/ConsoleConfig.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -40,13 +40,13 @@  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('auto', Validator::boolType())->validate($config)) {
46
+        if (!Validator::key('auto', Validator::boolType())->validate($config)) {
47 47
             throw new InvalidConfigException('"auto" parameter must be set as a boolean.');
48 48
         }
49
-        if (! Validator::key('ignore', Validator::boolType())->validate($config)) {
49
+        if (!Validator::key('ignore', Validator::boolType())->validate($config)) {
50 50
             throw new InvalidConfigException('"ignore" parameter must be set as a boolean.');
51 51
         }
52 52
     }
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
     private function validateStrings($config): void
62 62
     {
63 63
         // Check string parameters
64
-        if (! Validator::key('include', Validator::stringType())->validate($config)) {
64
+        if (!Validator::key('include', Validator::stringType())->validate($config)) {
65 65
             throw new InvalidConfigException('"include" parameter must be set as a string.');
66 66
         }
67
-        if (! Validator::key('exclude', Validator::stringType())->validate($config)) {
67
+        if (!Validator::key('exclude', Validator::stringType())->validate($config)) {
68 68
             throw new InvalidConfigException('"exclude" parameter must be set as a string.');
69 69
         }
70 70
     }
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
     private function validateDirs($config): void
80 80
     {
81 81
         // Check that dirs key exists
82
-        if (! Validator::key('dirs', Validator::arrayType())->validate($config)) {
82
+        if (!Validator::key('dirs', Validator::arrayType())->validate($config)) {
83 83
             throw new InvalidConfigException('"dirs" parameter is not an array.');
84 84
         }
85 85
         // Validate each dirs
86
-        if (! Validator::arrayVal()
86
+        if (!Validator::arrayVal()
87 87
             ->each(Validator::stringType(), Validator::stringType())->validate($config['dirs'])
88 88
         ) {
89 89
             throw new InvalidConfigException('Some directories in "dirs" parameter are not strings.');
@@ -100,11 +100,11 @@  discard block
 block discarded – undo
100 100
     private function validateFiles($config): void
101 101
     {
102 102
         // Check that files key exists
103
-        if (! Validator::key('files', Validator::arrayType())->validate($config)) {
103
+        if (!Validator::key('files', Validator::arrayType())->validate($config)) {
104 104
             throw new InvalidConfigException('"files" parameter is not an array.');
105 105
         }
106 106
         // Validate each files
107
-        if (! Validator::arrayVal()
107
+        if (!Validator::arrayVal()
108 108
             ->each(Validator::stringType(), Validator::stringType())->validate($config['files'])
109 109
         ) {
110 110
             throw new InvalidConfigException('Some files in "files" parameter are not strings.');
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
      */
157 157
     public function addDirectory(string $sourceDirectory, string $targetDirectory): void
158 158
     {
159
-        if (! Validator::arrayType()->validate($this->config['dirs'])) {
159
+        if (!Validator::arrayType()->validate($this->config['dirs'])) {
160 160
             $this->config['dirs'] = [];
161 161
         }
162 162
         $this->config['dirs'][$sourceDirectory] = $targetDirectory;
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
      */
176 176
     public function addFile(string $sourceFile, string $targetFile): void
177 177
     {
178
-        if (! Validator::arrayType()->validate($this->config['files'])) {
178
+        if (!Validator::arrayType()->validate($this->config['files'])) {
179 179
             $this->config['files'] = [];
180 180
         }
181 181
         $this->config['files'][$sourceFile] = $targetFile;
Please login to merge, or discard this patch.
src/Validator/FileValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
      */
48 48
     public function validate(string $path): bool
49 49
     {
50
-        if (! $this->validatePath($path)) {
50
+        if (!$this->validatePath($path)) {
51 51
             return false;
52 52
         }
53 53
 
Please login to merge, or discard this patch.