@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Saxulum\ElasticSearchQueryBuilder\Generator; |
| 6 | 6 | |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | * @param int $position |
| 187 | 187 | * @param array $structuredLines |
| 188 | 188 | */ |
| 189 | - private function structuredLine(string $line, string $lastStructuredLine, int &$position, array &$structuredLines) |
|
| 189 | + private function structuredLine(string $line, string $lastStructuredLine, int & $position, array &$structuredLines) |
|
| 190 | 190 | { |
| 191 | 191 | if (0 === strpos($line, '->add') && |
| 192 | 192 | false === strpos($lastStructuredLine, ' )') && |
@@ -207,14 +207,14 @@ discard block |
||
| 207 | 207 | $prefix = str_pad('', $position * 4); |
| 208 | 208 | |
| 209 | 209 | if ($braceCount > 2) { |
| 210 | - $structuredLines[] = $prefix . substr($line, 0, - ($braceCount - 2)); |
|
| 210 | + $structuredLines[] = $prefix.substr($line, 0, - ($braceCount - 2)); |
|
| 211 | 211 | } else { |
| 212 | - $structuredLines[] = $prefix . $line; |
|
| 212 | + $structuredLines[] = $prefix.$line; |
|
| 213 | 213 | } |
| 214 | 214 | |
| 215 | 215 | while ($braceCount-- > 2) { |
| 216 | 216 | $position--; |
| 217 | - $structuredLines[] = str_pad('', $position * 4) . ')'; |
|
| 217 | + $structuredLines[] = str_pad('', $position * 4).')'; |
|
| 218 | 218 | } |
| 219 | 219 | } |
| 220 | 220 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Saxulum\ElasticSearchQueryBuilder\Generator; |
| 6 | 6 | |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | $structuredLines = []; |
| 171 | 171 | |
| 172 | 172 | foreach ($lines as $i => $line) { |
| 173 | - $lastLine = $lines[$i-1] ?? ''; |
|
| 173 | + $lastLine = $lines[$i - 1] ?? ''; |
|
| 174 | 174 | $this->structuredLine($line, $lastLine, $position, $structuredLines); |
| 175 | 175 | } |
| 176 | 176 | |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | * @param int $position |
| 196 | 196 | * @param array $structuredLines |
| 197 | 197 | */ |
| 198 | - private function structuredLine(string $line, string $lastLine, int &$position, array &$structuredLines) |
|
| 198 | + private function structuredLine(string $line, string $lastLine, int & $position, array &$structuredLines) |
|
| 199 | 199 | { |
| 200 | 200 | if (0 === strpos($line, '->add')) { |
| 201 | 201 | if (false === strpos($lastLine, '->end') && |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | $position++; |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | - $structuredLines[] = str_pad('', $position * 4) . $line; |
|
| 210 | + $structuredLines[] = str_pad('', $position * 4).$line; |
|
| 211 | 211 | |
| 212 | 212 | return; |
| 213 | 213 | } |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | |
| 222 | 222 | $position--; |
| 223 | 223 | |
| 224 | - $structuredLines[] = str_pad('', $position * 4) . $line; |
|
| 224 | + $structuredLines[] = str_pad('', $position * 4).$line; |
|
| 225 | 225 | |
| 226 | 226 | return; |
| 227 | 227 | } |