Passed
Branch master (af4849)
by y
01:47
created
src/DB/Select.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -276,14 +276,12 @@  discard block
 block discarded – undo
276 276
             if ($column instanceof Column) {
277 277
                 $name = $column->getName();
278 278
                 $column = (string)$column;
279
-            }
280
-            else {
279
+            } else {
281 280
                 $name = $column = (string)$column;
282 281
             }
283 282
             if (is_string($alias) and $alias !== $name) {
284 283
                 $this->columns[$alias] = $column;
285
-            }
286
-            else {
284
+            } else {
287 285
                 $this->columns[$column] = $column;
288 286
             }
289 287
         }
@@ -307,8 +305,7 @@  discard block
 block discarded – undo
307 305
         foreach ($this->columns as $alias => $column) {
308 306
             if ($alias !== $column) {
309 307
                 $columns[] = "{$column} AS {$alias}";
310
-            }
311
-            else {
308
+            } else {
312 309
                 $columns[] = "{$column}";
313 310
             }
314 311
         }
Please login to merge, or discard this patch.
src/DB/Record.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -68,8 +68,7 @@  discard block
 block discarded – undo
68 68
         $this->class = $class;
69 69
         try {
70 70
             $class = new ReflectionClass($class);
71
-        }
72
-        catch (ReflectionException $exception) {
71
+        } catch (ReflectionException $exception) {
73 72
             throw new LogicException('Unexpected ReflectionException', 0, $exception);
74 73
         }
75 74
         $this->proto = $class->newInstanceWithoutConstructor();
@@ -88,8 +87,7 @@  discard block
 block discarded – undo
88 87
                 if (preg_match('/@var\s+(?<type>\S+)/', $doc, $var)) {
89 88
                     $types[$name] = $var['type'];
90 89
                 }
91
-            }
92
-            elseif (preg_match('/@eav\s+(?<table>\S+)/', $doc, $match)) {
90
+            } elseif (preg_match('/@eav\s+(?<table>\S+)/', $doc, $match)) {
93 91
                 $eav[$name] = $match['table'];
94 92
                 $this->properties[$name] = $property;
95 93
             }
@@ -218,8 +216,7 @@  discard block
 block discarded – undo
218 216
     public function save (EntityInterface $entity): int {
219 217
         if (!$entity->getId()) {
220 218
             $this->saveInsert($entity);
221
-        }
222
-        else {
219
+        } else {
223 220
             $this->saveUpdate($entity);
224 221
         }
225 222
         $this->saveEav($entity);
Please login to merge, or discard this patch.
src/DB/SQL.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -74,11 +74,9 @@
 block discarded – undo
74 74
                 $cmp[$k] = static::compare($k, $operator, $v, $subqueryOperator, $listOperator);
75 75
             }
76 76
             return $cmp;
77
-        }
78
-        elseif (is_array($b)) {
77
+        } elseif (is_array($b)) {
79 78
             return "{$a} {$listOperator} (" . implode(',', $b) . ")";
80
-        }
81
-        elseif ($b instanceof Select) {
79
+        } elseif ($b instanceof Select) {
82 80
             return "{$a} {$operator} {$subqueryOperator} ({$b->toSql()})";
83 81
         }
84 82
         return "{$a} {$operator} {$b}";
Please login to merge, or discard this patch.
src/DB/Junction.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,8 +35,7 @@
 block discarded – undo
35 35
         $this->interface = $interface;
36 36
         try {
37 37
             $interface = new ReflectionClass($interface);
38
-        }
39
-        catch (ReflectionException $exception) {
38
+        } catch (ReflectionException $exception) {
40 39
             throw new LogicException('Unexpected ReflectionException', 0, $exception);
41 40
         }
42 41
         $doc = $interface->getDocComment();
Please login to merge, or discard this patch.