Completed
Pull Request — master (#82)
by Jan Philipp
02:07
created
src/Config/ConfigFileFinder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,13 +48,13 @@
 block discarded – undo
48 48
             return $globResult;
49 49
         }
50 50
 
51
-        $overrideFile = array_filter($globResult, function (string $file) {
51
+        $overrideFile = array_filter($globResult, function(string $file) {
52 52
             $extension = pathinfo($file, PATHINFO_EXTENSION);
53 53
 
54 54
             return $extension === 'override';
55 55
         });
56 56
 
57
-        $configFile = array_filter($globResult, function (string $file) {
57
+        $configFile = array_filter($globResult, function(string $file) {
58 58
             $extension = pathinfo($file, PATHINFO_EXTENSION);
59 59
 
60 60
             return $extension !== 'override';
Please login to merge, or discard this patch.
src/Config/YamlConfigFileLoader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     {
151 151
         $paths = $this->extractData(self::KEY_COMMAND_PATHS, $rawConfigData, []);
152 152
 
153
-        return array_map(function ($path) use ($file) {
153
+        return array_map(function($path) use ($file) {
154 154
             return $this->fixPath($path, $file);
155 155
         }, $paths);
156 156
     }
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
     {
165 165
         $templates = $this->extractData(self::KEY_TEMPLATES, $rawConfigData, []);
166 166
 
167
-        return array_map(function ($template) use ($file) {
167
+        return array_map(function($template) use ($file) {
168 168
             $template['source'] = $this->fixPath($template['source'], $file);
169 169
             $template['destination'] = $this->makeAbsolutePath($file, $template['destination']);
170 170
 
Please login to merge, or discard this patch.
src/Listing/ScriptFinder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
     {
79 79
         $scripts = $this->getAllScripts();
80 80
 
81
-        return array_filter($scripts, function ($key) use ($query) {
81
+        return array_filter($scripts, function($key) use ($query) {
82 82
             return strpos($key, $query) > -1 || levenshtein($key, $query) < 3;
83 83
         }, ARRAY_FILTER_USE_KEY);
84 84
     }
Please login to merge, or discard this patch.
src/Application/Application.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
     {
211 211
         $countConfigFiles = count($configFiles);
212 212
         for ($i = 0; $i < $countConfigFiles; $i++) {
213
-            $configFiles[$i] = str_replace($this->rootDirectory."/", "", $configFiles[$i]);
213
+            $configFiles[$i] = str_replace($this->rootDirectory . "/", "", $configFiles[$i]);
214 214
         }
215 215
 
216 216
         if (count($configFiles) == 1) {
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 
247 247
         $scripts = $scriptFinder->getAllScripts();
248 248
 
249
-        $commands = array_map(function (Script $script) {
249
+        $commands = array_map(function(Script $script) {
250 250
             return $script->getName();
251 251
         }, $scripts);
252 252
 
Please login to merge, or discard this patch.
src/ScriptRuntime/ScriptLoader/PshScriptParser.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     private function createTokenHandler(): array
66 66
     {
67 67
         return [
68
-            self::TOKEN_INCLUDE => function (string $currentLine, int $lineNumber, Script $script): string {
68
+            self::TOKEN_INCLUDE => function(string $currentLine, int $lineNumber, Script $script): string {
69 69
                 $path = $this->findInclude($script, $this->removeFromStart(self::TOKEN_INCLUDE, $currentLine));
70 70
                 $includeScript = new Script(pathinfo($path, PATHINFO_DIRNAME), pathinfo($path, PATHINFO_BASENAME));
71 71
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                 return '';
76 76
             },
77 77
 
78
-            self::TOKEN_TEMPLATE => function (string $currentLine, int $lineNumber, Script $script): string {
78
+            self::TOKEN_TEMPLATE => function(string $currentLine, int $lineNumber, Script $script): string {
79 79
                 $definition = $this->removeFromStart(self::TOKEN_TEMPLATE, $currentLine);
80 80
                 list($rawSource, $rawDestination) = explode(':', $definition);
81 81
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
                 return '';
89 89
             },
90 90
 
91
-            self::TOKEN_WAIT => function (string $currentLine, int $lineNumber): string {
91
+            self::TOKEN_WAIT => function(string $currentLine, int $lineNumber): string {
92 92
                 $this->commandBuilder
93 93
                     ->addWaitCommand($lineNumber);
94 94
 
@@ -96,25 +96,25 @@  discard block
 block discarded – undo
96 96
                 return '';
97 97
             },
98 98
 
99
-            self::TOKEN_MODIFIER_IGNORE_ERROR => function (string $currentLine): string {
99
+            self::TOKEN_MODIFIER_IGNORE_ERROR => function(string $currentLine): string {
100 100
                 $this->commandBuilder->setIgnoreError();
101 101
 
102 102
                 return $this->removeFromStart(self::TOKEN_MODIFIER_IGNORE_ERROR, $currentLine);
103 103
             },
104 104
 
105
-            self::TOKEN_MODIFIER_TTY => function (string $currentLine): string {
105
+            self::TOKEN_MODIFIER_TTY => function(string $currentLine): string {
106 106
                 $this->commandBuilder->setTty();
107 107
 
108 108
                 return  $this->removeFromStart(self::TOKEN_MODIFIER_TTY, $currentLine);
109 109
             },
110 110
 
111
-            self::TOKEN_MODIFIER_DEFERRED => function (string $currentLine): string {
111
+            self::TOKEN_MODIFIER_DEFERRED => function(string $currentLine): string {
112 112
                 $this->commandBuilder->setDeferredExecution();
113 113
 
114 114
                 return $this->removeFromStart(self::TOKEN_MODIFIER_DEFERRED, $currentLine);
115 115
             },
116 116
 
117
-            self::TOKEN_WILDCARD => function (string $currentLine, int $lineNumber): string {
117
+            self::TOKEN_WILDCARD => function(string $currentLine, int $lineNumber): string {
118 118
                 $this->commandBuilder
119 119
                     ->addProcessCommand($currentLine, $lineNumber);
120 120
 
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 
208 208
             if ($this->startsWith(self::CONCATENATE_PREFIX, $line)) {
209 209
                 $lastValue = array_pop($lines);
210
-                $lines[] = $lastValue  . ' ' . trim($line);
210
+                $lines[] = $lastValue . ' ' . trim($line);
211 211
 
212 212
                 continue;
213 213
             }
Please login to merge, or discard this patch.
src/ScriptRuntime/Execution/ProcessExecutor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      */
185 185
     private function runProcess(Process $process)
186 186
     {
187
-        $process->run(function ($type, $response) {
187
+        $process->run(function($type, $response) {
188 188
             $this->logger->log(new LogMessage($response, $type === Process::ERR));
189 189
         });
190 190
     }
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
     {
263 263
         $deferredProcess = new DeferredProcess($parsedCommand, $command, $process);
264 264
 
265
-        $process->start(function ($type, $response) use ($deferredProcess) {
265
+        $process->start(function($type, $response) use ($deferredProcess) {
266 266
             $deferredProcess->log(new LogMessage($response, $type === Process::ERR));
267 267
         });
268 268
 
Please login to merge, or discard this patch.