Passed
Push — master ( f1a1e2...f05bc6 )
by Dominik
02:35
created
src/Generator/QueryBuilderGenerator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
         $structuredLines = [];
173 173
 
174 174
         foreach ($lines as $i => $line) {
175
-            $lastLine = $lines[$i-1] ?? '';
175
+            $lastLine = $lines[$i - 1] ?? '';
176 176
             $this->structuredLine($line, $lastLine, $position, $structuredLines);
177 177
         }
178 178
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
      * @param int $position
198 198
      * @param array $structuredLines
199 199
      */
200
-    private function structuredLine(string $line, string $lastLine, int &$position, array &$structuredLines)
200
+    private function structuredLine(string $line, string $lastLine, int & $position, array &$structuredLines)
201 201
     {
202 202
         if (0 === strpos($line, '->add')) {
203 203
             $this->structureAddLine($line, $lastLine, $position, $structuredLines);
@@ -214,13 +214,13 @@  discard block
 block discarded – undo
214 214
      * @param int $position
215 215
      * @param array $structuredLines
216 216
      */
217
-    private function structureAddLine(string $line, string $lastLine, int &$position, array &$structuredLines)
217
+    private function structureAddLine(string $line, string $lastLine, int & $position, array &$structuredLines)
218 218
     {
219 219
         if (false === strpos($lastLine, '->end') && false === strpos($lastLine, '->scalarNode')) {
220 220
             $position++;
221 221
         }
222 222
 
223
-        $structuredLines[] = str_pad('', $position * 4) . $line;
223
+        $structuredLines[] = str_pad('', $position * 4).$line;
224 224
     }
225 225
 
226 226
     /**
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
      * @param int $position
230 230
      * @param array $structuredLines
231 231
      */
232
-    private function structureEndLine(string $line, string $lastLine, int &$position, array &$structuredLines)
232
+    private function structureEndLine(string $line, string $lastLine, int & $position, array &$structuredLines)
233 233
     {
234 234
         if (strpos($lastLine, '->objectNode') || strpos($lastLine, '->arrayNode')) {
235 235
             $structuredLines[count($structuredLines) - 1] .= '->end()';
@@ -239,6 +239,6 @@  discard block
 block discarded – undo
239 239
 
240 240
         $position--;
241 241
 
242
-        $structuredLines[] = str_pad('', $position * 4) . $line;
242
+        $structuredLines[] = str_pad('', $position * 4).$line;
243 243
     }
244 244
 }
Please login to merge, or discard this patch.