@@ -48,7 +48,7 @@ |
||
48 | 48 | |
49 | 49 | public function assertCollectionEquals(Collection $first, Collection $second) |
50 | 50 | { |
51 | - return $first->forAll(function ($k, $e) use ($second) { |
|
51 | + return $first->forAll(function($k, $e) use ($second) { |
|
52 | 52 | return $second->contains($e); |
53 | 53 | }); |
54 | 54 | } |
@@ -55,7 +55,7 @@ |
||
55 | 55 | */ |
56 | 56 | public function testDropPartSchemaWithForeignKeys() : void |
57 | 57 | { |
58 | - if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
58 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
59 | 59 | $this->markTestSkipped('Foreign Key test'); |
60 | 60 | } |
61 | 61 |
@@ -88,10 +88,10 @@ |
||
88 | 88 | $schemaDiff = $comparator->compare($fromSchema, $toSchema); |
89 | 89 | |
90 | 90 | $sql = $schemaDiff->toSql($this->em->getConnection()->getDatabasePlatform()); |
91 | - $sql = array_filter($sql, function ($sql) { |
|
91 | + $sql = array_filter($sql, function($sql) { |
|
92 | 92 | return strpos($sql, 'DROP') === false; |
93 | 93 | }); |
94 | 94 | |
95 | - self::assertCount(0, $sql, 'SQL: ' . implode(PHP_EOL, $sql)); |
|
95 | + self::assertCount(0, $sql, 'SQL: '.implode(PHP_EOL, $sql)); |
|
96 | 96 | } |
97 | 97 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | */ |
39 | 39 | private function registerType(string $className) |
40 | 40 | { |
41 | - $type = constant($className . '::NAME'); |
|
41 | + $type = constant($className.'::NAME'); |
|
42 | 42 | |
43 | 43 | if (DBALType::hasType($type)) { |
44 | 44 | DBALType::overrideType($type, $className); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | foreach ($classes as $class) { |
75 | 75 | $ce = $validator->validateClass($class); |
76 | 76 | |
77 | - self::assertEmpty($ce, 'Invalid Modelset: ' . $modelSet . ' class ' . $class->getClassName() . ': ' . implode("\n", $ce)); |
|
77 | + self::assertEmpty($ce, 'Invalid Modelset: '.$modelSet.' class '.$class->getClassName().': '.implode("\n", $ce)); |
|
78 | 78 | } |
79 | 79 | } |
80 | 80 | } |
@@ -16,7 +16,7 @@ |
||
16 | 16 | { |
17 | 17 | parent::setUp(); |
18 | 18 | |
19 | - if (! $this->em->getConnection()->getDatabasePlatform()->supportsSequences()) { |
|
19 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsSequences()) { |
|
20 | 20 | $this->markTestSkipped('Only working for Databases that support sequences.'); |
21 | 21 | } |
22 | 22 |
@@ -16,16 +16,16 @@ |
||
16 | 16 | public function providerParameterTypeInferer() |
17 | 17 | { |
18 | 18 | $data = [ |
19 | - [1, Type::INTEGER], |
|
20 | - ['bar', ParameterType::STRING], |
|
21 | - ['1', ParameterType::STRING], |
|
22 | - [new \DateTime(), Type::DATETIME], |
|
19 | + [1, Type::INTEGER], |
|
20 | + ['bar', ParameterType::STRING], |
|
21 | + ['1', ParameterType::STRING], |
|
22 | + [new \DateTime(), Type::DATETIME], |
|
23 | 23 | [new \DateInterval('P1D'), Type::DATEINTERVAL], |
24 | - [[2], Connection::PARAM_INT_ARRAY], |
|
25 | - [['foo'], Connection::PARAM_STR_ARRAY], |
|
26 | - [['1','2'], Connection::PARAM_STR_ARRAY], |
|
27 | - [[], Connection::PARAM_STR_ARRAY], |
|
28 | - [true, Type::BOOLEAN], |
|
24 | + [[2], Connection::PARAM_INT_ARRAY], |
|
25 | + [['foo'], Connection::PARAM_STR_ARRAY], |
|
26 | + [['1', '2'], Connection::PARAM_STR_ARRAY], |
|
27 | + [[], Connection::PARAM_STR_ARRAY], |
|
28 | + [true, Type::BOOLEAN], |
|
29 | 29 | ]; |
30 | 30 | |
31 | 31 | if (PHP_VERSION_ID >= 50500) { |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | $query->free(); |
67 | 67 | } catch (\Exception $e) { |
68 | - $this->fail($e->getMessage() . "\n" . $e->getTraceAsString()); |
|
68 | + $this->fail($e->getMessage()."\n".$e->getTraceAsString()); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | self::assertEquals($sqlToBeConfirmed, $sqlGenerated); |
@@ -1622,7 +1622,7 @@ discard block |
||
1622 | 1622 | public function testAliasDoesNotExceedPlatformDefinedLength() : void |
1623 | 1623 | { |
1624 | 1624 | $this->assertSqlGeneration( |
1625 | - 'SELECT m FROM ' . __NAMESPACE__ . '\\DDC1384Model m', |
|
1625 | + 'SELECT m FROM '.__NAMESPACE__.'\\DDC1384Model m', |
|
1626 | 1626 | 'SELECT t0."aVeryLongIdentifierThatShouldBeShortenedByTheSQLWalker_fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" AS c0 FROM "DDC1384Model" t0' |
1627 | 1627 | ); |
1628 | 1628 | } |
@@ -1655,12 +1655,12 @@ discard block |
||
1655 | 1655 | public function testSelectWithArithmeticExpressionBeforeField() : void |
1656 | 1656 | { |
1657 | 1657 | $this->assertSqlGeneration( |
1658 | - 'SELECT - e.value AS value, e.id FROM ' . __NAMESPACE__ . '\DDC1474Entity e', |
|
1658 | + 'SELECT - e.value AS value, e.id FROM '.__NAMESPACE__.'\DDC1474Entity e', |
|
1659 | 1659 | 'SELECT -t0."value" AS c0, t0."id" AS c1 FROM "DDC1474Entity" t0' |
1660 | 1660 | ); |
1661 | 1661 | |
1662 | 1662 | $this->assertSqlGeneration( |
1663 | - 'SELECT e.id, + e.value AS value FROM ' . __NAMESPACE__ . '\DDC1474Entity e', |
|
1663 | + 'SELECT e.id, + e.value AS value FROM '.__NAMESPACE__.'\DDC1474Entity e', |
|
1664 | 1664 | 'SELECT t0."id" AS c0, +t0."value" AS c1 FROM "DDC1474Entity" t0' |
1665 | 1665 | ); |
1666 | 1666 | } |
@@ -2337,8 +2337,8 @@ discard block |
||
2337 | 2337 | public function testHavingRegressionUsingVariableWithMathOperatorsExpression($operator) : void |
2338 | 2338 | { |
2339 | 2339 | $this->assertSqlGeneration( |
2340 | - 'SELECT COUNT(u.name) AS countName FROM Doctrine\Tests\Models\CMS\CmsUser u HAVING 1 ' . $operator . ' countName > 0', |
|
2341 | - 'SELECT COUNT(t0."name") AS c0 FROM "cms_users" t0 HAVING 1 ' . $operator . ' c0 > 0' |
|
2340 | + 'SELECT COUNT(u.name) AS countName FROM Doctrine\Tests\Models\CMS\CmsUser u HAVING 1 '.$operator.' countName > 0', |
|
2341 | + 'SELECT COUNT(t0."name") AS c0 FROM "cms_users" t0 HAVING 1 '.$operator.' c0 > 0' |
|
2342 | 2342 | ); |
2343 | 2343 | } |
2344 | 2344 | |
@@ -2357,7 +2357,7 @@ discard block |
||
2357 | 2357 | |
2358 | 2358 | public function getSql(SqlWalker $sqlWalker) |
2359 | 2359 | { |
2360 | - return 'ABS(' . $sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression) . ')'; |
|
2360 | + return 'ABS('.$sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression).')'; |
|
2361 | 2361 | } |
2362 | 2362 | |
2363 | 2363 | public function parse(Parser $parser) |
@@ -30,9 +30,9 @@ |
||
30 | 30 | */ |
31 | 31 | public function testAbstractSchemaNameSupportsClassnamesWithLeadingBackslash() : void |
32 | 32 | { |
33 | - $parser = $this->createParser('\\' . CmsUser::class); |
|
33 | + $parser = $this->createParser('\\'.CmsUser::class); |
|
34 | 34 | |
35 | - self::assertEquals('\\' . CmsUser::class, $parser->AbstractSchemaName()); |
|
35 | + self::assertEquals('\\'.CmsUser::class, $parser->AbstractSchemaName()); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | try { |
45 | 45 | $sqlGenerated = $this->generateSql($dqlToBeTested, $treeWalkers, $outputWalker); |
46 | 46 | } catch (\Exception $e) { |
47 | - $this->fail($e->getMessage() . ' at "' . $e->getFile() . '" on line ' . $e->getLine()); |
|
47 | + $this->fail($e->getMessage().' at "'.$e->getFile().'" on line '.$e->getLine()); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | self::assertEquals($sqlToBeConfirmed, $sqlGenerated); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | $condExpr = $whereClause->conditionalExpression; |
145 | 145 | |
146 | 146 | // Since Phase 1 AST optimizations were included, we need to re-add the ConditionalExpression |
147 | - if (! ($condExpr instanceof Query\AST\ConditionalExpression)) { |
|
147 | + if ( ! ($condExpr instanceof Query\AST\ConditionalExpression)) { |
|
148 | 148 | $condExpr = new Query\AST\ConditionalExpression([$condExpr]); |
149 | 149 | |
150 | 150 | $whereClause->conditionalExpression = $condExpr; |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | $singleTerm = $selectStatement->whereClause->conditionalExpression->conditionalTerms[0]; |
168 | 168 | |
169 | 169 | // Since Phase 1 AST optimizations were included, we need to re-add the ConditionalExpression |
170 | - if (! ($singleTerm instanceof Query\AST\ConditionalTerm)) { |
|
170 | + if ( ! ($singleTerm instanceof Query\AST\ConditionalTerm)) { |
|
171 | 171 | $singleTerm = new Query\AST\ConditionalTerm([$singleTerm]); |
172 | 172 | |
173 | 173 | $selectStatement->whereClause->conditionalExpression->conditionalTerms[0] = $singleTerm; |
@@ -205,9 +205,9 @@ discard block |
||
205 | 205 | { |
206 | 206 | $rangeVariableDecl = $identificationVariableDecl->rangeVariableDeclaration; |
207 | 207 | $joinAssocPathExpression = new Query\AST\JoinAssociationPathExpression($rangeVariableDecl->aliasIdentificationVariable, 'address'); |
208 | - $joinAssocDeclaration = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable . 'a', null); |
|
208 | + $joinAssocDeclaration = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable.'a', null); |
|
209 | 209 | $join = new Query\AST\Join(Query\AST\Join::JOIN_TYPE_LEFT, $joinAssocDeclaration); |
210 | - $selectExpression = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable . 'a', null, false); |
|
210 | + $selectExpression = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable.'a', null, false); |
|
211 | 211 | |
212 | 212 | $identificationVariableDecl->joins[] = $join; |
213 | 213 | $selectStatement->selectClause->selectExpressions[] = $selectExpression; |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | $addressMetadata = $entityManager->getClassMetadata(CmsAddress::class); |
218 | 218 | |
219 | 219 | $this->setQueryComponent( |
220 | - $rangeVariableDecl->aliasIdentificationVariable . 'a', |
|
220 | + $rangeVariableDecl->aliasIdentificationVariable.'a', |
|
221 | 221 | [ |
222 | 222 | 'metadata' => $addressMetadata, |
223 | 223 | 'parent' => $rangeVariableDecl->aliasIdentificationVariable, |