| Total Complexity | 5 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Coverage | 85.71% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | trait AggregateBehavior |
||
| 9 | { |
||
| 10 | use EventRecordingCapabilities; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var ChildEntity[] |
||
| 14 | */ |
||
| 15 | private $deletedChildEntities = []; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var bool |
||
| 19 | */ |
||
| 20 | private $isNew = true; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var int |
||
| 24 | */ |
||
| 25 | private $aggregateVersion = 0; |
||
| 26 | |||
| 27 | 26 | public function deletedChildEntities(): array |
|
| 28 | { |
||
| 29 | 26 | $deletedChildEntities = $this->deletedChildEntities; |
|
| 30 | |||
| 31 | 26 | $this->deletedChildEntities = []; |
|
| 32 | |||
| 33 | 26 | return $deletedChildEntities; |
|
| 34 | } |
||
| 35 | |||
| 36 | 2 | private function deleteChildEntity(ChildEntity $childEntity): void |
|
| 39 | 2 | } |
|
| 40 | |||
| 41 | 26 | public function isNew(): bool |
|
| 44 | } |
||
| 45 | |||
| 46 | 24 | public function markAsPersisted(): void |
|
| 49 | 24 | } |
|
| 50 | |||
| 51 | public function aggregateVersion(): int |
||
| 54 | } |
||
| 55 | } |
||
| 56 |