Passed
Push — master ( fddfe5...a6d7b3 )
by y
02:19
created
src/DB/Select.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -131,8 +131,7 @@  discard block
 block discarded – undo
131 131
         if ($table instanceof Select) {
132 132
             $this->_table = $table->toSubquery();
133 133
             $this->alias = "_anon{$autoAlias}_{$table->alias}";
134
-        }
135
-        else {
134
+        } else {
136 135
             if (is_string($table)) {
137 136
                 $table = $db->getTable($table);
138 137
                 assert(isset($table));
@@ -264,8 +263,7 @@  discard block
 block discarded – undo
264 263
     public function group (string $column) {
265 264
         if (!strlen($this->_group)) {
266 265
             $this->_group = " GROUP BY {$column}";
267
-        }
268
-        else {
266
+        } else {
269 267
             $this->_group .= ", {$column}";
270 268
         }
271 269
         return $this;
@@ -282,8 +280,7 @@  discard block
 block discarded – undo
282 280
         $conditions = implode(' AND ', $conditions);
283 281
         if (!strlen($this->_having)) {
284 282
             $this->_having = " HAVING {$conditions}";
285
-        }
286
-        else {
283
+        } else {
287 284
             $this->_having .= " AND {$conditions}";
288 285
         }
289 286
         return $this;
@@ -375,8 +372,7 @@  discard block
 block discarded – undo
375 372
     public function limit (int $limit, int $offset = 0) {
376 373
         if ($limit == 0) {
377 374
             $this->_limit = '';
378
-        }
379
-        else {
375
+        } else {
380 376
             $this->_limit = " LIMIT {$limit}";
381 377
             if ($offset > 1) {
382 378
                 $this->_limit .= " OFFSET {$offset}";
@@ -451,8 +447,7 @@  discard block
 block discarded – undo
451 447
             $name = $match['name'] ?? null;
452 448
             if (is_int($alias)) {
453 449
                 $alias = $name;
454
-            }
455
-            elseif ($alias !== $name) {
450
+            } elseif ($alias !== $name) {
456 451
                 $expr .= " AS {$alias}";
457 452
             }
458 453
             if (isset($alias)) {
@@ -538,8 +533,7 @@  discard block
 block discarded – undo
538 533
         $conditions = implode(' AND ', $conditions);
539 534
         if (!strlen($this->_where)) {
540 535
             $this->_where = " WHERE {$conditions}";
541
-        }
542
-        else {
536
+        } else {
543 537
             $this->_where .= " AND {$conditions}";
544 538
         }
545 539
         return $this;
Please login to merge, or discard this patch.