| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 20 | public function execute(CreateEntityFileRequest $request): CreateEntityFileResponse |
||
| 21 | { |
||
| 22 | $inflector = new Inflector(); |
||
| 23 | $entity = $inflector->entity($request->schema->name()); |
||
| 24 | |||
| 25 | $builder = new EntityBuilder($request->schema); |
||
| 26 | $path = \sprintf('%1$s/../../tmp/skeleton/domain/%2$s', __DIR__, $entity); |
||
| 27 | |||
| 28 | $writer = new PhpWriter($builder->build(), $entity, $path); |
||
| 29 | |||
| 30 | return new CreateEntityFileResponse($writer->save()); |
||
| 31 | } |
||
| 33 |