Completed
Push — 2.0 ( bddf1c...cf26ac )
by Vermeulen
02:20
created
src/class/SqlSelect.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
      * 
152 152
      * @return \BfwSql\SqlSelect
153 153
      */
154
-    public function from($table, $columns='*')
154
+    public function from($table, $columns = '*')
155 155
     {
156 156
         $this->mainTable = $this->obtainTableInfos($table);
157 157
         
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
      * 
244 244
      * @return \BfwSql\SqlSelect
245 245
      */
246
-    public function join($table, $joinOn, $joinColumns='*')
246
+    public function join($table, $joinOn, $joinColumns = '*')
247 247
     {
248 248
         return $this->createJoin('join', $table, $joinOn, $joinColumns);
249 249
     }
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
      * 
260 260
      * @return \BfwSql\SqlSelect
261 261
      */
262
-    public function joinLeft($table, $joinOn, $joinColumns='*')
262
+    public function joinLeft($table, $joinOn, $joinColumns = '*')
263 263
     {
264 264
         return $this->createJoin('joinLeft', $table, $joinOn, $joinColumns);
265 265
     }
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
      * 
276 276
      * @return \BfwSql\SqlSelect
277 277
      */
278
-    public function joinRight($table, $joinOn, $joinColumns='*')
278
+    public function joinRight($table, $joinOn, $joinColumns = '*')
279 279
     {
280 280
         return $this->createJoin('joinRight', $table, $joinOn, $joinColumns);
281 281
     }
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
         $result  = [];
365 365
         $request = $this->execute(); //throw an Exception if error
366 366
         
367
-        while($row = $request->fetch($this->obtainPdoFetchType()))
367
+        while ($row = $request->fetch($this->obtainPdoFetchType()))
368 368
         {
369 369
             $result[] = $row;
370 370
         }
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
     protected function generateSelect()
399 399
     {
400 400
         $select = '';
401
-        foreach($this->select as $columnInfos)
401
+        foreach ($this->select as $columnInfos)
402 402
         {
403 403
             if ($select != '') {
404 404
                 $select .= ', ';
@@ -406,11 +406,11 @@  discard block
 block discarded – undo
406 406
             
407 407
             $select .= $columnInfos->column;
408 408
             if ($columnInfos->shortcut !== null) {
409
-                $select. ' AS '.$columnInfos->shortcut;
409
+                $select.' AS '.$columnInfos->shortcut;
410 410
             }
411 411
         }
412 412
         
413
-        foreach($this->subQueries as $subQueryInfos)
413
+        foreach ($this->subQueries as $subQueryInfos)
414 414
         {
415 415
             if ($select != '') {
416 416
                 $select .= ', ';
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
             $joinSqlName = ' RIGHT JOIN ';
462 462
         }
463 463
 
464
-        foreach($this->{$joinProperty} as $joinInfos)
464
+        foreach ($this->{$joinProperty} as $joinInfos)
465 465
         {
466 466
             $join .= $joinSqlName.'`'.$joinInfos->tableName.'`';
467 467
             if ($joinInfos->shortcut !== null) {
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
         }
510 510
         
511 511
         $group = ' GROUP BY ';
512
-        foreach($this->group as $groupCondition)
512
+        foreach ($this->group as $groupCondition)
513 513
         {
514 514
             if ($group != ' GROUP BY ') {
515 515
                 $group .= ', ';
Please login to merge, or discard this patch.