| Total Complexity | 4 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 10 | trait HasMoneyEmbeddableTrait |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var MoneyEmbeddableInterface |
||
| 14 | */ |
||
| 15 | private $moneyEmbeddable; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param ClassMetadataBuilder $builder |
||
| 19 | */ |
||
| 20 | 1 | protected static function metaForMoney(ClassMetadataBuilder $builder): void |
|
| 25 | 1 | } |
|
| 26 | |||
| 27 | /** |
||
| 28 | * Called at construction time |
||
| 29 | */ |
||
| 30 | 1 | private function initMoney() |
|
| 31 | { |
||
| 32 | 1 | $this->moneyEmbeddable = new MoneyEmbeddable(); |
|
| 33 | 1 | } |
|
| 34 | |||
| 35 | /** |
||
| 36 | * @return MoneyEmbeddableInterface |
||
| 37 | */ |
||
| 38 | 2 | public function getMoneyEmbeddable(): MoneyEmbeddableInterface |
|
| 39 | { |
||
| 40 | 2 | return $this->moneyEmbeddable; |
|
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param MoneyEmbeddableInterface $moneyEmbeddable |
||
| 45 | * |
||
| 46 | * @return $this |
||
| 47 | */ |
||
| 48 | 1 | public function setMoneyEmbeddable(MoneyEmbeddableInterface $moneyEmbeddable): self |
|
| 53 | } |
||
| 54 | } |
||
| 55 |