@@ -119,19 +119,19 @@ discard block |
||
| 119 | 119 | $replacements = [ |
| 120 | 120 | $configuration->getMigrationsNamespace(), |
| 121 | 121 | $version, |
| 122 | - $up ? " " . implode("\n ", explode("\n", $up)) : null, |
|
| 123 | - $down ? " " . implode("\n ", explode("\n", $down)) : null |
|
| 122 | + $up ? " ".implode("\n ", explode("\n", $up)) : null, |
|
| 123 | + $down ? " ".implode("\n ", explode("\n", $down)) : null |
|
| 124 | 124 | ]; |
| 125 | 125 | $code = str_replace($placeHolders, $replacements, $this->getTemplate()); |
| 126 | 126 | $code = preg_replace('/^ +$/m', '', $code); |
| 127 | 127 | $migrationDirectoryHelper = new MigrationDirectoryHelper($configuration); |
| 128 | 128 | $dir = $migrationDirectoryHelper->getMigrationDirectory(); |
| 129 | - $path = $dir . '/Version' . $version . '.php'; |
|
| 129 | + $path = $dir.'/Version'.$version.'.php'; |
|
| 130 | 130 | |
| 131 | 131 | file_put_contents($path, $code); |
| 132 | 132 | |
| 133 | 133 | if ($editorCmd = $input->getOption('editor-cmd')) { |
| 134 | - proc_open($editorCmd . ' ' . escapeshellarg($path), [], $pipes); |
|
| 134 | + proc_open($editorCmd.' '.escapeshellarg($path), [], $pipes); |
|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | return $path; |
@@ -148,15 +148,15 @@ discard block |
||
| 148 | 148 | |
| 149 | 149 | private function loadTemplateFile(string $customTemplate, OutputInterface $output): void |
| 150 | 150 | { |
| 151 | - $customTemplate = getcwd() . '/' . $customTemplate; |
|
| 152 | - if ( ! is_file($customTemplate)) { |
|
| 153 | - throw new \InvalidArgumentException('The specified template « ' . $customTemplate . ' » cannot be found.'); |
|
| 151 | + $customTemplate = getcwd().'/'.$customTemplate; |
|
| 152 | + if (!is_file($customTemplate)) { |
|
| 153 | + throw new \InvalidArgumentException('The specified template « '.$customTemplate.' » cannot be found.'); |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | $templateContent = file_get_contents($customTemplate); |
| 157 | 157 | |
| 158 | 158 | if ($templateContent === false) { |
| 159 | - throw new \InvalidArgumentException('Cannot read file contents of template « ' . $customTemplate . ' ».'); |
|
| 159 | + throw new \InvalidArgumentException('Cannot read file contents of template « '.$customTemplate.' ».'); |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | $output->writeln(sprintf('Using custom migration template "<info>%s</info>"', $customTemplate)); |