Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | public function __invoke(EditCompany $command): void |
||
33 | { |
||
34 | $companyToUpdate = $this->repository->findOneByUuid($command->uuid()); |
||
35 | |||
36 | if (null === $companyToUpdate) { |
||
37 | throw new \DomainException('Company provided does not exist !'); |
||
38 | } |
||
39 | $company = $this->factory->update($command, $companyToUpdate); |
||
40 | |||
41 | $this->repository->add($company); |
||
42 | } |
||
44 |