| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 17 | 
| Code Lines | 10 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 1 | 
| 1 | <?php  | 
            ||
| 31 | public function __invoke(CreateFamilyLog $command): void  | 
            ||
| 32 |     { | 
            ||
| 33 | $parent = null;  | 
            ||
| 34 |         if ($this->repository->existWithLabel($command->label()->getValue(), $command->parent())) { | 
            ||
| 35 |             throw new \DomainException("FamilyLog with name: {$command->label()->getValue()} already exist!"); | 
            ||
| 36 | }  | 
            ||
| 37 |         if (null !== $command->parent()) { | 
            ||
| 38 | $parent = $this->repository->findByUuid($command->parent());  | 
            ||
| 39 | }  | 
            ||
| 40 | |||
| 41 | $familyLog = FamilyLog::create(  | 
            ||
| 42 | FamilyLogUuid::generate(),  | 
            ||
| 43 | $command->label(),  | 
            ||
| 44 | $parent  | 
            ||
| 45 | );  | 
            ||
| 46 | |||
| 47 | $this->repository->add($familyLog);  | 
            ||
| 48 | }  | 
            ||
| 50 |