Passed
Push — master ( e21e2a...b8c9e8 )
by y
01:28
created
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.
src/DB/Record.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -66,8 +66,7 @@  discard block
 block discarded – undo
66 66
         $this->class = $class;
67 67
         try {
68 68
             $class = new ReflectionClass($class);
69
-        }
70
-        catch (ReflectionException $exception) {
69
+        } catch (ReflectionException $exception) {
71 70
             throw new LogicException('Unexpected ReflectionException', 0, $exception);
72 71
         }
73 72
         $this->proto = $class->newInstanceWithoutConstructor();
@@ -84,8 +83,7 @@  discard block
 block discarded – undo
84 83
                 if (preg_match('/@var\s+(?<type>[a-z]+)[\s$]/', $doc, $match)) {
85 84
                     $types[$name] = $match['type'];
86 85
                 }
87
-            }
88
-            elseif (preg_match('/@eav\s+(?<table>\S+)/', $doc, $match)) {
86
+            } elseif (preg_match('/@eav\s+(?<table>\S+)/', $doc, $match)) {
89 87
                 $eav[$name] = $match['table'];
90 88
                 $this->properties[$name] = $property;
91 89
             }
@@ -213,8 +211,7 @@  discard block
 block discarded – undo
213 211
     public function save (EntityInterface $entity): int {
214 212
         if (!$entity->getId()) {
215 213
             $this->saveInsert($entity);
216
-        }
217
-        else {
214
+        } else {
218 215
             $this->saveUpdate($entity);
219 216
         }
220 217
         $this->saveEav($entity);
Please login to merge, or discard this patch.
src/DB/SQL/ComparisonTrait.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@
 block discarded – undo
29 29
     public function is ($arg): Predicate {
30 30
         if ($arg === null or is_bool($arg)) {
31 31
             $arg = ['' => 'NULL', 1 => 'TRUE', 0 => 'FALSE'][$arg];
32
-        }
33
-        else {
32
+        } else {
34 33
             $arg = $this->db->quote($arg);
35 34
         }
36 35
         $oper = ['mysql' => '<=>', 'sqlite' => 'IS'][$this->db->getDriver()];
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
@@ -60,8 +60,7 @@
 block discarded – undo
60 60
     public static function compare ($a, $b, $oper = '=', $subOper = 'ANY', $listOper = 'IN') {
61 61
         if (is_array($b)) {
62 62
             return new static("{$a} {$listOper} (" . implode(',', $b) . ")");
63
-        }
64
-        elseif ($b instanceof Select) {
63
+        } elseif ($b instanceof Select) {
65 64
             return new static("{$a} {$oper} {$subOper} ({$b->toSql()})");
66 65
         }
67 66
         return new static("{$a} {$oper} {$b}");
Please login to merge, or discard this patch.
src/DB/Select.php 1 patch
Braces   +3 added lines, -6 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;
@@ -221,8 +219,7 @@  discard block
 block discarded – undo
221 219
     public function limit (int $limit, int $offset = 0) {
222 220
         if ($limit == 0) {
223 221
             $this->_limit = '';
224
-        }
225
-        else {
222
+        } else {
226 223
             $this->_limit = " LIMIT {$limit}";
227 224
             if ($offset > 1) {
228 225
                 $this->_limit .= " OFFSET {$offset}";
Please login to merge, or discard this patch.