Passed
Push — master ( 5500dc...c55c4a )
by y
01:27
created
src/DB/Select.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -108,8 +108,7 @@  discard block
 block discarded – undo
108 108
         if ($table instanceof Select) {
109 109
             $this->table = $table->toSubquery();
110 110
             $this->alias = uniqid('_') . "_{$table->alias}";
111
-        }
112
-        else {
111
+        } else {
113 112
             $this->table = (string)$table;
114 113
             $this->alias = uniqid('_') . "__{$table}";
115 114
         }
@@ -219,8 +218,7 @@  discard block
 block discarded – undo
219 218
     public function group (string $column) {
220 219
         if (!strlen($this->_group)) {
221 220
             $this->_group = " GROUP BY {$column}";
222
-        }
223
-        else {
221
+        } else {
224 222
             $this->_group .= ", {$column}";
225 223
         }
226 224
         return $this;
@@ -235,8 +233,7 @@  discard block
 block discarded – undo
235 233
     public function having (string $condition) {
236 234
         if (!strlen($this->_having)) {
237 235
             $this->_having = " HAVING {$condition}";
238
-        }
239
-        else {
236
+        } else {
240 237
             $this->_having .= " AND {$condition}";
241 238
         }
242 239
         return $this;
@@ -286,8 +283,7 @@  discard block
 block discarded – undo
286 283
     public function limit (int $limit, int $offset = 0) {
287 284
         if ($limit == 0) {
288 285
             $this->_limit = '';
289
-        }
290
-        else {
286
+        } else {
291 287
             $this->_limit = " LIMIT {$limit}";
292 288
             if ($offset > 1) {
293 289
                 $this->_limit .= " OFFSET {$offset}";
@@ -366,8 +362,7 @@  discard block
 block discarded – undo
366 362
             }
367 363
             if ($name === $alias) {
368 364
                 $_columns[] = "{$column}";
369
-            }
370
-            else {
365
+            } else {
371 366
                 $_columns[] = "{$column} AS {$alias}";
372 367
             }
373 368
             $i++;
@@ -419,8 +414,7 @@  discard block
 block discarded – undo
419 414
     public function where (string $condition) {
420 415
         if (!strlen($this->_where)) {
421 416
             $this->_where = " WHERE {$condition}";
422
-        }
423
-        else {
417
+        } else {
424 418
             $this->_where .= " AND {$condition}";
425 419
         }
426 420
         return $this;
Please login to merge, or discard this patch.
src/DB/SQL/Predicate.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@
 block discarded – undo
59 59
     public static function compare ($a, $b, $oper = '=', $multiOper = 'IN') {
60 60
         if (is_array($b)) {
61 61
             return new static("{$a} {$multiOper} (" . implode(',', $b) . ")");
62
-        }
63
-        elseif ($b instanceof Select) {
62
+        } elseif ($b instanceof Select) {
64 63
             return new static("{$a} {$multiOper} ({$b->toSql()})");
65 64
         }
66 65
         return new static("{$a} {$oper} {$b}");
Please login to merge, or discard this patch.