| Total Complexity | 4 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Coverage | 93.75% |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 9 | abstract class AbstractEmbeddableObject |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var ImplementNotifyChangeTrackingPolicyInterface |
||
| 13 | */ |
||
| 14 | protected $owningEntity; |
||
| 15 | |||
| 16 | 4 | protected static function setEmbeddableAndGetBuilder(ClassMetadata $metadata): ClassMetadataBuilder |
|
| 17 | { |
||
| 18 | 4 | $builder = new ClassMetadataBuilder($metadata); |
|
| 19 | 4 | $builder->setEmbeddable(); |
|
| 20 | |||
| 21 | 4 | return $builder; |
|
| 22 | } |
||
| 23 | |||
| 24 | abstract public function __toString(): string; |
||
| 25 | |||
| 26 | 5 | public function setOwningEntity(ImplementNotifyChangeTrackingPolicyInterface $entity): void |
|
| 29 | 5 | } |
|
| 30 | |||
| 31 | /** |
||
| 32 | * If we are attached to an owning Entity, then we need to use it to Notify the Unit of Work about changes |
||
| 33 | * |
||
| 34 | * If we are not attached, then do nothing. When we are attached, this should be triggered automatically |
||
| 35 | * |
||
| 36 | * @param null|string $propName |
||
| 37 | * @param null|mixed $oldValue |
||
| 38 | * @param null|mixed $newValue |
||
| 39 | */ |
||
| 40 | 4 | protected function notifyEmbeddablePrefixedProperties( |
|
| 53 | ); |
||
| 54 | 4 | } |
|
| 55 | |||
| 56 | abstract protected function getPrefix(): string; |
||
| 57 | } |
||
| 58 |