@@ -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 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | parent::setUp(); |
21 | 21 | |
22 | 22 | if ($this->em->getConnection()->getDatabasePlatform()->getName() !== 'postgresql') { |
23 | - $this->markTestSkipped('The ' . __CLASS__ . ' requires the use of postgresql.'); |
|
23 | + $this->markTestSkipped('The '.__CLASS__.' requires the use of postgresql.'); |
|
24 | 24 | } |
25 | 25 | } |
26 | 26 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $tool->createSchema($classes); |
132 | 132 | |
133 | 133 | $sql = $tool->getUpdateSchemaSql($classes); |
134 | - $sql = array_filter($sql, function ($sql) { |
|
134 | + $sql = array_filter($sql, function($sql) { |
|
135 | 135 | return strpos($sql, 'DROP SEQUENCE stonewood.') === 0; |
136 | 136 | }); |
137 | 137 |
@@ -15,7 +15,7 @@ |
||
15 | 15 | { |
16 | 16 | parent::setUp(); |
17 | 17 | if ($this->em->getConnection()->getDatabasePlatform()->getName() !== 'mysql') { |
18 | - $this->markTestSkipped('The ' . __CLASS__ . ' requires the use of mysql.'); |
|
18 | + $this->markTestSkipped('The '.__CLASS__.' requires the use of mysql.'); |
|
19 | 19 | } |
20 | 20 | } |
21 | 21 |
@@ -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) |