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