@@ -42,7 +42,7 @@ |
||
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 | { |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | { |
159 | 159 | $paths = $this->extractData($key, $rawConfigData, []); |
160 | 160 | |
161 | - return array_map(function ($path) use ($file) { |
|
161 | + return array_map(function($path) use ($file) { |
|
162 | 162 | return $this->fixPath($path, $file); |
163 | 163 | }, $paths); |
164 | 164 | } |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | { |
173 | 173 | $templates = $this->extractData(self::KEY_TEMPLATES, $rawConfigData, []); |
174 | 174 | |
175 | - return array_map(function ($template) use ($file) { |
|
175 | + return array_map(function($template) use ($file) { |
|
176 | 176 | $template['source'] = $this->fixPath($template['source'], $file); |
177 | 177 | $template['destination'] = $this->makeAbsolutePath($file, $template['destination']); |
178 | 178 |
@@ -80,7 +80,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -103,7 +103,7 @@ |
||
103 | 103 | } |
104 | 104 | |
105 | 105 | /** |
106 | - * @param string|null $environmentString |
|
106 | + * @param string|null $environment |
|
107 | 107 | * |
108 | 108 | * @return ScriptPath[] |
109 | 109 | */ |
@@ -114,7 +114,7 @@ |
||
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 | } |