Conditions | 6 |
Paths | 7 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public function accept(ReflectionClass $class, Entity $entity, $annotation): void |
||
15 | { |
||
16 | if (!($annotation instanceof Embeddable)) { |
||
17 | return; |
||
18 | } |
||
19 | $parent = $annotation->inherits; |
||
20 | if ($parent === null || $parent === true) { |
||
21 | $parent = $class->getParentClass() ? $class->getParentClass()->getName() : null; |
||
22 | } |
||
23 | if (is_string($parent)) { |
||
24 | $entity->setParentName($parent); |
||
25 | } |
||
28 |