Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
28 | public function createDtoFromTemplateEntity(TemplateEntity $entity): TemplateEntityDto |
||
29 | { |
||
30 | if (false === ($entity instanceof TemplateEntity)) { |
||
31 | throw new \InvalidArgumentException( |
||
32 | 'Invalid Entity: expecting instance of ' . TemplateEntity::class |
||
33 | . ', got ' . \get_class($entity)); |
||
34 | } |
||
35 | |||
36 | return $this->dtoFactory->createDtoFromEntity($entity); |
||
37 | |||
41 |