Completed
Pull Request — master (#106)
by Jan Philipp
01:58
created
src/Application/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -245,7 +245,7 @@
 block discarded – undo
245 245
 
246 246
         $scripts = $scriptFinder->getAllScripts();
247 247
 
248
-        $commands = array_map(function (Script $script) {
248
+        $commands = array_map(function(Script $script) {
249 249
             return $script->getName();
250 250
         }, $scripts);
251 251
 
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
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
     private function runProcess(Process $process)
169 169
     {
170
-        $process->run(function ($type, $response) {
170
+        $process->run(function($type, $response) {
171 171
             $this->logger->log(new LogMessage($response, $type === Process::ERR));
172 172
         });
173 173
     }
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
     {
231 231
         $deferredProcess = new DeferredProcess($parsedCommand, $command, $process);
232 232
 
233
-        $process->start(function ($type, $response) use ($deferredProcess) {
233
+        $process->start(function($type, $response) use ($deferredProcess) {
234 234
             $deferredProcess->log(new LogMessage($response, $type === Process::ERR));
235 235
         });
236 236
 
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
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     private function createTokenHandler(ScriptLoader $loader): array
80 80
     {
81 81
         return [
82
-            self::TOKEN_ACTION => function (string $currentLine) use ($loader): string {
82
+            self::TOKEN_ACTION => function(string $currentLine) use ($loader): string {
83 83
                 $scriptName = $this->removeFromStart(self::TOKEN_ACTION, $currentLine);
84 84
                 $actionScript = $this->scriptFinder->findScriptByName($scriptName);
85 85
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
                 return '';
90 90
             },
91 91
 
92
-            self::TOKEN_INCLUDE => function (string $currentLine, int $lineNumber, Script $script) use ($loader): string {
92
+            self::TOKEN_INCLUDE => function(string $currentLine, int $lineNumber, Script $script) use ($loader): string {
93 93
                 $path = $this->findInclude($script, $this->removeFromStart(self::TOKEN_INCLUDE, $currentLine));
94 94
                 $includeScript = new Script(pathinfo($path, \PATHINFO_DIRNAME), pathinfo($path, \PATHINFO_BASENAME));
95 95
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                 return '';
100 100
             },
101 101
 
102
-            self::TOKEN_TEMPLATE => function (string $currentLine, int $lineNumber, Script $script): string {
102
+            self::TOKEN_TEMPLATE => function(string $currentLine, int $lineNumber, Script $script): string {
103 103
                 $definition = $this->removeFromStart(self::TOKEN_TEMPLATE, $currentLine);
104 104
                 list($rawSource, $rawDestination) = explode(':', $definition);
105 105
 
@@ -112,32 +112,32 @@  discard block
 block discarded – undo
112 112
                 return '';
113 113
             },
114 114
 
115
-            self::TOKEN_WAIT => function (string $currentLine, int $lineNumber): string {
115
+            self::TOKEN_WAIT => function(string $currentLine, int $lineNumber): string {
116 116
                 $this->commandBuilder
117 117
                     ->addWaitCommand($lineNumber);
118 118
 
119 119
                 return '';
120 120
             },
121 121
 
122
-            self::TOKEN_MODIFIER_IGNORE_ERROR => function (string $currentLine): string {
122
+            self::TOKEN_MODIFIER_IGNORE_ERROR => function(string $currentLine): string {
123 123
                 $this->commandBuilder->setIgnoreError();
124 124
 
125 125
                 return $this->removeFromStart(self::TOKEN_MODIFIER_IGNORE_ERROR, $currentLine);
126 126
             },
127 127
 
128
-            self::TOKEN_MODIFIER_TTY => function (string $currentLine): string {
128
+            self::TOKEN_MODIFIER_TTY => function(string $currentLine): string {
129 129
                 $this->commandBuilder->setTty();
130 130
 
131 131
                 return  $this->removeFromStart(self::TOKEN_MODIFIER_TTY, $currentLine);
132 132
             },
133 133
 
134
-            self::TOKEN_MODIFIER_DEFERRED => function (string $currentLine): string {
134
+            self::TOKEN_MODIFIER_DEFERRED => function(string $currentLine): string {
135 135
                 $this->commandBuilder->setDeferredExecution();
136 136
 
137 137
                 return $this->removeFromStart(self::TOKEN_MODIFIER_DEFERRED, $currentLine);
138 138
             },
139 139
 
140
-            self::TOKEN_WILDCARD => function (string $currentLine, int $lineNumber): string {
140
+            self::TOKEN_WILDCARD => function(string $currentLine, int $lineNumber): string {
141 141
                 $this->commandBuilder
142 142
                     ->addProcessCommand($currentLine, $lineNumber);
143 143
 
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
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
     {
80 80
         $scripts = $this->getAllScripts();
81 81
 
82
-        return array_filter($scripts, function ($key) use ($query) {
82
+        return array_filter($scripts, function($key) use ($query) {
83 83
             return mb_strpos($key, $query) > -1 || levenshtein($key, $query) < 3;
84 84
         }, ARRAY_FILTER_USE_KEY);
85 85
     }
Please login to merge, or discard this patch.