@@ -1024,7 +1024,7 @@ discard block |
||
1024 | 1024 | ]; |
1025 | 1025 | |
1026 | 1026 | $proxyInstance = (new LazyLoadingGhostFactory(new Configuration())) |
1027 | - ->createProxy(ECommerceShipping::class, static function () { |
|
1027 | + ->createProxy(ECommerceShipping::class, static function() { |
|
1028 | 1028 | self::fail('Proxy is not supposed to be lazy-loaded'); |
1029 | 1029 | }); |
1030 | 1030 | |
@@ -1075,7 +1075,7 @@ discard block |
||
1075 | 1075 | ]; |
1076 | 1076 | |
1077 | 1077 | $proxyInstance = (new LazyLoadingGhostFactory(new Configuration())) |
1078 | - ->createProxy(ECommerceShipping::class, static function () { |
|
1078 | + ->createProxy(ECommerceShipping::class, static function() { |
|
1079 | 1079 | self::fail('Proxy is not supposed to be lazy-loaded'); |
1080 | 1080 | }); |
1081 | 1081 |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | { |
29 | 29 | protected function loadDriver() |
30 | 30 | { |
31 | - return new XmlDriver(__DIR__ . DIRECTORY_SEPARATOR . 'xml'); |
|
31 | + return new XmlDriver(__DIR__.DIRECTORY_SEPARATOR.'xml'); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | public function testClassTableInheritanceDiscriminatorMap() : void |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | */ |
173 | 173 | public function testValidateXmlSchema($xmlMappingFile) : void |
174 | 174 | { |
175 | - $xsdSchemaFile = __DIR__ . '/../../../../../doctrine-mapping.xsd'; |
|
175 | + $xsdSchemaFile = __DIR__.'/../../../../../doctrine-mapping.xsd'; |
|
176 | 176 | $dom = new DOMDocument(); |
177 | 177 | |
178 | 178 | $dom->load($xmlMappingFile); |
@@ -182,14 +182,14 @@ discard block |
||
182 | 182 | |
183 | 183 | public static function dataValidSchema() |
184 | 184 | { |
185 | - $list = glob(__DIR__ . '/xml/*.xml'); |
|
185 | + $list = glob(__DIR__.'/xml/*.xml'); |
|
186 | 186 | $invalid = ['Doctrine.Tests.Models.DDC889.DDC889Class.dcm']; |
187 | 187 | |
188 | - $list = array_filter($list, static function ($item) use ($invalid) { |
|
188 | + $list = array_filter($list, static function($item) use ($invalid) { |
|
189 | 189 | return ! in_array(pathinfo($item, PATHINFO_FILENAME), $invalid, true); |
190 | 190 | }); |
191 | 191 | |
192 | - return array_map(static function ($item) { |
|
192 | + return array_map(static function($item) { |
|
193 | 193 | return [$item]; |
194 | 194 | }, $list); |
195 | 195 | } |
@@ -117,9 +117,9 @@ discard block |
||
117 | 117 | |
118 | 118 | public function testHasGetMetadataNamespaceSeparatorIsNotNormalized() : void |
119 | 119 | { |
120 | - require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php'; |
|
120 | + require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php'; |
|
121 | 121 | |
122 | - $metadataDriver = $this->createAnnotationDriver([__DIR__ . '/../../Models/Global/']); |
|
122 | + $metadataDriver = $this->createAnnotationDriver([__DIR__.'/../../Models/Global/']); |
|
123 | 123 | |
124 | 124 | $entityManager = $this->createEntityManager($metadataDriver); |
125 | 125 | |
@@ -127,10 +127,10 @@ discard block |
||
127 | 127 | |
128 | 128 | self::assertSame( |
129 | 129 | $mf->getMetadataFor(DoctrineGlobalArticle::class), |
130 | - $mf->getMetadataFor('\\' . DoctrineGlobalArticle::class) |
|
130 | + $mf->getMetadataFor('\\'.DoctrineGlobalArticle::class) |
|
131 | 131 | ); |
132 | 132 | self::assertTrue($mf->hasMetadataFor(DoctrineGlobalArticle::class)); |
133 | - self::assertTrue($mf->hasMetadataFor('\\' . DoctrineGlobalArticle::class)); |
|
133 | + self::assertTrue($mf->hasMetadataFor('\\'.DoctrineGlobalArticle::class)); |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | /** |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | public function testAddDefaultDiscriminatorMap() : void |
159 | 159 | { |
160 | 160 | $cmf = new ClassMetadataFactory(); |
161 | - $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/JoinedInheritanceType/']); |
|
161 | + $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/JoinedInheritanceType/']); |
|
162 | 162 | $em = $this->createEntityManager($driver); |
163 | 163 | $cmf->setEntityManager($em); |
164 | 164 | |
@@ -222,10 +222,10 @@ discard block |
||
222 | 222 | $driverMock = new DriverMock(); |
223 | 223 | $config = new Configuration(); |
224 | 224 | |
225 | - $config->setProxyDir(__DIR__ . '/../../Proxies'); |
|
225 | + $config->setProxyDir(__DIR__.'/../../Proxies'); |
|
226 | 226 | $config->setProxyNamespace('Doctrine\Tests\Proxies'); |
227 | 227 | |
228 | - if (! $conn) { |
|
228 | + if ( ! $conn) { |
|
229 | 229 | $conn = new ConnectionMock([], $driverMock, $config, new EventManager()); |
230 | 230 | } |
231 | 231 | $eventManager = $conn->getEventManager(); |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | public function testQuoteMetadata() : void |
316 | 316 | { |
317 | 317 | $cmf = new ClassMetadataFactory(); |
318 | - $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/Quote/']); |
|
318 | + $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/Quote/']); |
|
319 | 319 | $em = $this->createEntityManager($driver); |
320 | 320 | $cmf->setEntityManager($em); |
321 | 321 | |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | $listener |
398 | 398 | ->expects($this->any()) |
399 | 399 | ->method('onClassMetadataNotFound') |
400 | - ->will($this->returnCallback(static function (OnClassMetadataNotFoundEventArgs $args) use ($metadata, $em, $test) { |
|
400 | + ->will($this->returnCallback(static function(OnClassMetadataNotFoundEventArgs $args) use ($metadata, $em, $test) { |
|
401 | 401 | $test->assertNull($args->getFoundMetadata()); |
402 | 402 | $test->assertSame('Foo', $args->getClassName()); |
403 | 403 | $test->assertSame($em, $args->getObjectManager()); |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | public function testInheritsIdGeneratorMappingFromEmbeddable() : void |
460 | 460 | { |
461 | 461 | $cmf = new ClassMetadataFactory(); |
462 | - $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/DDC4006/']); |
|
462 | + $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/DDC4006/']); |
|
463 | 463 | $em = $this->createEntityManager($driver); |
464 | 464 | $cmf->setEntityManager($em); |
465 | 465 | |
@@ -482,7 +482,7 @@ discard block |
||
482 | 482 | ) : ClassMetadata { |
483 | 483 | $this->requestedClasses[] = $className; |
484 | 484 | |
485 | - if (! isset($this->mockMetadata[$className])) { |
|
485 | + if ( ! isset($this->mockMetadata[$className])) { |
|
486 | 486 | throw new InvalidArgumentException(sprintf('No mock metadata found for class %s.', $className)); |
487 | 487 | } |
488 | 488 |
@@ -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); |
@@ -1625,7 +1625,7 @@ discard block |
||
1625 | 1625 | public function testAliasDoesNotExceedPlatformDefinedLength() : void |
1626 | 1626 | { |
1627 | 1627 | $this->assertSqlGeneration( |
1628 | - 'SELECT m FROM ' . __NAMESPACE__ . '\\DDC1384Model m', |
|
1628 | + 'SELECT m FROM '.__NAMESPACE__.'\\DDC1384Model m', |
|
1629 | 1629 | 'SELECT t0."aVeryLongIdentifierThatShouldBeShortenedByTheSQLWalker_fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" AS c0 FROM "DDC1384Model" t0' |
1630 | 1630 | ); |
1631 | 1631 | } |
@@ -1658,12 +1658,12 @@ discard block |
||
1658 | 1658 | public function testSelectWithArithmeticExpressionBeforeField() : void |
1659 | 1659 | { |
1660 | 1660 | $this->assertSqlGeneration( |
1661 | - 'SELECT - e.value AS value, e.id FROM ' . __NAMESPACE__ . '\DDC1474Entity e', |
|
1661 | + 'SELECT - e.value AS value, e.id FROM '.__NAMESPACE__.'\DDC1474Entity e', |
|
1662 | 1662 | 'SELECT -t0."value" AS c0, t0."id" AS c1 FROM "DDC1474Entity" t0' |
1663 | 1663 | ); |
1664 | 1664 | |
1665 | 1665 | $this->assertSqlGeneration( |
1666 | - 'SELECT e.id, + e.value AS value FROM ' . __NAMESPACE__ . '\DDC1474Entity e', |
|
1666 | + 'SELECT e.id, + e.value AS value FROM '.__NAMESPACE__.'\DDC1474Entity e', |
|
1667 | 1667 | 'SELECT t0."id" AS c0, +t0."value" AS c1 FROM "DDC1474Entity" t0' |
1668 | 1668 | ); |
1669 | 1669 | } |
@@ -2340,8 +2340,8 @@ discard block |
||
2340 | 2340 | public function testHavingRegressionUsingVariableWithMathOperatorsExpression($operator) : void |
2341 | 2341 | { |
2342 | 2342 | $this->assertSqlGeneration( |
2343 | - 'SELECT COUNT(u.name) AS countName FROM Doctrine\Tests\Models\CMS\CmsUser u HAVING 1 ' . $operator . ' countName > 0', |
|
2344 | - 'SELECT COUNT(t0."name") AS c0 FROM "cms_users" t0 HAVING 1 ' . $operator . ' c0 > 0' |
|
2343 | + 'SELECT COUNT(u.name) AS countName FROM Doctrine\Tests\Models\CMS\CmsUser u HAVING 1 '.$operator.' countName > 0', |
|
2344 | + 'SELECT COUNT(t0."name") AS c0 FROM "cms_users" t0 HAVING 1 '.$operator.' c0 > 0' |
|
2345 | 2345 | ); |
2346 | 2346 | } |
2347 | 2347 | |
@@ -2360,7 +2360,7 @@ discard block |
||
2360 | 2360 | |
2361 | 2361 | public function getSql(SqlWalker $sqlWalker) |
2362 | 2362 | { |
2363 | - return 'ABS(' . $sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression) . ')'; |
|
2363 | + return 'ABS('.$sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression).')'; |
|
2364 | 2364 | } |
2365 | 2365 | |
2366 | 2366 | public function parse(Parser $parser) |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | try { |
46 | 46 | $sqlGenerated = $this->generateSql($dqlToBeTested, $treeWalkers, $outputWalker); |
47 | 47 | } catch (Exception $e) { |
48 | - $this->fail($e->getMessage() . ' at "' . $e->getFile() . '" on line ' . $e->getLine()); |
|
48 | + $this->fail($e->getMessage().' at "'.$e->getFile().'" on line '.$e->getLine()); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | self::assertEquals($sqlToBeConfirmed, $sqlGenerated); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | $condExpr = $whereClause->conditionalExpression; |
146 | 146 | |
147 | 147 | // Since Phase 1 AST optimizations were included, we need to re-add the ConditionalExpression |
148 | - if (! ($condExpr instanceof Query\AST\ConditionalExpression)) { |
|
148 | + if ( ! ($condExpr instanceof Query\AST\ConditionalExpression)) { |
|
149 | 149 | $condExpr = new Query\AST\ConditionalExpression([$condExpr]); |
150 | 150 | |
151 | 151 | $whereClause->conditionalExpression = $condExpr; |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | $singleTerm = $selectStatement->whereClause->conditionalExpression->conditionalTerms[0]; |
169 | 169 | |
170 | 170 | // Since Phase 1 AST optimizations were included, we need to re-add the ConditionalExpression |
171 | - if (! ($singleTerm instanceof Query\AST\ConditionalTerm)) { |
|
171 | + if ( ! ($singleTerm instanceof Query\AST\ConditionalTerm)) { |
|
172 | 172 | $singleTerm = new Query\AST\ConditionalTerm([$singleTerm]); |
173 | 173 | |
174 | 174 | $selectStatement->whereClause->conditionalExpression->conditionalTerms[0] = $singleTerm; |
@@ -206,9 +206,9 @@ discard block |
||
206 | 206 | { |
207 | 207 | $rangeVariableDecl = $identificationVariableDecl->rangeVariableDeclaration; |
208 | 208 | $joinAssocPathExpression = new Query\AST\JoinAssociationPathExpression($rangeVariableDecl->aliasIdentificationVariable, 'address'); |
209 | - $joinAssocDeclaration = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable . 'a', null); |
|
209 | + $joinAssocDeclaration = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable.'a', null); |
|
210 | 210 | $join = new Query\AST\Join(Query\AST\Join::JOIN_TYPE_LEFT, $joinAssocDeclaration); |
211 | - $selectExpression = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable . 'a', null, false); |
|
211 | + $selectExpression = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable.'a', null, false); |
|
212 | 212 | |
213 | 213 | $identificationVariableDecl->joins[] = $join; |
214 | 214 | $selectStatement->selectClause->selectExpressions[] = $selectExpression; |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | $addressMetadata = $entityManager->getClassMetadata(CmsAddress::class); |
219 | 219 | |
220 | 220 | $this->setQueryComponent( |
221 | - $rangeVariableDecl->aliasIdentificationVariable . 'a', |
|
221 | + $rangeVariableDecl->aliasIdentificationVariable.'a', |
|
222 | 222 | [ |
223 | 223 | 'metadata' => $addressMetadata, |
224 | 224 | 'parent' => $rangeVariableDecl->aliasIdentificationVariable, |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | $query->free(); |
37 | 37 | } catch (Exception $e) { |
38 | - $this->fail($e->getMessage() . ' at "' . $e->getFile() . '" on line ' . $e->getLine()); |
|
38 | + $this->fail($e->getMessage().' at "'.$e->getFile().'" on line '.$e->getLine()); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | self::assertEquals($sqlToBeConfirmed, $sqlGenerated); |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | { |
78 | 78 | $rangeVariableDecl = $identificationVariableDecl->rangeVariableDeclaration; |
79 | 79 | $joinAssocPathExpression = new Query\AST\JoinAssociationPathExpression($rangeVariableDecl->aliasIdentificationVariable, 'address'); |
80 | - $joinAssocDeclaration = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable . 'a', null); |
|
80 | + $joinAssocDeclaration = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable.'a', null); |
|
81 | 81 | $join = new Query\AST\Join(Query\AST\Join::JOIN_TYPE_LEFT, $joinAssocDeclaration); |
82 | - $selectExpression = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable . 'a', null, false); |
|
82 | + $selectExpression = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable.'a', null, false); |
|
83 | 83 | |
84 | 84 | $identificationVariableDecl->joins[] = $join; |
85 | 85 | $selectStatement->selectClause->selectExpressions[] = $selectExpression; |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $addressMetadata = $entityManager->getClassMetadata(CmsAddress::class); |
90 | 90 | |
91 | 91 | $this->setQueryComponent( |
92 | - $rangeVariableDecl->aliasIdentificationVariable . 'a', |
|
92 | + $rangeVariableDecl->aliasIdentificationVariable.'a', |
|
93 | 93 | [ |
94 | 94 | 'metadata' => $addressMetadata, |
95 | 95 | 'parent' => $rangeVariableDecl->aliasIdentificationVariable, |
@@ -19,16 +19,16 @@ |
||
19 | 19 | public function providerParameterTypeInferer() |
20 | 20 | { |
21 | 21 | $data = [ |
22 | - [1, Type::INTEGER], |
|
23 | - ['bar', ParameterType::STRING], |
|
24 | - ['1', ParameterType::STRING], |
|
25 | - [new DateTime(), Type::DATETIME], |
|
22 | + [1, Type::INTEGER], |
|
23 | + ['bar', ParameterType::STRING], |
|
24 | + ['1', ParameterType::STRING], |
|
25 | + [new DateTime(), Type::DATETIME], |
|
26 | 26 | [new DateInterval('P1D'), Type::DATEINTERVAL], |
27 | - [[2], Connection::PARAM_INT_ARRAY], |
|
28 | - [['foo'], Connection::PARAM_STR_ARRAY], |
|
29 | - [['1','2'], Connection::PARAM_STR_ARRAY], |
|
30 | - [[], Connection::PARAM_STR_ARRAY], |
|
31 | - [true, Type::BOOLEAN], |
|
27 | + [[2], Connection::PARAM_INT_ARRAY], |
|
28 | + [['foo'], Connection::PARAM_STR_ARRAY], |
|
29 | + [['1', '2'], Connection::PARAM_STR_ARRAY], |
|
30 | + [[], Connection::PARAM_STR_ARRAY], |
|
31 | + [true, Type::BOOLEAN], |
|
32 | 32 | ]; |
33 | 33 | |
34 | 34 | if (PHP_VERSION_ID >= 50500) { |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | public function testThrowsExceptionOnNonObjectValues($methodName) : void |
142 | 142 | { |
143 | 143 | $this->expectException(ORMInvalidArgumentException::class); |
144 | - $this->expectExceptionMessage('EntityManager#' . $methodName . '() expects parameter 1 to be an entity object, NULL given.'); |
|
144 | + $this->expectExceptionMessage('EntityManager#'.$methodName.'() expects parameter 1 to be an entity object, NULL given.'); |
|
145 | 145 | |
146 | 146 | $this->em->{$methodName}(null); |
147 | 147 | } |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | { |
187 | 187 | self::assertSame( |
188 | 188 | $value, |
189 | - $this->em->transactional(static function ($em) use ($value) { |
|
189 | + $this->em->transactional(static function($em) use ($value) { |
|
190 | 190 | return $value; |
191 | 191 | }) |
192 | 192 | ); |
@@ -219,8 +219,8 @@ discard block |
||
219 | 219 | public function testTransactionalReThrowsThrowables() : void |
220 | 220 | { |
221 | 221 | try { |
222 | - $this->em->transactional(static function () { |
|
223 | - (static function (array $value) { |
|
222 | + $this->em->transactional(static function() { |
|
223 | + (static function(array $value) { |
|
224 | 224 | // this only serves as an IIFE that throws a `TypeError` |
225 | 225 | })(null); |
226 | 226 | }); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | protected function createRegion() |
61 | 61 | { |
62 | - $this->directory = sys_get_temp_dir() . '/doctrine_lock_' . uniqid(); |
|
62 | + $this->directory = sys_get_temp_dir().'/doctrine_lock_'.uniqid(); |
|
63 | 63 | |
64 | 64 | $region = new DefaultRegion('concurren_region_test', $this->cache); |
65 | 65 | |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | $reflectionDirectory->setAccessible(true); |
263 | 263 | $reflectionDirectory->setValue($region, str_repeat('a', 10000)); |
264 | 264 | |
265 | - set_error_handler(static function () { |
|
265 | + set_error_handler(static function() { |
|
266 | 266 | }, E_WARNING); |
267 | 267 | self::assertTrue($region->evictAll()); |
268 | 268 | restore_error_handler(); |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | { |
276 | 276 | $path = $path ?: $this->directory; |
277 | 277 | |
278 | - if (! is_dir($path)) { |
|
278 | + if ( ! is_dir($path)) { |
|
279 | 279 | return; |
280 | 280 | } |
281 | 281 |