@@ -102,7 +102,7 @@ |
||
102 | 102 | $io->newLine(); |
103 | 103 | } |
104 | 104 | |
105 | - $io->info('Found ' . $nbWarning . ' upgrade(s)'); |
|
105 | + $io->info('Found '.$nbWarning.' upgrade(s)'); |
|
106 | 106 | |
107 | 107 | return 0; |
108 | 108 | } |
@@ -173,16 +173,16 @@ |
||
173 | 173 | |
174 | 174 | if ($io->option('backup') && $filesystem->exists($fileName)) { |
175 | 175 | $filesystem->copy($fileName, $fileName.'.bak'); |
176 | - $io->comment('backup file "' . $fileName.'.bak' . '"'); |
|
176 | + $io->comment('backup file "'.$fileName.'.bak'.'"'); |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | $filesystem->dumpFile($fileName, $generator->generate($mapper, $fileName)); |
180 | 180 | |
181 | - $io->info('File "' . $fileName . '" was created'); |
|
181 | + $io->info('File "'.$fileName.'" was created'); |
|
182 | 182 | return; |
183 | 183 | |
184 | 184 | case 'Show': |
185 | - $io->line('File: ' . $fileName); |
|
185 | + $io->line('File: '.$fileName); |
|
186 | 186 | $io->line($generator->generate($mapper, $fileName)); |
187 | 187 | break; |
188 | 188 |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $count = 0; |
101 | 101 | |
102 | 102 | foreach ($this->execute() as $result) { |
103 | - $count += (int)$result['aggregate']; |
|
103 | + $count += (int) $result['aggregate']; |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | $this->compilerState->invalidate(['columns', 'orders']); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | */ |
119 | 119 | public function count($column = null) |
120 | 120 | { |
121 | - return (int)array_sum($this->aggregate(__FUNCTION__, $column)); |
|
121 | + return (int) array_sum($this->aggregate(__FUNCTION__, $column)); |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | { |
133 | 133 | $numbers = $this->aggregate(__FUNCTION__, $column); |
134 | 134 | |
135 | - return array_sum($numbers)/count($numbers); |
|
135 | + return array_sum($numbers) / count($numbers); |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | /** |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | */ |
145 | 145 | public function min($column = null) |
146 | 146 | { |
147 | - return (float)min($this->aggregate(__FUNCTION__, $column)); |
|
147 | + return (float) min($this->aggregate(__FUNCTION__, $column)); |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | /** |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | */ |
157 | 157 | public function max($column = null) |
158 | 158 | { |
159 | - return (float)max($this->aggregate(__FUNCTION__, $column)); |
|
159 | + return (float) max($this->aggregate(__FUNCTION__, $column)); |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | /** |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | */ |
169 | 169 | public function sum($column = null) |
170 | 170 | { |
171 | - return (float)array_sum($this->aggregate(__FUNCTION__, $column)); |
|
171 | + return (float) array_sum($this->aggregate(__FUNCTION__, $column)); |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | /** |
@@ -36,8 +36,8 @@ |
||
36 | 36 | $this->manager($input, $output)->initMigrationRepository(); |
37 | 37 | |
38 | 38 | $output->writeln( |
39 | - '<comment>Place your migration files in</comment> ' . |
|
40 | - '<info>' . str_replace(getcwd(), '.', realpath($this->manager($input, $output)->getMigrationPath())) . '</info>' |
|
39 | + '<comment>Place your migration files in</comment> '. |
|
40 | + '<info>'.str_replace(getcwd(), '.', realpath($this->manager($input, $output)->getMigrationPath())).'</info>' |
|
41 | 41 | ); |
42 | 42 | |
43 | 43 | return 0; |
@@ -50,7 +50,7 @@ |
||
50 | 50 | $status = '<error>down</error>'; |
51 | 51 | } |
52 | 52 | |
53 | - $info[] = [$status, $migration->version(), '<comment>' . $migration->name() . '</comment>', $migration->stage()]; |
|
53 | + $info[] = [$status, $migration->version(), '<comment>'.$migration->name().'</comment>', $migration->stage()]; |
|
54 | 54 | $info[] = new TableSeparator(); |
55 | 55 | } |
56 | 56 |
@@ -54,7 +54,7 @@ |
||
54 | 54 | $info = []; |
55 | 55 | |
56 | 56 | foreach ($downMigrations as $migration) { |
57 | - $info[] = ['<error>down</error>', $migration->version(), '<comment>' . $migration->name() . '</comment>', $migration->stage()]; |
|
57 | + $info[] = ['<error>down</error>', $migration->version(), '<comment>'.$migration->name().'</comment>', $migration->stage()]; |
|
58 | 58 | $info[] = new TableSeparator(); |
59 | 59 | } |
60 | 60 |
@@ -42,7 +42,7 @@ |
||
42 | 42 | { |
43 | 43 | $path = $this->manager($input, $output)->createMigration($input->getArgument('name'), $input->getOption('stage')); |
44 | 44 | |
45 | - $output->writeln('<info>+f</info> ' . '.' . str_replace(getcwd(), '', $path)); |
|
45 | + $output->writeln('<info>+f</info> '.'.'.str_replace(getcwd(), '', $path)); |
|
46 | 46 | |
47 | 47 | return 0; |
48 | 48 | } |
@@ -88,8 +88,8 @@ discard block |
||
88 | 88 | } |
89 | 89 | |
90 | 90 | $content = $stage === MigrationInterface::STAGE_DEFAULT |
91 | - ? file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'migration.stub') |
|
92 | - : file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'migration-staged.stub') |
|
91 | + ? file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR.'migration.stub') |
|
92 | + : file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR.'migration-staged.stub') |
|
93 | 93 | ; |
94 | 94 | |
95 | 95 | // Try to write the migration file |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | { |
149 | 149 | $this->migrations = []; |
150 | 150 | |
151 | - $paths = glob(realpath($this->path) . DIRECTORY_SEPARATOR . '*.php'); |
|
151 | + $paths = glob(realpath($this->path).DIRECTORY_SEPARATOR.'*.php'); |
|
152 | 152 | |
153 | 153 | foreach ($paths as $path) { |
154 | 154 | list($version, $className) = $this->parseFilename($path); |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | */ |
230 | 230 | private function createFilename($version, $className) |
231 | 231 | { |
232 | - return $this->path . DIRECTORY_SEPARATOR . $version . '_' . $className . '.php'; |
|
232 | + return $this->path.DIRECTORY_SEPARATOR.$version.'_'.$className.'.php'; |
|
233 | 233 | } |
234 | 234 | |
235 | 235 | /** |
@@ -99,7 +99,7 @@ |
||
99 | 99 | { |
100 | 100 | $versions = $this->all(); |
101 | 101 | |
102 | - return (string)end($versions); |
|
102 | + return (string) end($versions); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | /** |