| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 20 | public function execute(CreateTranslateFileRequest $request): CreateTranslateFileResponse |
||
| 21 | { |
||
| 22 | $inflector = new Inflector(); |
||
| 23 | $file = $inflector->item($request->schema->name()); |
||
| 24 | |||
| 25 | $translate = new TranslateBuilder($request->schema); |
||
| 26 | $path = \sprintf('%1$s/../../tmp/skeleton/translations', __DIR__); |
||
| 27 | $filename = \sprintf('%1$s.%2$s', $file, $request->schema->language()); |
||
| 28 | |||
| 29 | $writer = new PhpWriter($translate->build(), $filename, $path); |
||
| 30 | |||
| 31 | return new CreateTranslateFileResponse($writer->save()); |
||
| 32 | } |
||
| 34 |