@@ -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 | /** |
@@ -66,16 +66,16 @@ |
||
66 | 66 | $this->assertEntity($expected, $entity, 0, $message); |
67 | 67 | } |
68 | 68 | |
69 | - /** |
|
70 | - * Assert that two array of entities are equal |
|
71 | - * |
|
72 | - * @param array $expectedEntities |
|
73 | - * @param array $actualEntities |
|
74 | - * @param int $dateTimeDelta |
|
75 | - * @param string $message |
|
76 | - * |
|
77 | - * @throws \Exception |
|
78 | - */ |
|
69 | + /** |
|
70 | + * Assert that two array of entities are equal |
|
71 | + * |
|
72 | + * @param array $expectedEntities |
|
73 | + * @param array $actualEntities |
|
74 | + * @param int $dateTimeDelta |
|
75 | + * @param string $message |
|
76 | + * |
|
77 | + * @throws \Exception |
|
78 | + */ |
|
79 | 79 | public function assertEntities($expectedEntities, $actualEntities, $dateTimeDelta = 5, $message = '') |
80 | 80 | { |
81 | 81 | if (is_string($dateTimeDelta)) { |
@@ -194,25 +194,25 @@ |
||
194 | 194 | $value = $repository->extractOne($entity, $attribute); |
195 | 195 | |
196 | 196 | if ($isUninitialized) { |
197 | - $this->fail($message . ': Expected attribute "'.$path.'" to be not initialised'); |
|
197 | + $this->fail($message.': Expected attribute "'.$path.'" to be not initialised'); |
|
198 | 198 | } |
199 | 199 | } catch (UninitializedPropertyException $e) { |
200 | 200 | if (!$isUninitialized) { |
201 | - $this->fail($message . ': The attribute "'.$path.'" is not initialised'); |
|
201 | + $this->fail($message.': The attribute "'.$path.'" is not initialised'); |
|
202 | 202 | } |
203 | 203 | } |
204 | 204 | |
205 | 205 | if (!is_object($expectedValue)) { |
206 | - $this->assertSame($expectedValue, $value, $message . ': Expected attribute "'.$path.'" is not the same'); |
|
206 | + $this->assertSame($expectedValue, $value, $message.': Expected attribute "'.$path.'" is not the same'); |
|
207 | 207 | continue; |
208 | 208 | } |
209 | 209 | |
210 | 210 | if ($expectedValue instanceof Constraint) { |
211 | - $this->assertThat($value, $expectedValue, $message . ': Expected attribute "'.$path.'" is not the same'); |
|
211 | + $this->assertThat($value, $expectedValue, $message.': Expected attribute "'.$path.'" is not the same'); |
|
212 | 212 | } elseif ($expectedValue instanceof \DateTimeInterface) { |
213 | - $this->assertEqualsWithDelta($expectedValue, $value, $dateTimeDelta, $message . ': Expected attribute "'.$path.'" is not the same'); |
|
213 | + $this->assertEqualsWithDelta($expectedValue, $value, $dateTimeDelta, $message.': Expected attribute "'.$path.'" is not the same'); |
|
214 | 214 | } else { |
215 | - $this->assertEquals($expectedValue, $value, $message . ': Expected attribute "'.$path.'" is not the same'); |
|
215 | + $this->assertEquals($expectedValue, $value, $message.': Expected attribute "'.$path.'" is not the same'); |
|
216 | 216 | } |
217 | 217 | } |
218 | 218 | } |
@@ -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 | ); |
@@ -36,7 +36,7 @@ |
||
36 | 36 | */ |
37 | 37 | public static function instance() |
38 | 38 | { |
39 | - if (self::$instance === null) { |
|
39 | + if (self::$instance === null) { |
|
40 | 40 | return self::$instance = new self; |
41 | 41 | } |
42 | 42 |