| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | public function __invoke(DeleteSupplier $command): void |
||
| 30 | { |
||
| 31 | $supplierToDelete = $this->repository->findOneByUuid($command->uuid()); |
||
| 32 | |||
| 33 | if (null === $supplierToDelete) { |
||
| 34 | throw new \DomainException('Supplier provided does not exist!'); |
||
| 35 | } |
||
| 36 | |||
| 37 | $supplierToDelete->delete(); |
||
| 38 | } |
||
| 40 |