| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public function __invoke(CreateMedia $command): void |
||
| 22 | { |
||
| 23 | $dto = $command->media(); |
||
| 24 | |||
| 25 | $media = $this->factory->create([ |
||
| 26 | 'id' => $command->mediaId(), |
||
| 27 | 'type' => $dto->type, |
||
| 28 | 'name' => $dto->name, |
||
| 29 | 'mime_type' => $dto->mimeType, |
||
| 30 | 'file_size' => $dto->fileSize, |
||
| 31 | ]); |
||
| 32 | |||
| 33 | $this->repository->add($media); |
||
| 34 | } |
||
| 36 |