@@ -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 | |
@@ -69,18 +69,18 @@ discard block |
||
| 69 | 69 | $structuredLines = []; |
| 70 | 70 | |
| 71 | 71 | foreach ($lines as $i => $line) { |
| 72 | - $lastLine = $lines[$i-1] ?? ''; |
|
| 72 | + $lastLine = $lines[$i - 1] ?? ''; |
|
| 73 | 73 | if (0 === strpos($line, '->add')) { |
| 74 | 74 | if (false === strpos($lastLine, '->end') && false === strpos($lastLine, '->scalarNode')) { |
| 75 | 75 | $position++; |
| 76 | 76 | } |
| 77 | - $structuredLines[] = str_pad('', $position * 4) . $line; |
|
| 77 | + $structuredLines[] = str_pad('', $position * 4).$line; |
|
| 78 | 78 | } elseif (0 === strpos($line, '->end')) { |
| 79 | 79 | if (strpos($lastLine, '->objectNode') || strpos($lastLine, '->arrayNode')) { |
| 80 | 80 | $structuredLines[count($structuredLines) - 1] .= '->end()'; |
| 81 | 81 | } else { |
| 82 | 82 | $position--; |
| 83 | - $structuredLines[] = str_pad('', $position * 4) . $line; |
|
| 83 | + $structuredLines[] = str_pad('', $position * 4).$line; |
|
| 84 | 84 | } |
| 85 | 85 | } else { |
| 86 | 86 | $structuredLines[] = $line; |
@@ -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 | |
@@ -82,14 +82,14 @@ discard block |
||
| 82 | 82 | } |
| 83 | 83 | $prefix = str_pad('', $position * 4); |
| 84 | 84 | if ($braceCount > 2) { |
| 85 | - $structuredLines[] = $prefix . substr($line, 0, - ($braceCount - 2)); |
|
| 85 | + $structuredLines[] = $prefix.substr($line, 0, - ($braceCount - 2)); |
|
| 86 | 86 | } else { |
| 87 | - $structuredLines[] = $prefix . $line; |
|
| 87 | + $structuredLines[] = $prefix.$line; |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | while ($braceCount-- > 2) { |
| 91 | 91 | $position--; |
| 92 | - $structuredLines[] = str_pad('', $position * 4) . ')'; |
|
| 92 | + $structuredLines[] = str_pad('', $position * 4).')'; |
|
| 93 | 93 | } |
| 94 | 94 | } |
| 95 | 95 | |