Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
21 | public function execute(CreateDatabaseFileRequest $request): CreateDatabaseFileResponse |
||
22 | { |
||
23 | $builder = new Builder($request->platform); |
||
24 | |||
25 | \array_map(function (string $schemafile) use ($builder): void { |
||
26 | $builder->createTable(Schema::fromFile($schemafile)); |
||
27 | }, $request->yamls); |
||
28 | |||
29 | $path = \sprintf('%1$s/../../tmp/skeleton/domain/Database', __DIR__); |
||
30 | |||
31 | $writer = new SqlWriter($builder->toSql(), 'database', $path); |
||
32 | |||
33 | return new CreateDatabaseFileResponse($writer->save()); |
||
34 | } |
||
36 |