@@ -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 { |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | $conn = static::$sharedConn; |
347 | 347 | |
348 | 348 | // In case test is skipped, tearDown is called, but no setup may have run |
349 | - if (! $conn) { |
|
349 | + if ( ! $conn) { |
|
350 | 350 | return; |
351 | 351 | } |
352 | 352 | |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | } |
421 | 421 | |
422 | 422 | if (isset($this->usedModelSets['directorytree'])) { |
423 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('file')); |
|
423 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('file')); |
|
424 | 424 | // MySQL doesn't know deferred deletions therefore only executing the second query gives errors. |
425 | 425 | $conn->executeUpdate('DELETE FROM Directory WHERE parentDirectory_id IS NOT NULL'); |
426 | 426 | $conn->executeUpdate('DELETE FROM Directory'); |
@@ -513,12 +513,12 @@ discard block |
||
513 | 513 | ) |
514 | 514 | ); |
515 | 515 | |
516 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-users-groups')); |
|
517 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-group')); |
|
518 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-phone')); |
|
519 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-user')); |
|
520 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-address')); |
|
521 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-city')); |
|
516 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-users-groups')); |
|
517 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-group')); |
|
518 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-phone')); |
|
519 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-user')); |
|
520 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-address')); |
|
521 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-city')); |
|
522 | 522 | } |
523 | 523 | |
524 | 524 | if (isset($this->usedModelSets['vct_onetoone'])) { |
@@ -630,7 +630,7 @@ discard block |
||
630 | 630 | $classes = []; |
631 | 631 | |
632 | 632 | foreach ($classNames as $className) { |
633 | - if (! isset(static::$entityTablesCreated[$className])) { |
|
633 | + if ( ! isset(static::$entityTablesCreated[$className])) { |
|
634 | 634 | static::$entityTablesCreated[$className] = true; |
635 | 635 | $classes[] = $this->em->getClassMetadata($className); |
636 | 636 | } |
@@ -649,25 +649,25 @@ discard block |
||
649 | 649 | { |
650 | 650 | $this->setUpDBALTypes(); |
651 | 651 | |
652 | - if (! isset(static::$sharedConn)) { |
|
652 | + if ( ! isset(static::$sharedConn)) { |
|
653 | 653 | static::$sharedConn = TestUtil::getConnection(); |
654 | 654 | } |
655 | 655 | |
656 | 656 | if (isset($GLOBALS['DOCTRINE_MARK_SQL_LOGS'])) { |
657 | 657 | if (in_array(static::$sharedConn->getDatabasePlatform()->getName(), ['mysql', 'postgresql'], true)) { |
658 | - static::$sharedConn->executeQuery('SELECT 1 /*' . get_class($this) . '*/'); |
|
658 | + static::$sharedConn->executeQuery('SELECT 1 /*'.get_class($this).'*/'); |
|
659 | 659 | } elseif (static::$sharedConn->getDatabasePlatform()->getName() === 'oracle') { |
660 | - static::$sharedConn->executeQuery('SELECT 1 /*' . get_class($this) . '*/ FROM dual'); |
|
660 | + static::$sharedConn->executeQuery('SELECT 1 /*'.get_class($this).'*/ FROM dual'); |
|
661 | 661 | } |
662 | 662 | } |
663 | 663 | |
664 | - if (! $this->em) { |
|
664 | + if ( ! $this->em) { |
|
665 | 665 | $this->em = $this->getEntityManager(); |
666 | 666 | $this->schemaTool = new SchemaTool($this->em); |
667 | 667 | } |
668 | 668 | |
669 | 669 | foreach ($this->usedModelSets as $setName => $bool) { |
670 | - if (! isset(static::$tablesCreated[$setName])) { |
|
670 | + if ( ! isset(static::$tablesCreated[$setName])) { |
|
671 | 671 | $this->setUpEntitySchema(static::$modelSets[$setName]); |
672 | 672 | |
673 | 673 | static::$tablesCreated[$setName] = true; |
@@ -742,8 +742,8 @@ discard block |
||
742 | 742 | |
743 | 743 | $config->setMetadataDriverImpl( |
744 | 744 | $mappingDriver ?? $config->newDefaultAnnotationDriver([ |
745 | - realpath(__DIR__ . '/Models/Cache'), |
|
746 | - realpath(__DIR__ . '/Models/GeoNames'), |
|
745 | + realpath(__DIR__.'/Models/Cache'), |
|
746 | + realpath(__DIR__.'/Models/GeoNames'), |
|
747 | 747 | ]) |
748 | 748 | ); |
749 | 749 | |
@@ -791,13 +791,13 @@ discard block |
||
791 | 791 | |
792 | 792 | foreach ($last25queries as $i => $query) { |
793 | 793 | $params = array_map( |
794 | - static function ($p) { |
|
794 | + static function($p) { |
|
795 | 795 | return is_object($p) ? get_class($p) : var_export($p, true); |
796 | 796 | }, |
797 | 797 | $query['params'] ?: [] |
798 | 798 | ); |
799 | 799 | |
800 | - $queries .= $i . ". SQL: '" . $query['sql'] . "' Params: " . implode(', ', $params) . PHP_EOL; |
|
800 | + $queries .= $i.". SQL: '".$query['sql']."' Params: ".implode(', ', $params).PHP_EOL; |
|
801 | 801 | } |
802 | 802 | |
803 | 803 | $trace = $e->getTrace(); |
@@ -810,11 +810,11 @@ discard block |
||
810 | 810 | break; |
811 | 811 | } |
812 | 812 | |
813 | - $traceMsg .= $part['file'] . ':' . $part['line'] . PHP_EOL; |
|
813 | + $traceMsg .= $part['file'].':'.$part['line'].PHP_EOL; |
|
814 | 814 | } |
815 | 815 | } |
816 | 816 | |
817 | - $message = '[' . get_class($e) . '] ' . $e->getMessage() . PHP_EOL . PHP_EOL . 'With queries:' . PHP_EOL . $queries . PHP_EOL . 'Trace:' . PHP_EOL . $traceMsg; |
|
817 | + $message = '['.get_class($e).'] '.$e->getMessage().PHP_EOL.PHP_EOL.'With queries:'.PHP_EOL.$queries.PHP_EOL.'Trace:'.PHP_EOL.$traceMsg; |
|
818 | 818 | |
819 | 819 | throw new Exception($message, (int) $e->getCode(), $e); |
820 | 820 | } |
@@ -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 | } |
@@ -272,10 +272,10 @@ discard block |
||
272 | 272 | */ |
273 | 273 | public function getSQLTableAlias($tableName, $dqlAlias = '') |
274 | 274 | { |
275 | - $tableName .= $dqlAlias ? '@[' . $dqlAlias . ']' : ''; |
|
275 | + $tableName .= $dqlAlias ? '@['.$dqlAlias.']' : ''; |
|
276 | 276 | |
277 | - if (! isset($this->tableAliasMap[$tableName])) { |
|
278 | - $this->tableAliasMap[$tableName] = 't' . $this->tableAliasCounter++; |
|
277 | + if ( ! isset($this->tableAliasMap[$tableName])) { |
|
278 | + $this->tableAliasMap[$tableName] = 't'.$this->tableAliasCounter++; |
|
279 | 279 | } |
280 | 280 | |
281 | 281 | return $this->tableAliasMap[$tableName]; |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | */ |
294 | 294 | public function setSQLTableAlias($tableName, $alias, $dqlAlias = '') |
295 | 295 | { |
296 | - $tableName .= $dqlAlias ? '@[' . $dqlAlias . ']' : ''; |
|
296 | + $tableName .= $dqlAlias ? '@['.$dqlAlias.']' : ''; |
|
297 | 297 | |
298 | 298 | $this->tableAliasMap[$tableName] = $alias; |
299 | 299 | |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | */ |
308 | 308 | public function getSQLColumnAlias() |
309 | 309 | { |
310 | - return $this->platform->getSQLResultCasing('c' . $this->aliasCounter++); |
|
310 | + return $this->platform->getSQLResultCasing('c'.$this->aliasCounter++); |
|
311 | 311 | } |
312 | 312 | |
313 | 313 | /** |
@@ -334,14 +334,14 @@ discard block |
||
334 | 334 | |
335 | 335 | // If this is a joined association we must use left joins to preserve the correct result. |
336 | 336 | $sql .= isset($this->queryComponents[$dqlAlias]['relation']) ? ' LEFT ' : ' INNER '; |
337 | - $sql .= 'JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
337 | + $sql .= 'JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
338 | 338 | |
339 | 339 | $sqlParts = []; |
340 | 340 | |
341 | 341 | foreach ($class->getIdentifierColumns($this->em) as $column) { |
342 | 342 | $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName()); |
343 | 343 | |
344 | - $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
344 | + $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
345 | 345 | } |
346 | 346 | |
347 | 347 | $filterSql = $this->generateFilterConditionSQL($parentClass, $tableAlias); |
@@ -365,14 +365,14 @@ discard block |
||
365 | 365 | $tableName = $subClass->table->getQuotedQualifiedName($this->platform); |
366 | 366 | $tableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias); |
367 | 367 | |
368 | - $sql .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
368 | + $sql .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
369 | 369 | |
370 | 370 | $sqlParts = []; |
371 | 371 | |
372 | 372 | foreach ($subClass->getIdentifierColumns($this->em) as $column) { |
373 | 373 | $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName()); |
374 | 374 | |
375 | - $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
375 | + $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
376 | 376 | } |
377 | 377 | |
378 | 378 | $sql .= implode(' AND ', $sqlParts); |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | $qComp = $this->queryComponents[$dqlAlias]; |
394 | 394 | $association = $qComp['relation']; |
395 | 395 | |
396 | - if (! ($association instanceof ToManyAssociationMetadata)) { |
|
396 | + if ( ! ($association instanceof ToManyAssociationMetadata)) { |
|
397 | 397 | continue; |
398 | 398 | } |
399 | 399 | |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | $property = $qComp['metadata']->getProperty($fieldName); |
402 | 402 | $tableName = $property->getTableName(); |
403 | 403 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
404 | - $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias) . '.' . $columnName; |
|
404 | + $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias).'.'.$columnName; |
|
405 | 405 | |
406 | 406 | // OrderByClause should replace an ordered relation. see - DDC-2475 |
407 | 407 | if (isset($this->orderedColumnsMap[$orderedColumn])) { |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | } |
410 | 410 | |
411 | 411 | $this->orderedColumnsMap[$orderedColumn] = $orientation; |
412 | - $orderedColumns[] = $orderedColumn . ' ' . $orientation; |
|
412 | + $orderedColumns[] = $orderedColumn.' '.$orientation; |
|
413 | 413 | } |
414 | 414 | } |
415 | 415 | |
@@ -449,19 +449,19 @@ discard block |
||
449 | 449 | $discrColumnType = $discrColumn->getType(); |
450 | 450 | $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName()); |
451 | 451 | $sqlTableAlias = $this->useSqlTableAliases |
452 | - ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.' |
|
452 | + ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.' |
|
453 | 453 | : ''; |
454 | 454 | |
455 | 455 | $sqlParts[] = sprintf( |
456 | 456 | '%s IN (%s)', |
457 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform), |
|
457 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform), |
|
458 | 458 | implode(', ', $values) |
459 | 459 | ); |
460 | 460 | } |
461 | 461 | |
462 | 462 | $sql = implode(' AND ', $sqlParts); |
463 | 463 | |
464 | - return isset($sqlParts[1]) ? '(' . $sql . ')' : $sql; |
|
464 | + return isset($sqlParts[1]) ? '('.$sql.')' : $sql; |
|
465 | 465 | } |
466 | 466 | |
467 | 467 | /** |
@@ -474,7 +474,7 @@ discard block |
||
474 | 474 | */ |
475 | 475 | private function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias) |
476 | 476 | { |
477 | - if (! $this->em->hasFilters()) { |
|
477 | + if ( ! $this->em->hasFilters()) { |
|
478 | 478 | return ''; |
479 | 479 | } |
480 | 480 | |
@@ -507,7 +507,7 @@ discard block |
||
507 | 507 | $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias); |
508 | 508 | |
509 | 509 | if ($filterExpr !== '') { |
510 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
510 | + $filterClauses[] = '('.$filterExpr.')'; |
|
511 | 511 | } |
512 | 512 | } |
513 | 513 | |
@@ -538,11 +538,11 @@ discard block |
||
538 | 538 | $sql .= $this->walkOrderByClause($AST->orderByClause); |
539 | 539 | } |
540 | 540 | |
541 | - if (! $AST->orderByClause) { |
|
541 | + if ( ! $AST->orderByClause) { |
|
542 | 542 | $orderBySql = $this->generateOrderedCollectionOrderByItems(); |
543 | 543 | |
544 | 544 | if ($orderBySql) { |
545 | - $sql .= ' ORDER BY ' . $orderBySql; |
|
545 | + $sql .= ' ORDER BY '.$orderBySql; |
|
546 | 546 | } |
547 | 547 | } |
548 | 548 | |
@@ -555,11 +555,11 @@ discard block |
||
555 | 555 | } |
556 | 556 | |
557 | 557 | if ($lockMode === LockMode::PESSIMISTIC_READ) { |
558 | - return $sql . ' ' . $this->platform->getReadLockSQL(); |
|
558 | + return $sql.' '.$this->platform->getReadLockSQL(); |
|
559 | 559 | } |
560 | 560 | |
561 | 561 | if ($lockMode === LockMode::PESSIMISTIC_WRITE) { |
562 | - return $sql . ' ' . $this->platform->getWriteLockSQL(); |
|
562 | + return $sql.' '.$this->platform->getWriteLockSQL(); |
|
563 | 563 | } |
564 | 564 | |
565 | 565 | if ($lockMode !== LockMode::OPTIMISTIC) { |
@@ -567,7 +567,7 @@ discard block |
||
567 | 567 | } |
568 | 568 | |
569 | 569 | foreach ($this->selectedClasses as $selectedClass) { |
570 | - if (! $selectedClass['class']->isVersioned()) { |
|
570 | + if ( ! $selectedClass['class']->isVersioned()) { |
|
571 | 571 | throw OptimisticLockException::lockFailed($selectedClass['class']->getClassName()); |
572 | 572 | } |
573 | 573 | } |
@@ -616,7 +616,7 @@ discard block |
||
616 | 616 | foreach ($class->getIdentifierColumns($this->em) as $column) { |
617 | 617 | $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName()); |
618 | 618 | |
619 | - $sqlParts[] = $tableAlias . '.' . $quotedColumnName; |
|
619 | + $sqlParts[] = $tableAlias.'.'.$quotedColumnName; |
|
620 | 620 | } |
621 | 621 | |
622 | 622 | return implode(', ', $sqlParts); |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | { |
635 | 635 | $class = $this->queryComponents[$identificationVariable]['metadata']; |
636 | 636 | |
637 | - if (! $fieldName) { |
|
637 | + if ( ! $fieldName) { |
|
638 | 638 | return $this->getSQLTableAlias($class->getTableName(), $identificationVariable); |
639 | 639 | } |
640 | 640 | |
@@ -663,7 +663,7 @@ discard block |
||
663 | 663 | $property = $class->getProperty($fieldName); |
664 | 664 | |
665 | 665 | if ($this->useSqlTableAliases) { |
666 | - $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName) . '.'; |
|
666 | + $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName).'.'; |
|
667 | 667 | } |
668 | 668 | |
669 | 669 | $sql .= $this->platform->quoteIdentifier($property->getColumnName()); |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | $class = $this->queryComponents[$dqlAlias]['metadata']; |
678 | 678 | $association = $class->getProperty($fieldName); |
679 | 679 | |
680 | - if (! $association->isOwningSide()) { |
|
680 | + if ( ! $association->isOwningSide()) { |
|
681 | 681 | throw QueryException::associationPathInverseSideNotSupported($pathExpr); |
682 | 682 | } |
683 | 683 | |
@@ -691,7 +691,7 @@ discard block |
||
691 | 691 | $joinColumn = reset($joinColumns); |
692 | 692 | |
693 | 693 | if ($this->useSqlTableAliases) { |
694 | - $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias) . '.'; |
|
694 | + $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias).'.'; |
|
695 | 695 | } |
696 | 696 | |
697 | 697 | $sql .= $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
@@ -709,7 +709,7 @@ discard block |
||
709 | 709 | */ |
710 | 710 | public function walkSelectClause($selectClause) |
711 | 711 | { |
712 | - $sql = 'SELECT ' . ($selectClause->isDistinct ? 'DISTINCT ' : ''); |
|
712 | + $sql = 'SELECT '.($selectClause->isDistinct ? 'DISTINCT ' : ''); |
|
713 | 713 | $sqlSelectExpressions = array_filter(array_map([$this, 'walkSelectExpression'], $selectClause->selectExpressions)); |
714 | 714 | |
715 | 715 | if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true && $selectClause->isDistinct) { |
@@ -752,7 +752,7 @@ discard block |
||
752 | 752 | |
753 | 753 | $sqlSelectExpressions[] = sprintf( |
754 | 754 | '%s AS %s', |
755 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . '.' . $quotedColumnName, $this->platform), |
|
755 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.'.'.$quotedColumnName, $this->platform), |
|
756 | 756 | $sqlColumnAlias |
757 | 757 | ); |
758 | 758 | |
@@ -762,7 +762,7 @@ discard block |
||
762 | 762 | |
763 | 763 | // Add foreign key columns of class and also parent classes |
764 | 764 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
765 | - if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide()) |
|
765 | + if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide()) |
|
766 | 766 | || ( ! $addMetaColumns && ! $association->isPrimaryKey())) { |
767 | 767 | continue; |
768 | 768 | } |
@@ -777,7 +777,7 @@ discard block |
||
777 | 777 | $columnAlias = $this->getSQLColumnAlias(); |
778 | 778 | $sqlTableAlias = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias); |
779 | 779 | |
780 | - if (! $joinColumn->getType()) { |
|
780 | + if ( ! $joinColumn->getType()) { |
|
781 | 781 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
782 | 782 | } |
783 | 783 | |
@@ -793,7 +793,7 @@ discard block |
||
793 | 793 | } |
794 | 794 | |
795 | 795 | // Add foreign key columns to SQL, if necessary |
796 | - if (! $addMetaColumns) { |
|
796 | + if ( ! $addMetaColumns) { |
|
797 | 797 | continue; |
798 | 798 | } |
799 | 799 | |
@@ -807,7 +807,7 @@ discard block |
||
807 | 807 | continue; |
808 | 808 | } |
809 | 809 | |
810 | - if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) { |
|
810 | + if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) { |
|
811 | 811 | continue; |
812 | 812 | } |
813 | 813 | |
@@ -821,7 +821,7 @@ discard block |
||
821 | 821 | $columnAlias = $this->getSQLColumnAlias(); |
822 | 822 | $sqlTableAlias = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias); |
823 | 823 | |
824 | - if (! $joinColumn->getType()) { |
|
824 | + if ( ! $joinColumn->getType()) { |
|
825 | 825 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
826 | 826 | } |
827 | 827 | |
@@ -855,7 +855,7 @@ discard block |
||
855 | 855 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl); |
856 | 856 | } |
857 | 857 | |
858 | - return ' FROM ' . implode(', ', $sqlParts); |
|
858 | + return ' FROM '.implode(', ', $sqlParts); |
|
859 | 859 | } |
860 | 860 | |
861 | 861 | /** |
@@ -930,7 +930,7 @@ discard block |
||
930 | 930 | $tableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
931 | 931 | |
932 | 932 | $sql = $this->platform->appendLockHint( |
933 | - $tableName . ' ' . $tableAlias, |
|
933 | + $tableName.' '.$tableAlias, |
|
934 | 934 | $this->query->getHint(Query::HINT_LOCK_MODE) |
935 | 935 | ); |
936 | 936 | |
@@ -940,11 +940,11 @@ discard block |
||
940 | 940 | |
941 | 941 | $classTableInheritanceJoins = $this->generateClassTableInheritanceJoins($class, $dqlAlias); |
942 | 942 | |
943 | - if (! $buildNestedJoins) { |
|
944 | - return $sql . $classTableInheritanceJoins; |
|
943 | + if ( ! $buildNestedJoins) { |
|
944 | + return $sql.$classTableInheritanceJoins; |
|
945 | 945 | } |
946 | 946 | |
947 | - return $classTableInheritanceJoins === '' ? $sql : '(' . $sql . $classTableInheritanceJoins . ')'; |
|
947 | + return $classTableInheritanceJoins === '' ? $sql : '('.$sql.$classTableInheritanceJoins.')'; |
|
948 | 948 | } |
949 | 949 | |
950 | 950 | /** |
@@ -980,7 +980,7 @@ discard block |
||
980 | 980 | : $association; |
981 | 981 | |
982 | 982 | if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true && |
983 | - (! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
983 | + ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
984 | 984 | if ($association instanceof ToManyAssociationMetadata) { |
985 | 985 | throw QueryException::iterateWithFetchJoinNotAllowed($owningAssociation); |
986 | 986 | } |
@@ -1034,7 +1034,7 @@ discard block |
||
1034 | 1034 | } |
1035 | 1035 | |
1036 | 1036 | $targetTableJoin = [ |
1037 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
1037 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
1038 | 1038 | 'condition' => implode(' AND ', $conditions), |
1039 | 1039 | ]; |
1040 | 1040 | } elseif ($owningAssociation instanceof ManyToManyAssociationMetadata) { |
@@ -1061,7 +1061,7 @@ discard block |
||
1061 | 1061 | ); |
1062 | 1062 | } |
1063 | 1063 | |
1064 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions); |
|
1064 | + $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions); |
|
1065 | 1065 | |
1066 | 1066 | // Join target table |
1067 | 1067 | $sql .= $joinType === AST\Join::JOIN_TYPE_LEFT || $joinType === AST\Join::JOIN_TYPE_LEFTOUTER ? ' LEFT JOIN ' : ' INNER JOIN '; |
@@ -1099,7 +1099,7 @@ discard block |
||
1099 | 1099 | } |
1100 | 1100 | |
1101 | 1101 | $targetTableJoin = [ |
1102 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
1102 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
1103 | 1103 | 'condition' => implode(' AND ', $conditions), |
1104 | 1104 | ]; |
1105 | 1105 | } else { |
@@ -1107,23 +1107,23 @@ discard block |
||
1107 | 1107 | } |
1108 | 1108 | |
1109 | 1109 | // Handle WITH clause |
1110 | - $withCondition = $condExpr === null ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')'); |
|
1110 | + $withCondition = $condExpr === null ? '' : ('('.$this->walkConditionalExpression($condExpr).')'); |
|
1111 | 1111 | |
1112 | 1112 | if ($targetClass->inheritanceType === InheritanceType::JOINED) { |
1113 | 1113 | $ctiJoins = $this->generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias); |
1114 | 1114 | |
1115 | 1115 | // If we have WITH condition, we need to build nested joins for target class table and cti joins |
1116 | 1116 | if ($withCondition) { |
1117 | - $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition']; |
|
1117 | + $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition']; |
|
1118 | 1118 | } else { |
1119 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins; |
|
1119 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins; |
|
1120 | 1120 | } |
1121 | 1121 | } else { |
1122 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition']; |
|
1122 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition']; |
|
1123 | 1123 | } |
1124 | 1124 | |
1125 | 1125 | if ($withCondition) { |
1126 | - $sql .= ' AND ' . $withCondition; |
|
1126 | + $sql .= ' AND '.$withCondition; |
|
1127 | 1127 | } |
1128 | 1128 | |
1129 | 1129 | // Apply the indexes |
@@ -1157,7 +1157,7 @@ discard block |
||
1157 | 1157 | $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems); |
1158 | 1158 | } |
1159 | 1159 | |
1160 | - return ' ORDER BY ' . implode(', ', $orderByItems); |
|
1160 | + return ' ORDER BY '.implode(', ', $orderByItems); |
|
1161 | 1161 | } |
1162 | 1162 | |
1163 | 1163 | /** |
@@ -1174,10 +1174,10 @@ discard block |
||
1174 | 1174 | $this->orderedColumnsMap[$sql] = $type; |
1175 | 1175 | |
1176 | 1176 | if ($expr instanceof AST\Subselect) { |
1177 | - return '(' . $sql . ') ' . $type; |
|
1177 | + return '('.$sql.') '.$type; |
|
1178 | 1178 | } |
1179 | 1179 | |
1180 | - return $sql . ' ' . $type; |
|
1180 | + return $sql.' '.$type; |
|
1181 | 1181 | } |
1182 | 1182 | |
1183 | 1183 | /** |
@@ -1185,7 +1185,7 @@ discard block |
||
1185 | 1185 | */ |
1186 | 1186 | public function walkHavingClause($havingClause) |
1187 | 1187 | { |
1188 | - return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1188 | + return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1189 | 1189 | } |
1190 | 1190 | |
1191 | 1191 | /** |
@@ -1208,7 +1208,7 @@ discard block |
||
1208 | 1208 | $conditions = []; |
1209 | 1209 | |
1210 | 1210 | if ($join->conditionalExpression) { |
1211 | - $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')'; |
|
1211 | + $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')'; |
|
1212 | 1212 | } |
1213 | 1213 | |
1214 | 1214 | $isUnconditionalJoin = empty($conditions); |
@@ -1233,7 +1233,7 @@ discard block |
||
1233 | 1233 | } |
1234 | 1234 | |
1235 | 1235 | if ($conditions) { |
1236 | - $sql .= $condExprConjunction . implode(' AND ', $conditions); |
|
1236 | + $sql .= $condExprConjunction.implode(' AND ', $conditions); |
|
1237 | 1237 | } |
1238 | 1238 | |
1239 | 1239 | break; |
@@ -1263,7 +1263,7 @@ discard block |
||
1263 | 1263 | $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression); |
1264 | 1264 | } |
1265 | 1265 | |
1266 | - $sql .= implode(', ', $scalarExpressions) . ')'; |
|
1266 | + $sql .= implode(', ', $scalarExpressions).')'; |
|
1267 | 1267 | |
1268 | 1268 | return $sql; |
1269 | 1269 | } |
@@ -1285,7 +1285,7 @@ discard block |
||
1285 | 1285 | ? $this->conn->quote($nullIfExpression->secondExpression) |
1286 | 1286 | : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression); |
1287 | 1287 | |
1288 | - return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')'; |
|
1288 | + return 'NULLIF('.$firstExpression.', '.$secondExpression.')'; |
|
1289 | 1289 | } |
1290 | 1290 | |
1291 | 1291 | /** |
@@ -1298,11 +1298,11 @@ discard block |
||
1298 | 1298 | $sql = 'CASE'; |
1299 | 1299 | |
1300 | 1300 | foreach ($generalCaseExpression->whenClauses as $whenClause) { |
1301 | - $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
1302 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
1301 | + $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
1302 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
1303 | 1303 | } |
1304 | 1304 | |
1305 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END'; |
|
1305 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END'; |
|
1306 | 1306 | |
1307 | 1307 | return $sql; |
1308 | 1308 | } |
@@ -1316,14 +1316,14 @@ discard block |
||
1316 | 1316 | */ |
1317 | 1317 | public function walkSimpleCaseExpression($simpleCaseExpression) |
1318 | 1318 | { |
1319 | - $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
1319 | + $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
1320 | 1320 | |
1321 | 1321 | foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) { |
1322 | - $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
1323 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
1322 | + $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
1323 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
1324 | 1324 | } |
1325 | 1325 | |
1326 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END'; |
|
1326 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END'; |
|
1327 | 1327 | |
1328 | 1328 | return $sql; |
1329 | 1329 | } |
@@ -1364,7 +1364,7 @@ discard block |
||
1364 | 1364 | |
1365 | 1365 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1366 | 1366 | |
1367 | - if (! $hidden) { |
|
1367 | + if ( ! $hidden) { |
|
1368 | 1368 | $this->rsm->addScalarResult($columnAlias, $resultAlias, $property->getType()); |
1369 | 1369 | $this->scalarFields[$dqlAlias][$fieldName] = $columnAlias; |
1370 | 1370 | } |
@@ -1385,11 +1385,11 @@ discard block |
||
1385 | 1385 | $columnAlias = $this->getSQLColumnAlias(); |
1386 | 1386 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1387 | 1387 | |
1388 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1388 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1389 | 1389 | |
1390 | 1390 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1391 | 1391 | |
1392 | - if (! $hidden) { |
|
1392 | + if ( ! $hidden) { |
|
1393 | 1393 | // Conceptually we could resolve field type here by traverse through AST to retrieve field type, |
1394 | 1394 | // but this is not a feasible solution; assume 'string'. |
1395 | 1395 | $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string')); |
@@ -1400,11 +1400,11 @@ discard block |
||
1400 | 1400 | $columnAlias = $this->getSQLColumnAlias(); |
1401 | 1401 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1402 | 1402 | |
1403 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1403 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1404 | 1404 | |
1405 | 1405 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1406 | 1406 | |
1407 | - if (! $hidden) { |
|
1407 | + if ( ! $hidden) { |
|
1408 | 1408 | // We cannot resolve field type here; assume 'string'. |
1409 | 1409 | $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string')); |
1410 | 1410 | } |
@@ -1428,7 +1428,7 @@ discard block |
||
1428 | 1428 | $class = $queryComp['metadata']; |
1429 | 1429 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: null; |
1430 | 1430 | |
1431 | - if (! isset($this->selectedClasses[$dqlAlias])) { |
|
1431 | + if ( ! isset($this->selectedClasses[$dqlAlias])) { |
|
1432 | 1432 | $this->selectedClasses[$dqlAlias] = [ |
1433 | 1433 | 'class' => $class, |
1434 | 1434 | 'dqlAlias' => $dqlAlias, |
@@ -1440,7 +1440,7 @@ discard block |
||
1440 | 1440 | |
1441 | 1441 | // Select all fields from the queried class |
1442 | 1442 | foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) { |
1443 | - if (! ($property instanceof FieldMetadata)) { |
|
1443 | + if ( ! ($property instanceof FieldMetadata)) { |
|
1444 | 1444 | continue; |
1445 | 1445 | } |
1446 | 1446 | |
@@ -1475,7 +1475,7 @@ discard block |
||
1475 | 1475 | $subClass = $this->em->getClassMetadata($subClassName); |
1476 | 1476 | |
1477 | 1477 | foreach ($subClass->getDeclaredPropertiesIterator() as $fieldName => $property) { |
1478 | - if (! ($property instanceof FieldMetadata)) { |
|
1478 | + if ( ! ($property instanceof FieldMetadata)) { |
|
1479 | 1479 | continue; |
1480 | 1480 | } |
1481 | 1481 | |
@@ -1514,7 +1514,7 @@ discard block |
||
1514 | 1514 | */ |
1515 | 1515 | public function walkQuantifiedExpression($qExpr) |
1516 | 1516 | { |
1517 | - return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')'; |
|
1517 | + return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')'; |
|
1518 | 1518 | } |
1519 | 1519 | |
1520 | 1520 | /** |
@@ -1554,7 +1554,7 @@ discard block |
||
1554 | 1554 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl); |
1555 | 1555 | } |
1556 | 1556 | |
1557 | - return ' FROM ' . implode(', ', $sqlParts); |
|
1557 | + return ' FROM '.implode(', ', $sqlParts); |
|
1558 | 1558 | } |
1559 | 1559 | |
1560 | 1560 | /** |
@@ -1562,7 +1562,7 @@ discard block |
||
1562 | 1562 | */ |
1563 | 1563 | public function walkSimpleSelectClause($simpleSelectClause) |
1564 | 1564 | { |
1565 | - return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1565 | + return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1566 | 1566 | . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression); |
1567 | 1567 | } |
1568 | 1568 | |
@@ -1596,7 +1596,7 @@ discard block |
||
1596 | 1596 | break; |
1597 | 1597 | |
1598 | 1598 | case $e instanceof AST\Subselect: |
1599 | - $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias; |
|
1599 | + $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias; |
|
1600 | 1600 | break; |
1601 | 1601 | |
1602 | 1602 | case $e instanceof AST\PathExpression: |
@@ -1605,7 +1605,7 @@ discard block |
||
1605 | 1605 | $class = $qComp['metadata']; |
1606 | 1606 | $fieldType = $class->getProperty($e->field)->getType(); |
1607 | 1607 | |
1608 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1608 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1609 | 1609 | break; |
1610 | 1610 | |
1611 | 1611 | case $e instanceof AST\Literal: |
@@ -1619,11 +1619,11 @@ discard block |
||
1619 | 1619 | break; |
1620 | 1620 | } |
1621 | 1621 | |
1622 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1622 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1623 | 1623 | break; |
1624 | 1624 | |
1625 | 1625 | default: |
1626 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1626 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1627 | 1627 | break; |
1628 | 1628 | } |
1629 | 1629 | |
@@ -1656,10 +1656,10 @@ discard block |
||
1656 | 1656 | case $expr instanceof AST\Subselect: |
1657 | 1657 | $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1658 | 1658 | |
1659 | - $columnAlias = 'sclr' . $this->aliasCounter++; |
|
1659 | + $columnAlias = 'sclr'.$this->aliasCounter++; |
|
1660 | 1660 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1661 | 1661 | |
1662 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1662 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1663 | 1663 | break; |
1664 | 1664 | |
1665 | 1665 | case $expr instanceof AST\Functions\FunctionNode: |
@@ -1676,7 +1676,7 @@ discard block |
||
1676 | 1676 | $columnAlias = $this->getSQLColumnAlias(); |
1677 | 1677 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1678 | 1678 | |
1679 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1679 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1680 | 1680 | break; |
1681 | 1681 | |
1682 | 1682 | case $expr instanceof AST\ParenthesisExpression: |
@@ -1696,8 +1696,8 @@ discard block |
||
1696 | 1696 | */ |
1697 | 1697 | public function walkAggregateExpression($aggExpression) |
1698 | 1698 | { |
1699 | - return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1700 | - . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')'; |
|
1699 | + return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1700 | + . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')'; |
|
1701 | 1701 | } |
1702 | 1702 | |
1703 | 1703 | /** |
@@ -1711,7 +1711,7 @@ discard block |
||
1711 | 1711 | $sqlParts[] = $this->walkGroupByItem($groupByItem); |
1712 | 1712 | } |
1713 | 1713 | |
1714 | - return ' GROUP BY ' . implode(', ', $sqlParts); |
|
1714 | + return ' GROUP BY '.implode(', ', $sqlParts); |
|
1715 | 1715 | } |
1716 | 1716 | |
1717 | 1717 | /** |
@@ -1720,7 +1720,7 @@ discard block |
||
1720 | 1720 | public function walkGroupByItem($groupByItem) |
1721 | 1721 | { |
1722 | 1722 | // StateFieldPathExpression |
1723 | - if (! is_string($groupByItem)) { |
|
1723 | + if ( ! is_string($groupByItem)) { |
|
1724 | 1724 | return $this->walkPathExpression($groupByItem); |
1725 | 1725 | } |
1726 | 1726 | |
@@ -1774,7 +1774,7 @@ discard block |
||
1774 | 1774 | { |
1775 | 1775 | $class = $this->em->getClassMetadata($deleteClause->abstractSchemaName); |
1776 | 1776 | $tableName = $class->getTableName(); |
1777 | - $sql = 'DELETE FROM ' . $class->table->getQuotedQualifiedName($this->platform); |
|
1777 | + $sql = 'DELETE FROM '.$class->table->getQuotedQualifiedName($this->platform); |
|
1778 | 1778 | |
1779 | 1779 | $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable); |
1780 | 1780 | |
@@ -1790,12 +1790,12 @@ discard block |
||
1790 | 1790 | { |
1791 | 1791 | $class = $this->em->getClassMetadata($updateClause->abstractSchemaName); |
1792 | 1792 | $tableName = $class->getTableName(); |
1793 | - $sql = 'UPDATE ' . $class->table->getQuotedQualifiedName($this->platform); |
|
1793 | + $sql = 'UPDATE '.$class->table->getQuotedQualifiedName($this->platform); |
|
1794 | 1794 | |
1795 | 1795 | $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable); |
1796 | 1796 | $this->rootAliases[] = $updateClause->aliasIdentificationVariable; |
1797 | 1797 | |
1798 | - return $sql . ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1798 | + return $sql.' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1799 | 1799 | } |
1800 | 1800 | |
1801 | 1801 | /** |
@@ -1806,7 +1806,7 @@ discard block |
||
1806 | 1806 | $useTableAliasesBefore = $this->useSqlTableAliases; |
1807 | 1807 | $this->useSqlTableAliases = false; |
1808 | 1808 | |
1809 | - $sql = $this->walkPathExpression($updateItem->pathExpression) . ' = '; |
|
1809 | + $sql = $this->walkPathExpression($updateItem->pathExpression).' = '; |
|
1810 | 1810 | $newValue = $updateItem->newValue; |
1811 | 1811 | |
1812 | 1812 | switch (true) { |
@@ -1850,7 +1850,7 @@ discard block |
||
1850 | 1850 | |
1851 | 1851 | if ($filterClauses) { |
1852 | 1852 | if ($condSql) { |
1853 | - $condSql = '(' . $condSql . ') AND '; |
|
1853 | + $condSql = '('.$condSql.') AND '; |
|
1854 | 1854 | } |
1855 | 1855 | |
1856 | 1856 | $condSql .= implode(' AND ', $filterClauses); |
@@ -1858,11 +1858,11 @@ discard block |
||
1858 | 1858 | } |
1859 | 1859 | |
1860 | 1860 | if ($condSql) { |
1861 | - return ' WHERE ' . (! $discrSql ? $condSql : '(' . $condSql . ') AND ' . $discrSql); |
|
1861 | + return ' WHERE '.( ! $discrSql ? $condSql : '('.$condSql.') AND '.$discrSql); |
|
1862 | 1862 | } |
1863 | 1863 | |
1864 | 1864 | if ($discrSql) { |
1865 | - return ' WHERE ' . $discrSql; |
|
1865 | + return ' WHERE '.$discrSql; |
|
1866 | 1866 | } |
1867 | 1867 | |
1868 | 1868 | return ''; |
@@ -1875,7 +1875,7 @@ discard block |
||
1875 | 1875 | { |
1876 | 1876 | // Phase 2 AST optimization: Skip processing of ConditionalExpression |
1877 | 1877 | // if only one ConditionalTerm is defined |
1878 | - if (! ($condExpr instanceof AST\ConditionalExpression)) { |
|
1878 | + if ( ! ($condExpr instanceof AST\ConditionalExpression)) { |
|
1879 | 1879 | return $this->walkConditionalTerm($condExpr); |
1880 | 1880 | } |
1881 | 1881 | |
@@ -1889,7 +1889,7 @@ discard block |
||
1889 | 1889 | { |
1890 | 1890 | // Phase 2 AST optimization: Skip processing of ConditionalTerm |
1891 | 1891 | // if only one ConditionalFactor is defined |
1892 | - if (! ($condTerm instanceof AST\ConditionalTerm)) { |
|
1892 | + if ( ! ($condTerm instanceof AST\ConditionalTerm)) { |
|
1893 | 1893 | return $this->walkConditionalFactor($condTerm); |
1894 | 1894 | } |
1895 | 1895 | |
@@ -1905,7 +1905,7 @@ discard block |
||
1905 | 1905 | // if only one ConditionalPrimary is defined |
1906 | 1906 | return ! ($factor instanceof AST\ConditionalFactor) |
1907 | 1907 | ? $this->walkConditionalPrimary($factor) |
1908 | - : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1908 | + : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1909 | 1909 | } |
1910 | 1910 | |
1911 | 1911 | /** |
@@ -1920,7 +1920,7 @@ discard block |
||
1920 | 1920 | if ($primary->isConditionalExpression()) { |
1921 | 1921 | $condExpr = $primary->conditionalExpression; |
1922 | 1922 | |
1923 | - return '(' . $this->walkConditionalExpression($condExpr) . ')'; |
|
1923 | + return '('.$this->walkConditionalExpression($condExpr).')'; |
|
1924 | 1924 | } |
1925 | 1925 | } |
1926 | 1926 | |
@@ -1931,7 +1931,7 @@ discard block |
||
1931 | 1931 | { |
1932 | 1932 | $sql = $existsExpr->not ? 'NOT ' : ''; |
1933 | 1933 | |
1934 | - $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')'; |
|
1934 | + $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')'; |
|
1935 | 1935 | |
1936 | 1936 | return $sql; |
1937 | 1937 | } |
@@ -1979,7 +1979,7 @@ discard block |
||
1979 | 1979 | $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName()); |
1980 | 1980 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
1981 | 1981 | |
1982 | - $sql .= $targetTableName . ' ' . $targetTableAlias . ' WHERE '; |
|
1982 | + $sql .= $targetTableName.' '.$targetTableAlias.' WHERE '; |
|
1983 | 1983 | |
1984 | 1984 | $sqlParts = []; |
1985 | 1985 | |
@@ -2000,7 +2000,7 @@ discard block |
||
2000 | 2000 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
2001 | 2001 | } |
2002 | 2002 | |
2003 | - $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql; |
|
2003 | + $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql; |
|
2004 | 2004 | } |
2005 | 2005 | |
2006 | 2006 | $sql .= implode(' AND ', $sqlParts); |
@@ -2014,7 +2014,7 @@ discard block |
||
2014 | 2014 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
2015 | 2015 | |
2016 | 2016 | // join to target table |
2017 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' INNER JOIN ' . $targetTableName . ' ' . $targetTableAlias . ' ON '; |
|
2017 | + $sql .= $joinTableName.' '.$joinTableAlias.' INNER JOIN '.$targetTableName.' '.$targetTableAlias.' ON '; |
|
2018 | 2018 | |
2019 | 2019 | // join conditions |
2020 | 2020 | $joinSqlParts = []; |
@@ -2063,13 +2063,13 @@ discard block |
||
2063 | 2063 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
2064 | 2064 | } |
2065 | 2065 | |
2066 | - $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql; |
|
2066 | + $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql; |
|
2067 | 2067 | } |
2068 | 2068 | |
2069 | 2069 | $sql .= implode(' AND ', $sqlParts); |
2070 | 2070 | } |
2071 | 2071 | |
2072 | - return $sql . ')'; |
|
2072 | + return $sql.')'; |
|
2073 | 2073 | } |
2074 | 2074 | |
2075 | 2075 | /** |
@@ -2080,7 +2080,7 @@ discard block |
||
2080 | 2080 | $sizeFunc = new AST\Functions\SizeFunction('size'); |
2081 | 2081 | $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression; |
2082 | 2082 | |
2083 | - return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
2083 | + return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
2084 | 2084 | } |
2085 | 2085 | |
2086 | 2086 | /** |
@@ -2089,19 +2089,19 @@ discard block |
||
2089 | 2089 | public function walkNullComparisonExpression($nullCompExpr) |
2090 | 2090 | { |
2091 | 2091 | $expression = $nullCompExpr->expression; |
2092 | - $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL'; |
|
2092 | + $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL'; |
|
2093 | 2093 | |
2094 | 2094 | // Handle ResultVariable |
2095 | 2095 | if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) { |
2096 | - return $this->walkResultVariable($expression) . $comparison; |
|
2096 | + return $this->walkResultVariable($expression).$comparison; |
|
2097 | 2097 | } |
2098 | 2098 | |
2099 | 2099 | // Handle InputParameter mapping inclusion to ParserResult |
2100 | 2100 | if ($expression instanceof AST\InputParameter) { |
2101 | - return $this->walkInputParameter($expression) . $comparison; |
|
2101 | + return $this->walkInputParameter($expression).$comparison; |
|
2102 | 2102 | } |
2103 | 2103 | |
2104 | - return $expression->dispatch($this) . $comparison; |
|
2104 | + return $expression->dispatch($this).$comparison; |
|
2105 | 2105 | } |
2106 | 2106 | |
2107 | 2107 | /** |
@@ -2109,7 +2109,7 @@ discard block |
||
2109 | 2109 | */ |
2110 | 2110 | public function walkInExpression($inExpr) |
2111 | 2111 | { |
2112 | - $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN ('; |
|
2112 | + $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN ('; |
|
2113 | 2113 | |
2114 | 2114 | $sql .= $inExpr->subselect |
2115 | 2115 | ? $this->walkSubselect($inExpr->subselect) |
@@ -2134,12 +2134,12 @@ discard block |
||
2134 | 2134 | $discrColumnType = $discrColumn->getType(); |
2135 | 2135 | $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName()); |
2136 | 2136 | $sqlTableAlias = $this->useSqlTableAliases |
2137 | - ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.' |
|
2137 | + ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.' |
|
2138 | 2138 | : ''; |
2139 | 2139 | |
2140 | 2140 | return sprintf( |
2141 | 2141 | '%s %sIN %s', |
2142 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform), |
|
2142 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform), |
|
2143 | 2143 | ($instanceOfExpr->not ? 'NOT ' : ''), |
2144 | 2144 | $this->getChildDiscriminatorsFromClassMetadata($discrClass, $instanceOfExpr) |
2145 | 2145 | ); |
@@ -2186,8 +2186,8 @@ discard block |
||
2186 | 2186 | $sql .= ' NOT'; |
2187 | 2187 | } |
2188 | 2188 | |
2189 | - $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
2190 | - . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
2189 | + $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
2190 | + . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
2191 | 2191 | |
2192 | 2192 | return $sql; |
2193 | 2193 | } |
@@ -2202,7 +2202,7 @@ discard block |
||
2202 | 2202 | ? $this->walkResultVariable($stringExpr) |
2203 | 2203 | : $stringExpr->dispatch($this); |
2204 | 2204 | |
2205 | - $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE '; |
|
2205 | + $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE '; |
|
2206 | 2206 | |
2207 | 2207 | if ($likeExpr->stringPattern instanceof AST\InputParameter) { |
2208 | 2208 | $sql .= $this->walkInputParameter($likeExpr->stringPattern); |
@@ -2215,7 +2215,7 @@ discard block |
||
2215 | 2215 | } |
2216 | 2216 | |
2217 | 2217 | if ($likeExpr->escapeChar) { |
2218 | - $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar); |
|
2218 | + $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar); |
|
2219 | 2219 | } |
2220 | 2220 | |
2221 | 2221 | return $sql; |
@@ -2242,7 +2242,7 @@ discard block |
||
2242 | 2242 | ? $leftExpr->dispatch($this) |
2243 | 2243 | : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr)); |
2244 | 2244 | |
2245 | - $sql .= ' ' . $compExpr->operator . ' '; |
|
2245 | + $sql .= ' '.$compExpr->operator.' '; |
|
2246 | 2246 | |
2247 | 2247 | $sql .= $rightExpr instanceof AST\Node |
2248 | 2248 | ? $rightExpr->dispatch($this) |
@@ -2278,7 +2278,7 @@ discard block |
||
2278 | 2278 | { |
2279 | 2279 | return $arithmeticExpr->isSimpleArithmeticExpression() |
2280 | 2280 | ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression) |
2281 | - : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')'; |
|
2281 | + : '('.$this->walkSubselect($arithmeticExpr->subselect).')'; |
|
2282 | 2282 | } |
2283 | 2283 | |
2284 | 2284 | /** |
@@ -2286,7 +2286,7 @@ discard block |
||
2286 | 2286 | */ |
2287 | 2287 | public function walkSimpleArithmeticExpression($simpleArithmeticExpr) |
2288 | 2288 | { |
2289 | - if (! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) { |
|
2289 | + if ( ! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) { |
|
2290 | 2290 | return $this->walkArithmeticTerm($simpleArithmeticExpr); |
2291 | 2291 | } |
2292 | 2292 | |
@@ -2306,7 +2306,7 @@ discard block |
||
2306 | 2306 | |
2307 | 2307 | // Phase 2 AST optimization: Skip processing of ArithmeticTerm |
2308 | 2308 | // if only one ArithmeticFactor is defined |
2309 | - if (! ($term instanceof AST\ArithmeticTerm)) { |
|
2309 | + if ( ! ($term instanceof AST\ArithmeticTerm)) { |
|
2310 | 2310 | return $this->walkArithmeticFactor($term); |
2311 | 2311 | } |
2312 | 2312 | |
@@ -2326,13 +2326,13 @@ discard block |
||
2326 | 2326 | |
2327 | 2327 | // Phase 2 AST optimization: Skip processing of ArithmeticFactor |
2328 | 2328 | // if only one ArithmeticPrimary is defined |
2329 | - if (! ($factor instanceof AST\ArithmeticFactor)) { |
|
2329 | + if ( ! ($factor instanceof AST\ArithmeticFactor)) { |
|
2330 | 2330 | return $this->walkArithmeticPrimary($factor); |
2331 | 2331 | } |
2332 | 2332 | |
2333 | 2333 | $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : ''); |
2334 | 2334 | |
2335 | - return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
2335 | + return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
2336 | 2336 | } |
2337 | 2337 | |
2338 | 2338 | /** |
@@ -2345,7 +2345,7 @@ discard block |
||
2345 | 2345 | public function walkArithmeticPrimary($primary) |
2346 | 2346 | { |
2347 | 2347 | if ($primary instanceof AST\SimpleArithmeticExpression) { |
2348 | - return '(' . $this->walkSimpleArithmeticExpression($primary) . ')'; |
|
2348 | + return '('.$this->walkSimpleArithmeticExpression($primary).')'; |
|
2349 | 2349 | } |
2350 | 2350 | |
2351 | 2351 | if ($primary instanceof AST\Node) { |
@@ -2403,7 +2403,7 @@ discard block |
||
2403 | 2403 | $entityClassName = $entityClass->getClassName(); |
2404 | 2404 | |
2405 | 2405 | if ($entityClassName !== $rootClass->getClassName()) { |
2406 | - if (! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) { |
|
2406 | + if ( ! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) { |
|
2407 | 2407 | throw QueryException::instanceOfUnrelatedClass($entityClassName, $rootClass->getClassName()); |
2408 | 2408 | } |
2409 | 2409 | } |
@@ -2415,6 +2415,6 @@ discard block |
||
2415 | 2415 | $sqlParameterList[] = $this->conn->quote($discriminator); |
2416 | 2416 | } |
2417 | 2417 | |
2418 | - return '(' . implode(', ', $sqlParameterList) . ')'; |
|
2418 | + return '('.implode(', ', $sqlParameterList).')'; |
|
2419 | 2419 | } |
2420 | 2420 | } |