Passed
Push — master ( 6822a9...ff844e )
by y
01:33
created
src/DB/Record.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -62,8 +62,7 @@  discard block
 block discarded – undo
62 62
     public static function fromClass (DB $db, $class) {
63 63
         try {
64 64
             $rClass = new ReflectionClass($class);
65
-        }
66
-        catch (ReflectionException $exception) {
65
+        } catch (ReflectionException $exception) {
67 66
             throw new LogicException('Unexpected ReflectionException', 0, $exception);
68 67
         }
69 68
         $columns = [];
@@ -73,8 +72,7 @@  discard block
 block discarded – undo
73 72
             $name = $rProp->getName();
74 73
             if (preg_match('/@col(umn)?[\s$]/', $doc)) {
75 74
                 $columns[] = $name;
76
-            }
77
-            elseif (preg_match('/@eav\s+(?<table>\S+)/', $doc, $attr)) {
75
+            } elseif (preg_match('/@eav\s+(?<table>\S+)/', $doc, $attr)) {
78 76
                 $eav[$name] = new EAV($db, $attr['table']);
79 77
             }
80 78
         }
@@ -113,8 +111,7 @@  discard block
 block discarded – undo
113 111
                 $rProp->setAccessible(true);
114 112
                 $this->properties[$name] = $rProp;
115 113
             }
116
-        }
117
-        catch (ReflectionException $exception) {
114
+        } catch (ReflectionException $exception) {
118 115
             throw new LogicException('Unexpected ReflectionException', 0, $exception);
119 116
         }
120 117
     }
@@ -242,8 +239,7 @@  discard block
 block discarded – undo
242 239
     public function save (EntityInterface $entity): int {
243 240
         if (!$entity->getId()) {
244 241
             $this->saveInsert($entity);
245
-        }
246
-        else {
242
+        } else {
247 243
             $this->saveUpdate($entity);
248 244
         }
249 245
         $this->saveEav($entity);
Please login to merge, or discard this patch.