@@ -96,8 +96,7 @@ discard block |
||
| 96 | 96 | $doc = $rProp->getDocComment(); |
| 97 | 97 | if (preg_match(static::RX_IS_COLUMN, $doc)) { |
| 98 | 98 | $columns[] = $rProp->getName(); |
| 99 | - } |
|
| 100 | - elseif (preg_match(static::RX_EAV, $doc, $eav)) { |
|
| 99 | + } elseif (preg_match(static::RX_EAV, $doc, $eav)) { |
|
| 101 | 100 | preg_match(static::RX_EAV_VAR, $doc, $var); |
| 102 | 101 | $EAV[$rProp->getName()] = EAV::factory($db, $eav['table'], $var['type'] ?? 'string'); |
| 103 | 102 | } |
@@ -337,8 +336,7 @@ discard block |
||
| 337 | 336 | public function save (EntityInterface $entity): int { |
| 338 | 337 | if (!$entity->getId()) { |
| 339 | 338 | $this->saveInsert($entity); |
| 340 | - } |
|
| 341 | - else { |
|
| 339 | + } else { |
|
| 342 | 340 | $this->saveUpdate($entity); |
| 343 | 341 | } |
| 344 | 342 | $this->saveEav($entity); |
@@ -426,8 +424,7 @@ discard block |
||
| 426 | 424 | foreach ($values as $name => $value) { |
| 427 | 425 | if (isset($this->properties[$name])) { |
| 428 | 426 | $this->properties[$name]->setValue($entity, $this->setType($name, $value)); |
| 429 | - } |
|
| 430 | - else { |
|
| 427 | + } else { |
|
| 431 | 428 | // attempt to set unknown fields directly on the instance. |
| 432 | 429 | $entity->{$name} = $value; |
| 433 | 430 | } |