Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
41 | public function create(): string |
||
42 | { |
||
43 | $migrationTemplate = $this->filesystem->get(__DIR__ . '/stub/DeployMigration.stub'); |
||
44 | $version = $this->getVersionNumber(); |
||
45 | $migrationContent = $this->prepareTemplate($migrationTemplate, [ |
||
46 | '{version}' => $version |
||
47 | ]); |
||
48 | $versionFile = sprintf('Version%s.php', $version); |
||
49 | $versionPath = sprintf('%s/%s', $this->config->getMigrationsPath(), $versionFile); |
||
|
|||
50 | |||
51 | $this->filesystem->put($versionPath, $migrationContent); |
||
52 | |||
53 | return $versionPath; |
||
54 | } |
||
68 | } |