Passed
Push — master ( 0edb33...04902e )
by y
01:38
created
src/DB/AttributesTrait.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,12 +63,10 @@
 block discarded – undo
63 63
             if (isset($value)) {
64 64
                 assert(is_scalar($value));
65 65
                 $this->attributes[$attr] = $value;
66
-            }
67
-            else {
66
+            } else {
68 67
                 $this->offsetUnset($attr);
69 68
             }
70
-        }
71
-        else {
69
+        } else {
72 70
             // appending must not be null.
73 71
             // even though missing numeric offsets would yield null when fetched individually,
74 72
             // getAttributes() would not have them.
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
@@ -147,8 +147,7 @@  discard block
 block discarded – undo
147 147
             $doc = $rProp->getDocComment();
148 148
             if (preg_match(static::RX_IS_COLUMN, $doc)) {
149 149
                 $columns[] = $rProp->getName();
150
-            }
151
-            elseif (preg_match(static::RX_EAV, $doc, $eav)) {
150
+            } elseif (preg_match(static::RX_EAV, $doc, $eav)) {
152 151
                 preg_match(static::RX_EAV_VAR, $doc, $var);
153 152
                 $type = $var['type'] ?? 'string';
154 153
                 $type = static::SCALARS[$type] ?? 'string';
@@ -513,8 +512,7 @@  discard block
 block discarded – undo
513 512
     public function save (EntityInterface $entity): int {
514 513
         if (!$entity->getId()) {
515 514
             $this->saveInsert($entity);
516
-        }
517
-        else {
515
+        } else {
518 516
             $this->saveUpdate($entity);
519 517
         }
520 518
         $this->saveEav($entity);
@@ -637,8 +635,7 @@  discard block
 block discarded – undo
637 635
         foreach ($values as $name => $value) {
638 636
             if (isset($this->properties[$name])) {
639 637
                 $this->properties[$name]->setValue($entity, $this->setType($name, $value));
640
-            }
641
-            else {
638
+            } else {
642 639
                 // attempt to set unknown fields directly on the instance.
643 640
                 $entity->{$name} = $value;
644 641
             }
Please login to merge, or discard this patch.