| Total Complexity | 4 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 11 | trait HasAddressEmbeddableTrait |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var AddressEmbeddableInterface |
||
| 15 | */ |
||
| 16 | private $addressEmbeddable; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Called at construction time |
||
| 20 | */ |
||
| 21 | 2 | private function initAddress() |
|
| 22 | { |
||
| 23 | 2 | $this->addressEmbeddable = new AddressEmbeddable(); |
|
| 24 | 2 | } |
|
| 25 | |||
| 26 | /** |
||
| 27 | * @return AddressEmbeddableInterface |
||
| 28 | */ |
||
| 29 | 2 | public function getAddressEmbeddable(): AddressEmbeddableInterface |
|
| 30 | { |
||
| 31 | 2 | return $this->addressEmbeddable; |
|
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param AddressEmbeddableInterface $address |
||
| 36 | * |
||
| 37 | * @return $this |
||
| 38 | */ |
||
| 39 | 1 | public function setAddressEmbeddable(AddressEmbeddableInterface $address): self |
|
| 40 | { |
||
| 41 | 1 | $this->addressEmbeddable = $address; |
|
| 42 | |||
| 43 | 1 | return $this; |
|
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param ClassMetadataBuilder $builder |
||
| 48 | */ |
||
| 49 | 1 | protected static function metaForAddress(ClassMetadataBuilder $builder): void |
|
| 54 | 1 | } |
|
| 55 | } |
||
| 56 |