@@ -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 | /** |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | * @var array |
32 | 32 | */ |
33 | 33 | protected $testPacks = [ |
34 | - 'persistent' => [], // Entités créées non modifiables |
|
34 | + 'persistent' => [], // Entités créées non modifiables |
|
35 | 35 | 'non-persistent' => [] // Entités créées et détruites aprés un test |
36 | 36 | ]; |
37 | 37 | |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | |
161 | 161 | // On ajoute la classe de l'entité uniquement si elle n'est pas déjà dans le tableau et si le test pack n'a pas démarré de savepoint |
162 | 162 | foreach ($entityClasses as $entityClassName) { |
163 | - if (! in_array($entityClassName, $this->entityClasses)) { |
|
163 | + if (!in_array($entityClassName, $this->entityClasses)) { |
|
164 | 164 | if ($this->initialized) { |
165 | 165 | $this->create([$entityClassName]); |
166 | 166 | } else { |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | */ |
220 | 220 | public function onInit(callable $callback) |
221 | 221 | { |
222 | - if (! $this->initialized) { |
|
222 | + if (!$this->initialized) { |
|
223 | 223 | $this->once('testpack.initialized', $callback); |
224 | 224 | } |
225 | 225 |
@@ -94,7 +94,7 @@ |
||
94 | 94 | ); |
95 | 95 | } |
96 | 96 | |
97 | - return ' : [' . implode(', ', $buffer) . ']'; |
|
97 | + return ' : ['.implode(', ', $buffer).']'; |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
@@ -43,7 +43,7 @@ |
||
43 | 43 | |
44 | 44 | $query->joinEntity( |
45 | 45 | $this->distant->entityName(), |
46 | - function (JoinClause $clause) use($alias, $query) { $this->buildJoinClause($clause, $query, $alias); }, |
|
46 | + function(JoinClause $clause) use($alias, $query) { $this->buildJoinClause($clause, $query, $alias); }, |
|
47 | 47 | null, |
48 | 48 | $alias |
49 | 49 | ); |
@@ -230,7 +230,7 @@ |
||
230 | 230 | break; |
231 | 231 | |
232 | 232 | default: |
233 | - throw new \RuntimeException('Unknown type from relation "' . $relationName . '" in ' . $repository->entityName()); |
|
233 | + throw new \RuntimeException('Unknown type from relation "'.$relationName.'" in '.$repository->entityName()); |
|
234 | 234 | } |
235 | 235 | |
236 | 236 | return $relation->setOptions($relationMeta); |