@@ -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 | } |
@@ -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, |
@@ -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) { |
@@ -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 |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | ->expects(self::once()) |
174 | 174 | ->method('loadCollection') |
175 | 175 | ->with($this->collection) |
176 | - ->willReturnCallback(static function (PersistentCollection $persistentCollection) use ($persistedElement) : void { |
|
176 | + ->willReturnCallback(static function(PersistentCollection $persistentCollection) use ($persistedElement) : void { |
|
177 | 177 | $persistentCollection->unwrap()->add($persistedElement); |
178 | 178 | }); |
179 | 179 | |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | ->expects(self::once()) |
211 | 211 | ->method('loadCollection') |
212 | 212 | ->with($this->collection) |
213 | - ->willReturnCallback(static function (PersistentCollection $persistentCollection) use ( |
|
213 | + ->willReturnCallback(static function(PersistentCollection $persistentCollection) use ( |
|
214 | 214 | $persistedElement, |
215 | 215 | $newElementThatIsAlsoPersisted |
216 | 216 | ) : void { |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | ->expects(self::once()) |
253 | 253 | ->method('loadCollection') |
254 | 254 | ->with($this->collection) |
255 | - ->willReturnCallback(static function (PersistentCollection $persistentCollection) use ( |
|
255 | + ->willReturnCallback(static function(PersistentCollection $persistentCollection) use ( |
|
256 | 256 | $persistedElement, |
257 | 257 | $newElementThatIsAlsoPersisted |
258 | 258 | ) : void { |
@@ -35,6 +35,6 @@ |
||
35 | 35 | |
36 | 36 | public function __toString() |
37 | 37 | { |
38 | - return self::class . '[id=' . $this->id . ']'; |
|
38 | + return self::class.'[id='.$this->id.']'; |
|
39 | 39 | } |
40 | 40 | } |
@@ -15,20 +15,20 @@ |
||
15 | 15 | error_reporting(E_ALL | E_STRICT); |
16 | 16 | date_default_timezone_set('UTC'); |
17 | 17 | |
18 | -if (file_exists(__DIR__ . '/../../../vendor/autoload.php')) { |
|
18 | +if (file_exists(__DIR__.'/../../../vendor/autoload.php')) { |
|
19 | 19 | // dependencies were installed via composer - this is the main project |
20 | - require __DIR__ . '/../../../vendor/autoload.php'; |
|
21 | -} elseif (file_exists(__DIR__ . '/../../../../../autoload.php')) { |
|
20 | + require __DIR__.'/../../../vendor/autoload.php'; |
|
21 | +} elseif (file_exists(__DIR__.'/../../../../../autoload.php')) { |
|
22 | 22 | // installed as a dependency in `vendor` |
23 | - require __DIR__ . '/../../../../../autoload.php'; |
|
23 | + require __DIR__.'/../../../../../autoload.php'; |
|
24 | 24 | } else { |
25 | 25 | throw new Exception('Can\'t find autoload.php. Did you install dependencies via composer?'); |
26 | 26 | } |
27 | 27 | |
28 | -if (! file_exists(__DIR__ . '/Proxies') && ! mkdir(__DIR__ . '/Proxies')) { |
|
29 | - throw new Exception('Could not create ' . __DIR__ . '/Proxies Folder.'); |
|
28 | +if ( ! file_exists(__DIR__.'/Proxies') && ! mkdir(__DIR__.'/Proxies')) { |
|
29 | + throw new Exception('Could not create '.__DIR__.'/Proxies Folder.'); |
|
30 | 30 | } |
31 | 31 | |
32 | -if (! file_exists(__DIR__ . '/ORM/Proxy/generated') && ! mkdir(__DIR__ . '/ORM/Proxy/generated')) { |
|
33 | - throw new Exception('Could not create ' . __DIR__ . '/ORM/Proxy/generated Folder.'); |
|
32 | +if ( ! file_exists(__DIR__.'/ORM/Proxy/generated') && ! mkdir(__DIR__.'/ORM/Proxy/generated')) { |
|
33 | + throw new Exception('Could not create '.__DIR__.'/ORM/Proxy/generated Folder.'); |
|
34 | 34 | } |