@@ -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 |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | public function createTokenHandler(): array |
80 | 80 | { |
81 | 81 | return [ |
82 | - self::TOKEN_ACTION => function (string $currentLine, int $lineNumber, Script $script): string { |
|
82 | + self::TOKEN_ACTION => function(string $currentLine, int $lineNumber, Script $script): string { |
|
83 | 83 | $scriptName = $this->removeFromStart(self::TOKEN_ACTION, $currentLine); |
84 | 84 | $actionScript = $this->scriptFinder->findScriptByName($scriptName); |
85 | 85 | |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | return ''; |
93 | 93 | }, |
94 | 94 | |
95 | - self::TOKEN_INCLUDE => function (string $currentLine, int $lineNumber, Script $script): string { |
|
95 | + self::TOKEN_INCLUDE => function(string $currentLine, int $lineNumber, Script $script): string { |
|
96 | 96 | $path = $this->findInclude($script, $this->removeFromStart(self::TOKEN_INCLUDE, $currentLine)); |
97 | 97 | $includeScript = new Script(pathinfo($path, PATHINFO_DIRNAME), pathinfo($path, PATHINFO_BASENAME)); |
98 | 98 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | return ''; |
103 | 103 | }, |
104 | 104 | |
105 | - self::TOKEN_TEMPLATE => function (string $currentLine, int $lineNumber, Script $script): string { |
|
105 | + self::TOKEN_TEMPLATE => function(string $currentLine, int $lineNumber, Script $script): string { |
|
106 | 106 | $definition = $this->removeFromStart(self::TOKEN_TEMPLATE, $currentLine); |
107 | 107 | list($rawSource, $rawDestination) = explode(':', $definition); |
108 | 108 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | return ''; |
116 | 116 | }, |
117 | 117 | |
118 | - self::TOKEN_WAIT => function (string $currentLine, int $lineNumber): string { |
|
118 | + self::TOKEN_WAIT => function(string $currentLine, int $lineNumber): string { |
|
119 | 119 | $this->commandBuilder |
120 | 120 | ->addWaitCommand($lineNumber); |
121 | 121 | |
@@ -123,25 +123,25 @@ discard block |
||
123 | 123 | return ''; |
124 | 124 | }, |
125 | 125 | |
126 | - self::TOKEN_MODIFIER_IGNORE_ERROR => function (string $currentLine): string { |
|
126 | + self::TOKEN_MODIFIER_IGNORE_ERROR => function(string $currentLine): string { |
|
127 | 127 | $this->commandBuilder->setIgnoreError(); |
128 | 128 | |
129 | 129 | return $this->removeFromStart(self::TOKEN_MODIFIER_IGNORE_ERROR, $currentLine); |
130 | 130 | }, |
131 | 131 | |
132 | - self::TOKEN_MODIFIER_TTY => function (string $currentLine): string { |
|
132 | + self::TOKEN_MODIFIER_TTY => function(string $currentLine): string { |
|
133 | 133 | $this->commandBuilder->setTty(); |
134 | 134 | |
135 | 135 | return $this->removeFromStart(self::TOKEN_MODIFIER_TTY, $currentLine); |
136 | 136 | }, |
137 | 137 | |
138 | - self::TOKEN_MODIFIER_DEFERRED => function (string $currentLine): string { |
|
138 | + self::TOKEN_MODIFIER_DEFERRED => function(string $currentLine): string { |
|
139 | 139 | $this->commandBuilder->setDeferredExecution(); |
140 | 140 | |
141 | 141 | return $this->removeFromStart(self::TOKEN_MODIFIER_DEFERRED, $currentLine); |
142 | 142 | }, |
143 | 143 | |
144 | - self::TOKEN_WILDCARD => function (string $currentLine, int $lineNumber): string { |
|
144 | + self::TOKEN_WILDCARD => function(string $currentLine, int $lineNumber): string { |
|
145 | 145 | $this->commandBuilder |
146 | 146 | ->addProcessCommand($currentLine, $lineNumber); |
147 | 147 | |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | |
235 | 235 | if ($this->startsWith(self::CONCATENATE_PREFIX, $line)) { |
236 | 236 | $lastValue = array_pop($lines); |
237 | - $lines[] = $lastValue . ' ' . trim($line); |
|
237 | + $lines[] = $lastValue . ' ' . trim($line); |
|
238 | 238 | |
239 | 239 | continue; |
240 | 240 | } |