Completed
Pull Request — master (#80)
by Jan Philipp
01:46
created
src/ScriptRuntime/ScriptLoader.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     public function createTokenHandler(): array
67 67
     {
68 68
         return [
69
-            self::TOKEN_INCLUDE => function (string $currentLine, int $lineNumber, Script $script): string {
69
+            self::TOKEN_INCLUDE => function(string $currentLine, int $lineNumber, Script $script): string {
70 70
                 $path = $this->findInclude($script, $this->removeFromStart(self::TOKEN_INCLUDE, $currentLine));
71 71
                 $includeScript = new Script(pathinfo($path, PATHINFO_DIRNAME), pathinfo($path, PATHINFO_BASENAME));
72 72
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
                 return '';
77 77
             },
78 78
 
79
-            self::TOKEN_TEMPLATE => function (string $currentLine, int $lineNumber, Script $script): string {
79
+            self::TOKEN_TEMPLATE => function(string $currentLine, int $lineNumber, Script $script): string {
80 80
                 $definition = $this->removeFromStart(self::TOKEN_TEMPLATE, $currentLine);
81 81
                 list($rawSource, $rawDestination) = explode(':', $definition);
82 82
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
                 return '';
90 90
             },
91 91
 
92
-            self::TOKEN_WAIT => function (string $currentLine, int $lineNumber): string {
92
+            self::TOKEN_WAIT => function(string $currentLine, int $lineNumber): string {
93 93
                 $this->commandBuilder
94 94
                     ->addWaitCommand($lineNumber);
95 95
 
@@ -97,25 +97,25 @@  discard block
 block discarded – undo
97 97
                 return '';
98 98
             },
99 99
 
100
-            self::TOKEN_MODIFIER_IGNORE_ERROR => function (string $currentLine): string {
100
+            self::TOKEN_MODIFIER_IGNORE_ERROR => function(string $currentLine): string {
101 101
                 $this->commandBuilder->setIgnoreError();
102 102
 
103 103
                 return $this->removeFromStart(self::TOKEN_MODIFIER_IGNORE_ERROR, $currentLine);
104 104
             },
105 105
 
106
-            self::TOKEN_MODIFIER_TTY => function (string $currentLine): string {
106
+            self::TOKEN_MODIFIER_TTY => function(string $currentLine): string {
107 107
                 $this->commandBuilder->setTty();
108 108
 
109 109
                 return  $this->removeFromStart(self::TOKEN_MODIFIER_TTY, $currentLine);
110 110
             },
111 111
 
112
-            self::TOKEN_MODIFIER_DEFERRED => function (string $currentLine): string {
112
+            self::TOKEN_MODIFIER_DEFERRED => function(string $currentLine): string {
113 113
                 $this->commandBuilder->setDeferredExecution();
114 114
 
115 115
                 return $this->removeFromStart(self::TOKEN_MODIFIER_DEFERRED, $currentLine);
116 116
             },
117 117
 
118
-            self::TOKEN_WILDCARD => function (string $currentLine, int $lineNumber): string {
118
+            self::TOKEN_WILDCARD => function(string $currentLine, int $lineNumber): string {
119 119
                 $this->commandBuilder
120 120
                     ->addProcessCommand($currentLine, $lineNumber);
121 121
 
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 
209 209
             if ($this->startsWith(self::CONCATENATE_PREFIX, $line)) {
210 210
                 $lastValue = array_pop($lines);
211
-                $lines[] = $lastValue  . ' ' . trim($line);
211
+                $lines[] = $lastValue . ' ' . trim($line);
212 212
 
213 213
                 continue;
214 214
             }
Please login to merge, or discard this patch.
src/ScriptRuntime/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.