Passed
Push — master ( b8c9e8...c9f558 )
by y
01:25
created
src/DB/Select.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -86,8 +86,7 @@  discard block
 block discarded – undo
86 86
         foreach ($columns as $alias => $name) {
87 87
             if (is_string($alias) and $name !== $alias) {
88 88
                 $this->columns[] = "{$name} AS {$alias}";
89
-            }
90
-            else {
89
+            } else {
91 90
                 $this->columns[] = $name;
92 91
             }
93 92
         }
@@ -177,8 +176,7 @@  discard block
 block discarded – undo
177 176
     public function group (string $column) {
178 177
         if (!strlen($this->_group)) {
179 178
             $this->_group = " GROUP BY {$column}";
180
-        }
181
-        else {
179
+        } else {
182 180
             $this->_group .= ", {$column}";
183 181
         }
184 182
         return $this;
@@ -193,8 +191,7 @@  discard block
 block discarded – undo
193 191
     public function having (string $condition) {
194 192
         if (!strlen($this->_having)) {
195 193
             $this->_having = " HAVING {$condition}";
196
-        }
197
-        else {
194
+        } else {
198 195
             $this->_having .= " AND {$condition}";
199 196
         }
200 197
         return $this;
@@ -226,8 +223,7 @@  discard block
 block discarded – undo
226 223
     public function limit (int $limit, int $offset = 0) {
227 224
         if ($limit == 0) {
228 225
             $this->_limit = '';
229
-        }
230
-        else {
226
+        } else {
231 227
             $this->_limit = " LIMIT {$limit}";
232 228
             if ($offset > 1) {
233 229
                 $this->_limit .= " OFFSET {$offset}";
@@ -318,8 +314,7 @@  discard block
 block discarded – undo
318 314
     public function where (string $condition) {
319 315
         if (!strlen($this->_where)) {
320 316
             $this->_where = " WHERE {$condition}";
321
-        }
322
-        else {
317
+        } else {
323 318
             $this->_where .= " AND {$condition}";
324 319
         }
325 320
         return $this;
Please login to merge, or discard this patch.