Completed
Pull Request — master (#86)
by Jan Philipp
03:58
created
src/Config/ConfigFileFinder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,19 +48,19 @@
 block discarded – undo
48 48
             return $globResult;
49 49
         }
50 50
 
51
-        $overrideFiles = array_filter($globResult, function (string $file) {
51
+        $overrideFiles = 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
-        $distFiles = array_filter($globResult, function (string $file) {
57
+        $distFiles = array_filter($globResult, function(string $file) {
58 58
             $extension = pathinfo($file, PATHINFO_EXTENSION);
59 59
 
60 60
             return $extension === 'dist';
61 61
         });
62 62
 
63
-        $configFiles = array_filter($globResult, function (string $file) {
63
+        $configFiles = array_filter($globResult, function(string $file) {
64 64
             $extension = pathinfo($file, PATHINFO_EXTENSION);
65 65
 
66 66
             return $extension !== 'override' && $extension !== 'dist';
Please login to merge, or discard this patch.
src/Config/XmlConfigFileLoader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     {
157 157
         $pathNodes = $this->extractNodes(self::NODE_PATH, $pshConfigNode);
158 158
 
159
-        return array_map(function (DOMElement $path) use ($file) {
159
+        return array_map(function(DOMElement $path) use ($file) {
160 160
             return $this->fixPath($this->applicationRootDirectory, $path->nodeValue, $file);
161 161
         }, $pathNodes);
162 162
     }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
     {
171 171
         $templates = $this->extractNodes(self::NODE_TEMPLATE, $pshConfigNodes);
172 172
 
173
-        return array_map(function (DOMElement $template) use ($file) {
173
+        return array_map(function(DOMElement $template) use ($file) {
174 174
             return [
175 175
                 'source' => $this->fixPath(
176 176
                     $this->applicationRootDirectory,
Please login to merge, or discard this patch.
src/ScriptRuntime/ProcessEnvironment.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      * @param array $constants
43 43
      * @param array $variables
44 44
      * @param array $templates
45
-     * @param array $dotenvPaths
45
+     * @param ScriptPath[] $dotenvPaths
46 46
      */
47 47
     public function __construct(array $constants, array $variables, array $templates, array $dotenvPaths)
48 48
     {
Please login to merge, or discard this patch.
src/ScriptRuntime/ScriptLoader.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     public function createTokenHandler(): array
81 81
     {
82 82
         return [
83
-            self::TOKEN_ACTION => function (string $currentLine): string {
83
+            self::TOKEN_ACTION => function(string $currentLine): string {
84 84
                 $scriptName = $this->removeFromStart(self::TOKEN_ACTION, $currentLine);
85 85
                 $actionScript = $this->scriptFinder->findScriptByName($scriptName);
86 86
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                 return '';
91 91
             },
92 92
 
93
-            self::TOKEN_INCLUDE => function (string $currentLine, int $lineNumber, Script $script): string {
93
+            self::TOKEN_INCLUDE => function(string $currentLine, int $lineNumber, Script $script): string {
94 94
                 $path = $this->findInclude($script, $this->removeFromStart(self::TOKEN_INCLUDE, $currentLine));
95 95
                 $includeScript = new Script(pathinfo($path, PATHINFO_DIRNAME), pathinfo($path, PATHINFO_BASENAME));
96 96
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
                 return '';
101 101
             },
102 102
 
103
-            self::TOKEN_TEMPLATE => function (string $currentLine, int $lineNumber, Script $script): string {
103
+            self::TOKEN_TEMPLATE => function(string $currentLine, int $lineNumber, Script $script): string {
104 104
                 $definition = $this->removeFromStart(self::TOKEN_TEMPLATE, $currentLine);
105 105
                 list($rawSource, $rawDestination) = explode(':', $definition);
106 106
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
                 return '';
114 114
             },
115 115
 
116
-            self::TOKEN_WAIT => function (string $currentLine, int $lineNumber): string {
116
+            self::TOKEN_WAIT => function(string $currentLine, int $lineNumber): string {
117 117
                 $this->commandBuilder
118 118
                     ->addWaitCommand($lineNumber);
119 119
 
@@ -121,25 +121,25 @@  discard block
 block discarded – undo
121 121
                 return '';
122 122
             },
123 123
 
124
-            self::TOKEN_MODIFIER_IGNORE_ERROR => function (string $currentLine): string {
124
+            self::TOKEN_MODIFIER_IGNORE_ERROR => function(string $currentLine): string {
125 125
                 $this->commandBuilder->setIgnoreError();
126 126
 
127 127
                 return $this->removeFromStart(self::TOKEN_MODIFIER_IGNORE_ERROR, $currentLine);
128 128
             },
129 129
 
130
-            self::TOKEN_MODIFIER_TTY => function (string $currentLine): string {
130
+            self::TOKEN_MODIFIER_TTY => function(string $currentLine): string {
131 131
                 $this->commandBuilder->setTty();
132 132
 
133 133
                 return  $this->removeFromStart(self::TOKEN_MODIFIER_TTY, $currentLine);
134 134
             },
135 135
 
136
-            self::TOKEN_MODIFIER_DEFERRED => function (string $currentLine): string {
136
+            self::TOKEN_MODIFIER_DEFERRED => function(string $currentLine): string {
137 137
                 $this->commandBuilder->setDeferredExecution();
138 138
 
139 139
                 return $this->removeFromStart(self::TOKEN_MODIFIER_DEFERRED, $currentLine);
140 140
             },
141 141
 
142
-            self::TOKEN_WILDCARD => function (string $currentLine, int $lineNumber): string {
142
+            self::TOKEN_WILDCARD => function(string $currentLine, int $lineNumber): string {
143 143
                 $this->commandBuilder
144 144
                     ->addProcessCommand($currentLine, $lineNumber);
145 145
 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 
233 233
             if ($this->startsWith(self::CONCATENATE_PREFIX, $line)) {
234 234
                 $lastValue = array_pop($lines);
235
-                $lines[] = $lastValue  . ' ' . trim($line);
235
+                $lines[] = $lastValue . ' ' . trim($line);
236 236
 
237 237
                 continue;
238 238
             }
Please login to merge, or discard this patch.
src/Config/Config.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
     }
104 104
 
105 105
     /**
106
-     * @param string|null $environmentString
106
+     * @param string|null $environment
107 107
      *
108 108
      * @return ScriptPath[]
109 109
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
             [$this->getEnvironment($environment), 'getDotenvPaths']
115 115
         );
116 116
 
117
-        return array_map(function (string $path): ScriptPath {
117
+        return array_map(function(string $path): ScriptPath {
118 118
             return new ScriptPath($path, null);
119 119
         }, $paths);
120 120
     }
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
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
     {
152 152
         $paths = $this->extractData($key, $rawConfigData, []);
153 153
 
154
-        return array_map(function ($path) use ($file) {
154
+        return array_map(function($path) use ($file) {
155 155
             return $this->fixPath($this->applicationRootDirectory, $path, $file);
156 156
         }, $paths);
157 157
     }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     {
166 166
         $templates = $this->extractData(self::KEY_TEMPLATES, $rawConfigData, []);
167 167
 
168
-        return array_map(function ($template) use ($file) {
168
+        return array_map(function($template) use ($file) {
169 169
             $template['source'] = $this->fixPath($this->applicationRootDirectory, $template['source'], $file);
170 170
             $template['destination'] = $this->makeAbsolutePath($file, $template['destination']);
171 171
 
Please login to merge, or discard this patch.