@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | public function pushAll(array $items) |
181 | 181 | { |
182 | 182 | if (!($this->collection instanceof CollectionInterface)) { |
183 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
183 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
184 | 184 | } |
185 | 185 | |
186 | 186 | $this->collection->pushAll($items); |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | public function push($item) |
195 | 195 | { |
196 | 196 | if (!($this->collection instanceof CollectionInterface)) { |
197 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
197 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | $this->collection->push($item); |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | public function put($key, $item) |
209 | 209 | { |
210 | 210 | if (!($this->collection instanceof CollectionInterface)) { |
211 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
211 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
212 | 212 | } |
213 | 213 | |
214 | 214 | $this->collection->put($key, $item); |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | public function get($key, $default = null) |
245 | 245 | { |
246 | 246 | if (!($this->collection instanceof CollectionInterface)) { |
247 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
247 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
248 | 248 | } |
249 | 249 | |
250 | 250 | return $this->collection->get($key, $default); |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | public function has($key) |
267 | 267 | { |
268 | 268 | if (!($this->collection instanceof CollectionInterface)) { |
269 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
269 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
270 | 270 | } |
271 | 271 | |
272 | 272 | return $this->collection->has($key); |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | public function remove($key) |
289 | 289 | { |
290 | 290 | if (!($this->collection instanceof CollectionInterface)) { |
291 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
291 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
292 | 292 | } |
293 | 293 | |
294 | 294 | $this->collection->remove($key); |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | public function clear() |
313 | 313 | { |
314 | 314 | if (!($this->collection instanceof CollectionInterface)) { |
315 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
315 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
316 | 316 | } |
317 | 317 | |
318 | 318 | $this->collection->clear(); |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | public function keys() |
327 | 327 | { |
328 | 328 | if (!($this->collection instanceof CollectionInterface)) { |
329 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
329 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
330 | 330 | } |
331 | 331 | |
332 | 332 | return $this->collection->keys(); |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | public function isEmpty() |
339 | 339 | { |
340 | 340 | if (!($this->collection instanceof CollectionInterface)) { |
341 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
341 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
342 | 342 | } |
343 | 343 | |
344 | 344 | return $this->collection->isEmpty(); |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | public function map($callback) |
351 | 351 | { |
352 | 352 | if (!($this->collection instanceof CollectionInterface)) { |
353 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
353 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
354 | 354 | } |
355 | 355 | |
356 | 356 | $this->collection = $this->collection->map($callback); |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | public function filter($callback = null) |
365 | 365 | { |
366 | 366 | if (!($this->collection instanceof CollectionInterface)) { |
367 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
367 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
368 | 368 | } |
369 | 369 | |
370 | 370 | $this->collection = $this->collection->filter($callback); |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | public function groupBy($groupBy, $mode = PaginatorInterface::GROUPBY) |
379 | 379 | { |
380 | 380 | if (!($this->collection instanceof CollectionInterface)) { |
381 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
381 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
382 | 382 | } |
383 | 383 | |
384 | 384 | $this->collection = $this->collection->groupBy($groupBy, $mode); |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | public function contains($element) |
393 | 393 | { |
394 | 394 | if (!($this->collection instanceof CollectionInterface)) { |
395 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
395 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
396 | 396 | } |
397 | 397 | |
398 | 398 | return $this->collection->contains($element); |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | public function indexOf($value, $strict = false) |
405 | 405 | { |
406 | 406 | if (!($this->collection instanceof CollectionInterface)) { |
407 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
407 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
408 | 408 | } |
409 | 409 | |
410 | 410 | return $this->collection->indexOf($value, $strict); |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | public function merge($items) |
417 | 417 | { |
418 | 418 | if (!($this->collection instanceof CollectionInterface)) { |
419 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
419 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
420 | 420 | } |
421 | 421 | |
422 | 422 | $this->collection = $this->collection->merge($items); |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | public function sort(callable $callback = null) |
431 | 431 | { |
432 | 432 | if (!($this->collection instanceof CollectionInterface)) { |
433 | - throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__); |
|
433 | + throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__); |
|
434 | 434 | } |
435 | 435 | |
436 | 436 | $this->collection = $this->collection->sort($callback); |
@@ -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 | /** |