@@ -5,8 +5,8 @@ discard block |
||
| 5 | 5 | |
| 6 | 6 | // Path to composer autoloader. You can use different provided by your favorite framework, |
| 7 | 7 | // if you want to. |
| 8 | -$loaderPath = __DIR__ . '/../../vendor/autoload.php'; |
|
| 9 | -if(!is_readable($loaderPath)){ |
|
| 8 | +$loaderPath = __DIR__.'/../../vendor/autoload.php'; |
|
| 9 | +if ( ! is_readable($loaderPath)) { |
|
| 10 | 10 | throw new LogicException('Run php composer.phar install at first'); |
| 11 | 11 | } |
| 12 | 12 | $loader = require $loaderPath; |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | $config = new \Doctrine\ORM\Configuration(); |
| 20 | 20 | |
| 21 | 21 | // Set up Metadata Drivers |
| 22 | -$driverImpl = $config->newDefaultAnnotationDriver([__DIR__ . "/Entities"]); |
|
| 22 | +$driverImpl = $config->newDefaultAnnotationDriver([__DIR__."/Entities"]); |
|
| 23 | 23 | $config->setMetadataDriverImpl($driverImpl); |
| 24 | 24 | |
| 25 | 25 | // Set up caches, depending on $debug variable. |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | $config->setQueryCacheImpl($cache); |
| 30 | 30 | |
| 31 | 31 | // Proxy configuration |
| 32 | -$config->setProxyDir(__DIR__ . '/Proxies'); |
|
| 32 | +$config->setProxyDir(__DIR__.'/Proxies'); |
|
| 33 | 33 | $config->setProxyNamespace('Proxies'); |
| 34 | 34 | |
| 35 | 35 | // Database connection information |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | $args[] = $sqlWalker->walkStringPrimary($expression); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | - return call_user_func_array([$platform,'getConcatExpression'], $args); |
|
| 56 | + return call_user_func_array([$platform, 'getConcatExpression'], $args); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | $this->_tableName, $this->_sequenceName, $this->_allocationSize |
| 93 | 93 | ); |
| 94 | 94 | |
| 95 | - if ($conn->executeUpdate($updateSql, [1 => $currentLevel, 2 => $currentLevel+1]) !== 1) { |
|
| 95 | + if ($conn->executeUpdate($updateSql, [1 => $currentLevel, 2 => $currentLevel + 1]) !== 1) { |
|
| 96 | 96 | // no affected rows, concurrency issue, throw exception |
| 97 | 97 | } |
| 98 | 98 | } else { |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | /** |
| 40 | 40 | * @var array |
| 41 | 41 | */ |
| 42 | - private $types = []; |
|
| 42 | + private $types = []; |
|
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | 45 | * Converts a comparison expression into the target query language output. |
@@ -88,8 +88,8 @@ discard block |
||
| 88 | 88 | // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause() |
| 89 | 89 | $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 't0', $updateClause->aliasIdentificationVariable); |
| 90 | 90 | |
| 91 | - $this->_insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnList . ')' |
|
| 92 | - . ' SELECT t0.' . implode(', t0.', $idColumnNames); |
|
| 91 | + $this->_insertSql = 'INSERT INTO '.$tempTable.' ('.$idColumnList.')' |
|
| 92 | + . ' SELECT t0.'.implode(', t0.', $idColumnNames); |
|
| 93 | 93 | |
| 94 | 94 | $rangeDecl = new AST\RangeVariableDeclaration($primaryClass->name, $updateClause->aliasIdentificationVariable); |
| 95 | 95 | $fromClause = new AST\FromClause([new AST\IdentificationVariableDeclaration($rangeDecl, null, [])]); |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | $this->_insertSql .= $sqlWalker->walkFromClause($fromClause); |
| 98 | 98 | |
| 99 | 99 | // 2. Create ID subselect statement used in UPDATE ... WHERE ... IN (subselect) |
| 100 | - $idSubselect = 'SELECT ' . $idColumnList . ' FROM ' . $tempTable; |
|
| 100 | + $idSubselect = 'SELECT '.$idColumnList.' FROM '.$tempTable; |
|
| 101 | 101 | |
| 102 | 102 | // 3. Create and store UPDATE statements |
| 103 | 103 | $classNames = array_merge($primaryClass->parentClasses, [$primaryClass->name], $primaryClass->subClasses); |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | foreach (array_reverse($classNames) as $className) { |
| 107 | 107 | $affected = false; |
| 108 | 108 | $class = $em->getClassMetadata($className); |
| 109 | - $updateSql = 'UPDATE ' . $quoteStrategy->getTableName($class, $platform) . ' SET '; |
|
| 109 | + $updateSql = 'UPDATE '.$quoteStrategy->getTableName($class, $platform).' SET '; |
|
| 110 | 110 | |
| 111 | 111 | foreach ($updateItems as $updateItem) { |
| 112 | 112 | $field = $updateItem->pathExpression->field; |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | if ($affected) { |
| 136 | - $this->_sqlStatements[$i] = $updateSql . ' WHERE (' . $idColumnList . ') IN (' . $idSubselect . ')'; |
|
| 136 | + $this->_sqlStatements[$i] = $updateSql.' WHERE ('.$idColumnList.') IN ('.$idSubselect.')'; |
|
| 137 | 137 | } |
| 138 | 138 | } |
| 139 | 139 | |
@@ -152,8 +152,8 @@ discard block |
||
| 152 | 152 | ]; |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | - $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' (' |
|
| 156 | - . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')'; |
|
| 155 | + $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable.' (' |
|
| 156 | + . $platform->getColumnDeclarationListSQL($columnDefinitions).')'; |
|
| 157 | 157 | |
| 158 | 158 | $this->_dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable); |
| 159 | 159 | } |
@@ -77,8 +77,8 @@ discard block |
||
| 77 | 77 | // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause() |
| 78 | 78 | $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 't0', $primaryDqlAlias); |
| 79 | 79 | |
| 80 | - $this->_insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnList . ')' |
|
| 81 | - . ' SELECT t0.' . implode(', t0.', $idColumnNames); |
|
| 80 | + $this->_insertSql = 'INSERT INTO '.$tempTable.' ('.$idColumnList.')' |
|
| 81 | + . ' SELECT t0.'.implode(', t0.', $idColumnNames); |
|
| 82 | 82 | |
| 83 | 83 | $rangeDecl = new AST\RangeVariableDeclaration($primaryClass->name, $primaryDqlAlias); |
| 84 | 84 | $fromClause = new AST\FromClause([new AST\IdentificationVariableDeclaration($rangeDecl, null, [])]); |
@@ -90,14 +90,14 @@ discard block |
||
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | // 2. Create ID subselect statement used in DELETE ... WHERE ... IN (subselect) |
| 93 | - $idSubselect = 'SELECT ' . $idColumnList . ' FROM ' . $tempTable; |
|
| 93 | + $idSubselect = 'SELECT '.$idColumnList.' FROM '.$tempTable; |
|
| 94 | 94 | |
| 95 | 95 | // 3. Create and store DELETE statements |
| 96 | 96 | $classNames = array_merge($primaryClass->parentClasses, [$primaryClass->name], $primaryClass->subClasses); |
| 97 | 97 | foreach (array_reverse($classNames) as $className) { |
| 98 | 98 | $tableName = $quoteStrategy->getTableName($em->getClassMetadata($className), $platform); |
| 99 | - $this->_sqlStatements[] = 'DELETE FROM ' . $tableName |
|
| 100 | - . ' WHERE (' . $idColumnList . ') IN (' . $idSubselect . ')'; |
|
| 99 | + $this->_sqlStatements[] = 'DELETE FROM '.$tableName |
|
| 100 | + . ' WHERE ('.$idColumnList.') IN ('.$idSubselect.')'; |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | // 4. Store DDL for temporary identifier table. |
@@ -108,8 +108,8 @@ discard block |
||
| 108 | 108 | 'type' => Type::getType(PersisterHelper::getTypeOfColumn($idColumnName, $rootClass, $em)), |
| 109 | 109 | ]; |
| 110 | 110 | } |
| 111 | - $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' (' |
|
| 112 | - . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')'; |
|
| 111 | + $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable.' (' |
|
| 112 | + . $platform->getColumnDeclarationListSQL($columnDefinitions).')'; |
|
| 113 | 113 | $this->_dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable); |
| 114 | 114 | } |
| 115 | 115 | |
@@ -444,7 +444,9 @@ discard block |
||
| 444 | 444 | foreach ($dqlAliases as $dqlAlias) { |
| 445 | 445 | $class = $this->queryComponents[$dqlAlias]['metadata']; |
| 446 | 446 | |
| 447 | - if ( ! $class->isInheritanceTypeSingleTable()) continue; |
|
| 447 | + if ( ! $class->isInheritanceTypeSingleTable()) { |
|
| 448 | + continue; |
|
| 449 | + } |
|
| 448 | 450 | |
| 449 | 451 | $conn = $this->em->getConnection(); |
| 450 | 452 | $values = []; |
@@ -782,7 +784,9 @@ discard block |
||
| 782 | 784 | |
| 783 | 785 | foreach ($subClass->associationMappings as $assoc) { |
| 784 | 786 | // Skip if association is inherited |
| 785 | - if (isset($assoc['inherited'])) continue; |
|
| 787 | + if (isset($assoc['inherited'])) { |
|
| 788 | + continue; |
|
| 789 | + } |
|
| 786 | 790 | |
| 787 | 791 | if ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) { |
| 788 | 792 | $targetClass = $this->em->getClassMetadata($assoc['targetEntity']); |
@@ -291,11 +291,11 @@ discard block |
||
| 291 | 291 | */ |
| 292 | 292 | public function getSQLTableAlias($tableName, $dqlAlias = '') |
| 293 | 293 | { |
| 294 | - $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : ''; |
|
| 294 | + $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : ''; |
|
| 295 | 295 | |
| 296 | 296 | if ( ! isset($this->tableAliasMap[$tableName])) { |
| 297 | 297 | $this->tableAliasMap[$tableName] = (preg_match('/[a-z]/i', $tableName[0]) ? strtolower($tableName[0]) : 't') |
| 298 | - . $this->tableAliasCounter++ . '_'; |
|
| 298 | + . $this->tableAliasCounter++.'_'; |
|
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | return $this->tableAliasMap[$tableName]; |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | */ |
| 314 | 314 | public function setSQLTableAlias($tableName, $alias, $dqlAlias = '') |
| 315 | 315 | { |
| 316 | - $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : ''; |
|
| 316 | + $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : ''; |
|
| 317 | 317 | |
| 318 | 318 | $this->tableAliasMap[$tableName] = $alias; |
| 319 | 319 | |
@@ -354,12 +354,12 @@ discard block |
||
| 354 | 354 | |
| 355 | 355 | // If this is a joined association we must use left joins to preserve the correct result. |
| 356 | 356 | $sql .= isset($this->queryComponents[$dqlAlias]['relation']) ? ' LEFT ' : ' INNER '; |
| 357 | - $sql .= 'JOIN ' . $this->quoteStrategy->getTableName($parentClass, $this->platform) . ' ' . $tableAlias . ' ON '; |
|
| 357 | + $sql .= 'JOIN '.$this->quoteStrategy->getTableName($parentClass, $this->platform).' '.$tableAlias.' ON '; |
|
| 358 | 358 | |
| 359 | 359 | $sqlParts = []; |
| 360 | 360 | |
| 361 | 361 | foreach ($this->quoteStrategy->getIdentifierColumnNames($class, $this->platform) as $columnName) { |
| 362 | - $sqlParts[] = $baseTableAlias . '.' . $columnName . ' = ' . $tableAlias . '.' . $columnName; |
|
| 362 | + $sqlParts[] = $baseTableAlias.'.'.$columnName.' = '.$tableAlias.'.'.$columnName; |
|
| 363 | 363 | } |
| 364 | 364 | |
| 365 | 365 | // Add filters on the root class |
@@ -380,12 +380,12 @@ discard block |
||
| 380 | 380 | $subClass = $this->em->getClassMetadata($subClassName); |
| 381 | 381 | $tableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias); |
| 382 | 382 | |
| 383 | - $sql .= ' LEFT JOIN ' . $this->quoteStrategy->getTableName($subClass, $this->platform) . ' ' . $tableAlias . ' ON '; |
|
| 383 | + $sql .= ' LEFT JOIN '.$this->quoteStrategy->getTableName($subClass, $this->platform).' '.$tableAlias.' ON '; |
|
| 384 | 384 | |
| 385 | 385 | $sqlParts = []; |
| 386 | 386 | |
| 387 | 387 | foreach ($this->quoteStrategy->getIdentifierColumnNames($subClass, $this->platform) as $columnName) { |
| 388 | - $sqlParts[] = $baseTableAlias . '.' . $columnName . ' = ' . $tableAlias . '.' . $columnName; |
|
| 388 | + $sqlParts[] = $baseTableAlias.'.'.$columnName.' = '.$tableAlias.'.'.$columnName; |
|
| 389 | 389 | } |
| 390 | 390 | |
| 391 | 391 | $sql .= implode(' AND ', $sqlParts); |
@@ -417,7 +417,7 @@ discard block |
||
| 417 | 417 | ? $persister->getOwningTable($fieldName) |
| 418 | 418 | : $qComp['metadata']->getTableName(); |
| 419 | 419 | |
| 420 | - $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias) . '.' . $columnName; |
|
| 420 | + $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias).'.'.$columnName; |
|
| 421 | 421 | |
| 422 | 422 | // OrderByClause should replace an ordered relation. see - DDC-2475 |
| 423 | 423 | if (isset($this->orderedColumnsMap[$orderedColumn])) { |
@@ -425,7 +425,7 @@ discard block |
||
| 425 | 425 | } |
| 426 | 426 | |
| 427 | 427 | $this->orderedColumnsMap[$orderedColumn] = $orientation; |
| 428 | - $orderedColumns[] = $orderedColumn . ' ' . $orientation; |
|
| 428 | + $orderedColumns[] = $orderedColumn.' '.$orientation; |
|
| 429 | 429 | } |
| 430 | 430 | } |
| 431 | 431 | |
@@ -460,15 +460,15 @@ discard block |
||
| 460 | 460 | } |
| 461 | 461 | |
| 462 | 462 | $sqlTableAlias = ($this->useSqlTableAliases) |
| 463 | - ? $this->getSQLTableAlias($class->getTableName(), $dqlAlias) . '.' |
|
| 463 | + ? $this->getSQLTableAlias($class->getTableName(), $dqlAlias).'.' |
|
| 464 | 464 | : ''; |
| 465 | 465 | |
| 466 | - $sqlParts[] = $sqlTableAlias . $class->discriminatorColumn['name'] . ' IN (' . implode(', ', $values) . ')'; |
|
| 466 | + $sqlParts[] = $sqlTableAlias.$class->discriminatorColumn['name'].' IN ('.implode(', ', $values).')'; |
|
| 467 | 467 | } |
| 468 | 468 | |
| 469 | 469 | $sql = implode(' AND ', $sqlParts); |
| 470 | 470 | |
| 471 | - return (count($sqlParts) > 1) ? '(' . $sql . ')' : $sql; |
|
| 471 | + return (count($sqlParts) > 1) ? '('.$sql.')' : $sql; |
|
| 472 | 472 | } |
| 473 | 473 | |
| 474 | 474 | /** |
@@ -481,11 +481,11 @@ discard block |
||
| 481 | 481 | */ |
| 482 | 482 | private function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias) |
| 483 | 483 | { |
| 484 | - if (!$this->em->hasFilters()) { |
|
| 484 | + if ( ! $this->em->hasFilters()) { |
|
| 485 | 485 | return ''; |
| 486 | 486 | } |
| 487 | 487 | |
| 488 | - switch($targetEntity->inheritanceType) { |
|
| 488 | + switch ($targetEntity->inheritanceType) { |
|
| 489 | 489 | case ClassMetadata::INHERITANCE_TYPE_NONE: |
| 490 | 490 | break; |
| 491 | 491 | case ClassMetadata::INHERITANCE_TYPE_JOINED: |
@@ -508,7 +508,7 @@ discard block |
||
| 508 | 508 | $filterClauses = []; |
| 509 | 509 | foreach ($this->em->getFilters()->getEnabledFilters() as $filter) { |
| 510 | 510 | if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) { |
| 511 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
| 511 | + $filterClauses[] = '('.$filterExpr.')'; |
|
| 512 | 512 | } |
| 513 | 513 | } |
| 514 | 514 | |
@@ -540,7 +540,7 @@ discard block |
||
| 540 | 540 | } |
| 541 | 541 | |
| 542 | 542 | if ( ! $AST->orderByClause && ($orderBySql = $this->_generateOrderedCollectionOrderByItems())) { |
| 543 | - $sql .= ' ORDER BY ' . $orderBySql; |
|
| 543 | + $sql .= ' ORDER BY '.$orderBySql; |
|
| 544 | 544 | } |
| 545 | 545 | |
| 546 | 546 | if ($limit !== null || $offset !== null) { |
@@ -552,11 +552,11 @@ discard block |
||
| 552 | 552 | } |
| 553 | 553 | |
| 554 | 554 | if ($lockMode === LockMode::PESSIMISTIC_READ) { |
| 555 | - return $sql . ' ' . $this->platform->getReadLockSQL(); |
|
| 555 | + return $sql.' '.$this->platform->getReadLockSQL(); |
|
| 556 | 556 | } |
| 557 | 557 | |
| 558 | 558 | if ($lockMode === LockMode::PESSIMISTIC_WRITE) { |
| 559 | - return $sql . ' ' . $this->platform->getWriteLockSQL(); |
|
| 559 | + return $sql.' '.$this->platform->getWriteLockSQL(); |
|
| 560 | 560 | } |
| 561 | 561 | |
| 562 | 562 | if ($lockMode !== LockMode::OPTIMISTIC) { |
@@ -611,7 +611,7 @@ discard block |
||
| 611 | 611 | $sqlParts = []; |
| 612 | 612 | |
| 613 | 613 | foreach ($this->quoteStrategy->getIdentifierColumnNames($class, $this->platform) as $columnName) { |
| 614 | - $sqlParts[] = $tableAlias . '.' . $columnName; |
|
| 614 | + $sqlParts[] = $tableAlias.'.'.$columnName; |
|
| 615 | 615 | } |
| 616 | 616 | |
| 617 | 617 | return implode(', ', $sqlParts); |
@@ -654,7 +654,7 @@ discard block |
||
| 654 | 654 | $class = $this->queryComponents[$dqlAlias]['metadata']; |
| 655 | 655 | |
| 656 | 656 | if ($this->useSqlTableAliases) { |
| 657 | - $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName) . '.'; |
|
| 657 | + $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName).'.'; |
|
| 658 | 658 | } |
| 659 | 659 | |
| 660 | 660 | $sql .= $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform); |
@@ -683,7 +683,7 @@ discard block |
||
| 683 | 683 | } |
| 684 | 684 | |
| 685 | 685 | if ($this->useSqlTableAliases) { |
| 686 | - $sql .= $this->getSQLTableAlias($class->getTableName(), $dqlAlias) . '.'; |
|
| 686 | + $sql .= $this->getSQLTableAlias($class->getTableName(), $dqlAlias).'.'; |
|
| 687 | 687 | } |
| 688 | 688 | |
| 689 | 689 | $sql .= reset($assoc['targetToSourceKeyColumns']); |
@@ -701,7 +701,7 @@ discard block |
||
| 701 | 701 | */ |
| 702 | 702 | public function walkSelectClause($selectClause) |
| 703 | 703 | { |
| 704 | - $sql = 'SELECT ' . (($selectClause->isDistinct) ? 'DISTINCT ' : ''); |
|
| 704 | + $sql = 'SELECT '.(($selectClause->isDistinct) ? 'DISTINCT ' : ''); |
|
| 705 | 705 | $sqlSelectExpressions = array_filter(array_map([$this, 'walkSelectExpression'], $selectClause->selectExpressions)); |
| 706 | 706 | |
| 707 | 707 | if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && $selectClause->isDistinct) { |
@@ -738,7 +738,7 @@ discard block |
||
| 738 | 738 | $discrColumn = $rootClass->discriminatorColumn; |
| 739 | 739 | $columnAlias = $this->getSQLColumnAlias($discrColumn['name']); |
| 740 | 740 | |
| 741 | - $sqlSelectExpressions[] = $tblAlias . '.' . $discrColumn['name'] . ' AS ' . $columnAlias; |
|
| 741 | + $sqlSelectExpressions[] = $tblAlias.'.'.$discrColumn['name'].' AS '.$columnAlias; |
|
| 742 | 742 | |
| 743 | 743 | $this->rsm->setDiscriminatorColumn($dqlAlias, $columnAlias); |
| 744 | 744 | $this->rsm->addMetaResult($dqlAlias, $columnAlias, $discrColumn['fieldName'], false, $discrColumn['type']); |
@@ -752,7 +752,7 @@ discard block |
||
| 752 | 752 | // Add foreign key columns of class and also parent classes |
| 753 | 753 | foreach ($class->associationMappings as $assoc) { |
| 754 | 754 | if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) |
| 755 | - || ( ! $addMetaColumns && !isset($assoc['id']))) { |
|
| 755 | + || ( ! $addMetaColumns && ! isset($assoc['id']))) { |
|
| 756 | 756 | continue; |
| 757 | 757 | } |
| 758 | 758 | |
@@ -767,7 +767,7 @@ discard block |
||
| 767 | 767 | $columnType = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em); |
| 768 | 768 | |
| 769 | 769 | $quotedColumnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform); |
| 770 | - $sqlSelectExpressions[] = $sqlTableAlias . '.' . $quotedColumnName . ' AS ' . $columnAlias; |
|
| 770 | + $sqlSelectExpressions[] = $sqlTableAlias.'.'.$quotedColumnName.' AS '.$columnAlias; |
|
| 771 | 771 | |
| 772 | 772 | $this->rsm->addMetaResult($dqlAlias, $columnAlias, $columnName, $isIdentifier, $columnType); |
| 773 | 773 | } |
@@ -796,7 +796,7 @@ discard block |
||
| 796 | 796 | $columnType = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em); |
| 797 | 797 | |
| 798 | 798 | $quotedColumnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $subClass, $this->platform); |
| 799 | - $sqlSelectExpressions[] = $sqlTableAlias . '.' . $quotedColumnName . ' AS ' . $columnAlias; |
|
| 799 | + $sqlSelectExpressions[] = $sqlTableAlias.'.'.$quotedColumnName.' AS '.$columnAlias; |
|
| 800 | 800 | |
| 801 | 801 | $this->rsm->addMetaResult($dqlAlias, $columnAlias, $columnName, $subClass->isIdentifier($columnName), $columnType); |
| 802 | 802 | } |
@@ -822,7 +822,7 @@ discard block |
||
| 822 | 822 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl); |
| 823 | 823 | } |
| 824 | 824 | |
| 825 | - return ' FROM ' . implode(', ', $sqlParts); |
|
| 825 | + return ' FROM '.implode(', ', $sqlParts); |
|
| 826 | 826 | } |
| 827 | 827 | |
| 828 | 828 | /** |
@@ -877,7 +877,7 @@ discard block |
||
| 877 | 877 | |
| 878 | 878 | $assoc = $class->associationMappings[$fieldName]; |
| 879 | 879 | |
| 880 | - if (! $assoc['isOwningSide']) { |
|
| 880 | + if ( ! $assoc['isOwningSide']) { |
|
| 881 | 881 | throw QueryException::associationPathInverseSideNotSupported($pathExpr); |
| 882 | 882 | } |
| 883 | 883 | |
@@ -931,7 +931,7 @@ discard block |
||
| 931 | 931 | } |
| 932 | 932 | |
| 933 | 933 | $sql = $this->platform->appendLockHint( |
| 934 | - $this->quoteStrategy->getTableName($class, $this->platform) . ' ' . |
|
| 934 | + $this->quoteStrategy->getTableName($class, $this->platform).' '. |
|
| 935 | 935 | $this->getSQLTableAlias($class->getTableName(), $dqlAlias), |
| 936 | 936 | $this->query->getHint(Query::HINT_LOCK_MODE) |
| 937 | 937 | ); |
@@ -943,10 +943,10 @@ discard block |
||
| 943 | 943 | $classTableInheritanceJoins = $this->_generateClassTableInheritanceJoins($class, $dqlAlias); |
| 944 | 944 | |
| 945 | 945 | if ( ! $buildNestedJoins) { |
| 946 | - return $sql . $classTableInheritanceJoins; |
|
| 946 | + return $sql.$classTableInheritanceJoins; |
|
| 947 | 947 | } |
| 948 | 948 | |
| 949 | - return $classTableInheritanceJoins === '' ? $sql : '(' . $sql . $classTableInheritanceJoins . ')'; |
|
| 949 | + return $classTableInheritanceJoins === '' ? $sql : '('.$sql.$classTableInheritanceJoins.')'; |
|
| 950 | 950 | } |
| 951 | 951 | |
| 952 | 952 | /** |
@@ -979,7 +979,7 @@ discard block |
||
| 979 | 979 | // Ensure we got the owning side, since it has all mapping info |
| 980 | 980 | $assoc = ( ! $relation['isOwningSide']) ? $targetClass->associationMappings[$relation['mappedBy']] : $relation; |
| 981 | 981 | |
| 982 | - if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && (!$this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
| 982 | + if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
| 983 | 983 | if ($relation['type'] == ClassMetadata::ONE_TO_MANY || $relation['type'] == ClassMetadata::MANY_TO_MANY) { |
| 984 | 984 | throw QueryException::iterateWithFetchJoinNotAllowed($assoc); |
| 985 | 985 | } |
@@ -999,12 +999,12 @@ discard block |
||
| 999 | 999 | $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); |
| 1000 | 1000 | |
| 1001 | 1001 | if ($relation['isOwningSide']) { |
| 1002 | - $conditions[] = $sourceTableAlias . '.' . $quotedSourceColumn . ' = ' . $targetTableAlias . '.' . $quotedTargetColumn; |
|
| 1002 | + $conditions[] = $sourceTableAlias.'.'.$quotedSourceColumn.' = '.$targetTableAlias.'.'.$quotedTargetColumn; |
|
| 1003 | 1003 | |
| 1004 | 1004 | continue; |
| 1005 | 1005 | } |
| 1006 | 1006 | |
| 1007 | - $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $targetTableAlias . '.' . $quotedSourceColumn; |
|
| 1007 | + $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$targetTableAlias.'.'.$quotedSourceColumn; |
|
| 1008 | 1008 | } |
| 1009 | 1009 | |
| 1010 | 1010 | // Apply remaining inheritance restrictions |
@@ -1022,7 +1022,7 @@ discard block |
||
| 1022 | 1022 | } |
| 1023 | 1023 | |
| 1024 | 1024 | $targetTableJoin = [ |
| 1025 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
| 1025 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
| 1026 | 1026 | 'condition' => implode(' AND ', $conditions), |
| 1027 | 1027 | ]; |
| 1028 | 1028 | break; |
@@ -1042,10 +1042,10 @@ discard block |
||
| 1042 | 1042 | $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform); |
| 1043 | 1043 | $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); |
| 1044 | 1044 | |
| 1045 | - $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn; |
|
| 1045 | + $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableAlias.'.'.$quotedSourceColumn; |
|
| 1046 | 1046 | } |
| 1047 | 1047 | |
| 1048 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions); |
|
| 1048 | + $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions); |
|
| 1049 | 1049 | |
| 1050 | 1050 | // Join target table |
| 1051 | 1051 | $sql .= ($joinType == AST\Join::JOIN_TYPE_LEFT || $joinType == AST\Join::JOIN_TYPE_LEFTOUTER) ? ' LEFT JOIN ' : ' INNER JOIN '; |
@@ -1059,7 +1059,7 @@ discard block |
||
| 1059 | 1059 | $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform); |
| 1060 | 1060 | $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); |
| 1061 | 1061 | |
| 1062 | - $conditions[] = $targetTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn; |
|
| 1062 | + $conditions[] = $targetTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableAlias.'.'.$quotedSourceColumn; |
|
| 1063 | 1063 | } |
| 1064 | 1064 | |
| 1065 | 1065 | // Apply remaining inheritance restrictions |
@@ -1077,7 +1077,7 @@ discard block |
||
| 1077 | 1077 | } |
| 1078 | 1078 | |
| 1079 | 1079 | $targetTableJoin = [ |
| 1080 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
| 1080 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
| 1081 | 1081 | 'condition' => implode(' AND ', $conditions), |
| 1082 | 1082 | ]; |
| 1083 | 1083 | break; |
@@ -1087,22 +1087,22 @@ discard block |
||
| 1087 | 1087 | } |
| 1088 | 1088 | |
| 1089 | 1089 | // Handle WITH clause |
| 1090 | - $withCondition = (null === $condExpr) ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')'); |
|
| 1090 | + $withCondition = (null === $condExpr) ? '' : ('('.$this->walkConditionalExpression($condExpr).')'); |
|
| 1091 | 1091 | |
| 1092 | 1092 | if ($targetClass->isInheritanceTypeJoined()) { |
| 1093 | 1093 | $ctiJoins = $this->_generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias); |
| 1094 | 1094 | // If we have WITH condition, we need to build nested joins for target class table and cti joins |
| 1095 | 1095 | if ($withCondition) { |
| 1096 | - $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition']; |
|
| 1096 | + $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition']; |
|
| 1097 | 1097 | } else { |
| 1098 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins; |
|
| 1098 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins; |
|
| 1099 | 1099 | } |
| 1100 | 1100 | } else { |
| 1101 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition']; |
|
| 1101 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition']; |
|
| 1102 | 1102 | } |
| 1103 | 1103 | |
| 1104 | 1104 | if ($withCondition) { |
| 1105 | - $sql .= ' AND ' . $withCondition; |
|
| 1105 | + $sql .= ' AND '.$withCondition; |
|
| 1106 | 1106 | } |
| 1107 | 1107 | |
| 1108 | 1108 | // Apply the indexes |
@@ -1135,7 +1135,7 @@ discard block |
||
| 1135 | 1135 | $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems); |
| 1136 | 1136 | } |
| 1137 | 1137 | |
| 1138 | - return ' ORDER BY ' . implode(', ', $orderByItems); |
|
| 1138 | + return ' ORDER BY '.implode(', ', $orderByItems); |
|
| 1139 | 1139 | } |
| 1140 | 1140 | |
| 1141 | 1141 | /** |
@@ -1152,10 +1152,10 @@ discard block |
||
| 1152 | 1152 | $this->orderedColumnsMap[$sql] = $type; |
| 1153 | 1153 | |
| 1154 | 1154 | if ($expr instanceof AST\Subselect) { |
| 1155 | - return '(' . $sql . ') ' . $type; |
|
| 1155 | + return '('.$sql.') '.$type; |
|
| 1156 | 1156 | } |
| 1157 | 1157 | |
| 1158 | - return $sql . ' ' . $type; |
|
| 1158 | + return $sql.' '.$type; |
|
| 1159 | 1159 | } |
| 1160 | 1160 | |
| 1161 | 1161 | /** |
@@ -1163,7 +1163,7 @@ discard block |
||
| 1163 | 1163 | */ |
| 1164 | 1164 | public function walkHavingClause($havingClause) |
| 1165 | 1165 | { |
| 1166 | - return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression); |
|
| 1166 | + return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression); |
|
| 1167 | 1167 | } |
| 1168 | 1168 | |
| 1169 | 1169 | /** |
@@ -1186,7 +1186,7 @@ discard block |
||
| 1186 | 1186 | $conditions = []; |
| 1187 | 1187 | |
| 1188 | 1188 | if ($join->conditionalExpression) { |
| 1189 | - $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')'; |
|
| 1189 | + $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')'; |
|
| 1190 | 1190 | } |
| 1191 | 1191 | |
| 1192 | 1192 | $isUnconditionalJoin = empty($conditions); |
@@ -1194,7 +1194,7 @@ discard block |
||
| 1194 | 1194 | ? ' AND ' |
| 1195 | 1195 | : ' ON '; |
| 1196 | 1196 | |
| 1197 | - $sql .= $this->generateRangeVariableDeclarationSQL($joinDeclaration, !$isUnconditionalJoin); |
|
| 1197 | + $sql .= $this->generateRangeVariableDeclarationSQL($joinDeclaration, ! $isUnconditionalJoin); |
|
| 1198 | 1198 | |
| 1199 | 1199 | // Apply remaining inheritance restrictions |
| 1200 | 1200 | $discrSql = $this->_generateDiscriminatorColumnConditionSQL([$dqlAlias]); |
@@ -1211,7 +1211,7 @@ discard block |
||
| 1211 | 1211 | } |
| 1212 | 1212 | |
| 1213 | 1213 | if ($conditions) { |
| 1214 | - $sql .= $condExprConjunction . implode(' AND ', $conditions); |
|
| 1214 | + $sql .= $condExprConjunction.implode(' AND ', $conditions); |
|
| 1215 | 1215 | } |
| 1216 | 1216 | |
| 1217 | 1217 | break; |
@@ -1241,7 +1241,7 @@ discard block |
||
| 1241 | 1241 | $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression); |
| 1242 | 1242 | } |
| 1243 | 1243 | |
| 1244 | - $sql .= implode(', ', $scalarExpressions) . ')'; |
|
| 1244 | + $sql .= implode(', ', $scalarExpressions).')'; |
|
| 1245 | 1245 | |
| 1246 | 1246 | return $sql; |
| 1247 | 1247 | } |
@@ -1263,7 +1263,7 @@ discard block |
||
| 1263 | 1263 | ? $this->conn->quote($nullIfExpression->secondExpression) |
| 1264 | 1264 | : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression); |
| 1265 | 1265 | |
| 1266 | - return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')'; |
|
| 1266 | + return 'NULLIF('.$firstExpression.', '.$secondExpression.')'; |
|
| 1267 | 1267 | } |
| 1268 | 1268 | |
| 1269 | 1269 | /** |
@@ -1278,11 +1278,11 @@ discard block |
||
| 1278 | 1278 | $sql = 'CASE'; |
| 1279 | 1279 | |
| 1280 | 1280 | foreach ($generalCaseExpression->whenClauses as $whenClause) { |
| 1281 | - $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
| 1282 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
| 1281 | + $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
| 1282 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
| 1283 | 1283 | } |
| 1284 | 1284 | |
| 1285 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END'; |
|
| 1285 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END'; |
|
| 1286 | 1286 | |
| 1287 | 1287 | return $sql; |
| 1288 | 1288 | } |
@@ -1296,14 +1296,14 @@ discard block |
||
| 1296 | 1296 | */ |
| 1297 | 1297 | public function walkSimpleCaseExpression($simpleCaseExpression) |
| 1298 | 1298 | { |
| 1299 | - $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
| 1299 | + $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
| 1300 | 1300 | |
| 1301 | 1301 | foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) { |
| 1302 | - $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
| 1303 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
| 1302 | + $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
| 1303 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
| 1304 | 1304 | } |
| 1305 | 1305 | |
| 1306 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END'; |
|
| 1306 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END'; |
|
| 1307 | 1307 | |
| 1308 | 1308 | return $sql; |
| 1309 | 1309 | } |
@@ -1337,14 +1337,14 @@ discard block |
||
| 1337 | 1337 | $fieldMapping = $class->fieldMappings[$fieldName]; |
| 1338 | 1338 | $columnName = $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform); |
| 1339 | 1339 | $columnAlias = $this->getSQLColumnAlias($fieldMapping['columnName']); |
| 1340 | - $col = $sqlTableAlias . '.' . $columnName; |
|
| 1340 | + $col = $sqlTableAlias.'.'.$columnName; |
|
| 1341 | 1341 | |
| 1342 | 1342 | if (isset($fieldMapping['requireSQLConversion'])) { |
| 1343 | 1343 | $type = Type::getType($fieldMapping['type']); |
| 1344 | 1344 | $col = $type->convertToPHPValueSQL($col, $this->conn->getDatabasePlatform()); |
| 1345 | 1345 | } |
| 1346 | 1346 | |
| 1347 | - $sql .= $col . ' AS ' . $columnAlias; |
|
| 1347 | + $sql .= $col.' AS '.$columnAlias; |
|
| 1348 | 1348 | |
| 1349 | 1349 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
| 1350 | 1350 | |
@@ -1369,7 +1369,7 @@ discard block |
||
| 1369 | 1369 | $columnAlias = $this->getSQLColumnAlias('sclr'); |
| 1370 | 1370 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
| 1371 | 1371 | |
| 1372 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
| 1372 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
| 1373 | 1373 | |
| 1374 | 1374 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
| 1375 | 1375 | |
@@ -1383,7 +1383,7 @@ discard block |
||
| 1383 | 1383 | $columnAlias = $this->getSQLColumnAlias('sclr'); |
| 1384 | 1384 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
| 1385 | 1385 | |
| 1386 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
| 1386 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
| 1387 | 1387 | |
| 1388 | 1388 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
| 1389 | 1389 | |
@@ -1394,7 +1394,7 @@ discard block |
||
| 1394 | 1394 | break; |
| 1395 | 1395 | |
| 1396 | 1396 | case ($expr instanceof AST\NewObjectExpression): |
| 1397 | - $sql .= $this->walkNewObject($expr,$selectExpression->fieldIdentificationVariable); |
|
| 1397 | + $sql .= $this->walkNewObject($expr, $selectExpression->fieldIdentificationVariable); |
|
| 1398 | 1398 | break; |
| 1399 | 1399 | |
| 1400 | 1400 | default: |
@@ -1435,14 +1435,14 @@ discard block |
||
| 1435 | 1435 | $columnAlias = $this->getSQLColumnAlias($mapping['columnName']); |
| 1436 | 1436 | $quotedColumnName = $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform); |
| 1437 | 1437 | |
| 1438 | - $col = $sqlTableAlias . '.' . $quotedColumnName; |
|
| 1438 | + $col = $sqlTableAlias.'.'.$quotedColumnName; |
|
| 1439 | 1439 | |
| 1440 | 1440 | if (isset($mapping['requireSQLConversion'])) { |
| 1441 | 1441 | $type = Type::getType($mapping['type']); |
| 1442 | 1442 | $col = $type->convertToPHPValueSQL($col, $this->platform); |
| 1443 | 1443 | } |
| 1444 | 1444 | |
| 1445 | - $sqlParts[] = $col . ' AS '. $columnAlias; |
|
| 1445 | + $sqlParts[] = $col.' AS '.$columnAlias; |
|
| 1446 | 1446 | |
| 1447 | 1447 | $this->scalarResultAliasMap[$resultAlias][] = $columnAlias; |
| 1448 | 1448 | |
@@ -1459,21 +1459,21 @@ discard block |
||
| 1459 | 1459 | $sqlTableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias); |
| 1460 | 1460 | |
| 1461 | 1461 | foreach ($subClass->fieldMappings as $fieldName => $mapping) { |
| 1462 | - if (isset($mapping['inherited']) || ($partialFieldSet && !in_array($fieldName, $partialFieldSet))) { |
|
| 1462 | + if (isset($mapping['inherited']) || ($partialFieldSet && ! in_array($fieldName, $partialFieldSet))) { |
|
| 1463 | 1463 | continue; |
| 1464 | 1464 | } |
| 1465 | 1465 | |
| 1466 | 1466 | $columnAlias = $this->getSQLColumnAlias($mapping['columnName']); |
| 1467 | 1467 | $quotedColumnName = $this->quoteStrategy->getColumnName($fieldName, $subClass, $this->platform); |
| 1468 | 1468 | |
| 1469 | - $col = $sqlTableAlias . '.' . $quotedColumnName; |
|
| 1469 | + $col = $sqlTableAlias.'.'.$quotedColumnName; |
|
| 1470 | 1470 | |
| 1471 | 1471 | if (isset($mapping['requireSQLConversion'])) { |
| 1472 | 1472 | $type = Type::getType($mapping['type']); |
| 1473 | 1473 | $col = $type->convertToPHPValueSQL($col, $this->platform); |
| 1474 | 1474 | } |
| 1475 | 1475 | |
| 1476 | - $sqlParts[] = $col . ' AS ' . $columnAlias; |
|
| 1476 | + $sqlParts[] = $col.' AS '.$columnAlias; |
|
| 1477 | 1477 | |
| 1478 | 1478 | $this->scalarResultAliasMap[$resultAlias][] = $columnAlias; |
| 1479 | 1479 | |
@@ -1493,7 +1493,7 @@ discard block |
||
| 1493 | 1493 | */ |
| 1494 | 1494 | public function walkQuantifiedExpression($qExpr) |
| 1495 | 1495 | { |
| 1496 | - return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')'; |
|
| 1496 | + return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')'; |
|
| 1497 | 1497 | } |
| 1498 | 1498 | |
| 1499 | 1499 | /** |
@@ -1533,7 +1533,7 @@ discard block |
||
| 1533 | 1533 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl); |
| 1534 | 1534 | } |
| 1535 | 1535 | |
| 1536 | - return ' FROM ' . implode(', ', $sqlParts); |
|
| 1536 | + return ' FROM '.implode(', ', $sqlParts); |
|
| 1537 | 1537 | } |
| 1538 | 1538 | |
| 1539 | 1539 | /** |
@@ -1541,7 +1541,7 @@ discard block |
||
| 1541 | 1541 | */ |
| 1542 | 1542 | public function walkSimpleSelectClause($simpleSelectClause) |
| 1543 | 1543 | { |
| 1544 | - return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
| 1544 | + return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
| 1545 | 1545 | . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression); |
| 1546 | 1546 | } |
| 1547 | 1547 | |
@@ -1560,10 +1560,10 @@ discard block |
||
| 1560 | 1560 | * @param null|string $newObjectResultAlias |
| 1561 | 1561 | * @return string The SQL. |
| 1562 | 1562 | */ |
| 1563 | - public function walkNewObject($newObjectExpression, $newObjectResultAlias=null) |
|
| 1563 | + public function walkNewObject($newObjectExpression, $newObjectResultAlias = null) |
|
| 1564 | 1564 | { |
| 1565 | 1565 | $sqlSelectExpressions = []; |
| 1566 | - $objIndex = $newObjectResultAlias?:$this->newObjectCounter++; |
|
| 1566 | + $objIndex = $newObjectResultAlias ?: $this->newObjectCounter++; |
|
| 1567 | 1567 | |
| 1568 | 1568 | foreach ($newObjectExpression->args as $argIndex => $e) { |
| 1569 | 1569 | $resultAlias = $this->scalarResultCounter++; |
@@ -1576,7 +1576,7 @@ discard block |
||
| 1576 | 1576 | break; |
| 1577 | 1577 | |
| 1578 | 1578 | case ($e instanceof AST\Subselect): |
| 1579 | - $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias; |
|
| 1579 | + $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias; |
|
| 1580 | 1580 | break; |
| 1581 | 1581 | |
| 1582 | 1582 | case ($e instanceof AST\PathExpression): |
@@ -1585,7 +1585,7 @@ discard block |
||
| 1585 | 1585 | $class = $qComp['metadata']; |
| 1586 | 1586 | $fieldType = $class->fieldMappings[$e->field]['type']; |
| 1587 | 1587 | |
| 1588 | - $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias; |
|
| 1588 | + $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias; |
|
| 1589 | 1589 | break; |
| 1590 | 1590 | |
| 1591 | 1591 | case ($e instanceof AST\Literal): |
@@ -1599,11 +1599,11 @@ discard block |
||
| 1599 | 1599 | break; |
| 1600 | 1600 | } |
| 1601 | 1601 | |
| 1602 | - $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias; |
|
| 1602 | + $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias; |
|
| 1603 | 1603 | break; |
| 1604 | 1604 | |
| 1605 | 1605 | default: |
| 1606 | - $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias; |
|
| 1606 | + $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias; |
|
| 1607 | 1607 | break; |
| 1608 | 1608 | } |
| 1609 | 1609 | |
@@ -1636,10 +1636,10 @@ discard block |
||
| 1636 | 1636 | case ($expr instanceof AST\Subselect): |
| 1637 | 1637 | $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
| 1638 | 1638 | |
| 1639 | - $columnAlias = 'sclr' . $this->aliasCounter++; |
|
| 1639 | + $columnAlias = 'sclr'.$this->aliasCounter++; |
|
| 1640 | 1640 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
| 1641 | 1641 | |
| 1642 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
| 1642 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
| 1643 | 1643 | break; |
| 1644 | 1644 | |
| 1645 | 1645 | case ($expr instanceof AST\Functions\FunctionNode): |
@@ -1656,7 +1656,7 @@ discard block |
||
| 1656 | 1656 | $columnAlias = $this->getSQLColumnAlias('sclr'); |
| 1657 | 1657 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
| 1658 | 1658 | |
| 1659 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
| 1659 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
| 1660 | 1660 | break; |
| 1661 | 1661 | |
| 1662 | 1662 | case ($expr instanceof AST\ParenthesisExpression): |
@@ -1676,8 +1676,8 @@ discard block |
||
| 1676 | 1676 | */ |
| 1677 | 1677 | public function walkAggregateExpression($aggExpression) |
| 1678 | 1678 | { |
| 1679 | - return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
| 1680 | - . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')'; |
|
| 1679 | + return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
| 1680 | + . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')'; |
|
| 1681 | 1681 | } |
| 1682 | 1682 | |
| 1683 | 1683 | /** |
@@ -1691,7 +1691,7 @@ discard block |
||
| 1691 | 1691 | $sqlParts[] = $this->walkGroupByItem($groupByItem); |
| 1692 | 1692 | } |
| 1693 | 1693 | |
| 1694 | - return ' GROUP BY ' . implode(', ', $sqlParts); |
|
| 1694 | + return ' GROUP BY '.implode(', ', $sqlParts); |
|
| 1695 | 1695 | } |
| 1696 | 1696 | |
| 1697 | 1697 | /** |
@@ -1748,7 +1748,7 @@ discard block |
||
| 1748 | 1748 | { |
| 1749 | 1749 | $class = $this->em->getClassMetadata($deleteClause->abstractSchemaName); |
| 1750 | 1750 | $tableName = $class->getTableName(); |
| 1751 | - $sql = 'DELETE FROM ' . $this->quoteStrategy->getTableName($class, $this->platform); |
|
| 1751 | + $sql = 'DELETE FROM '.$this->quoteStrategy->getTableName($class, $this->platform); |
|
| 1752 | 1752 | |
| 1753 | 1753 | $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable); |
| 1754 | 1754 | $this->rootAliases[] = $deleteClause->aliasIdentificationVariable; |
@@ -1763,12 +1763,12 @@ discard block |
||
| 1763 | 1763 | { |
| 1764 | 1764 | $class = $this->em->getClassMetadata($updateClause->abstractSchemaName); |
| 1765 | 1765 | $tableName = $class->getTableName(); |
| 1766 | - $sql = 'UPDATE ' . $this->quoteStrategy->getTableName($class, $this->platform); |
|
| 1766 | + $sql = 'UPDATE '.$this->quoteStrategy->getTableName($class, $this->platform); |
|
| 1767 | 1767 | |
| 1768 | 1768 | $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable); |
| 1769 | 1769 | $this->rootAliases[] = $updateClause->aliasIdentificationVariable; |
| 1770 | 1770 | |
| 1771 | - $sql .= ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
| 1771 | + $sql .= ' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
| 1772 | 1772 | |
| 1773 | 1773 | return $sql; |
| 1774 | 1774 | } |
@@ -1781,7 +1781,7 @@ discard block |
||
| 1781 | 1781 | $useTableAliasesBefore = $this->useSqlTableAliases; |
| 1782 | 1782 | $this->useSqlTableAliases = false; |
| 1783 | 1783 | |
| 1784 | - $sql = $this->walkPathExpression($updateItem->pathExpression) . ' = '; |
|
| 1784 | + $sql = $this->walkPathExpression($updateItem->pathExpression).' = '; |
|
| 1785 | 1785 | $newValue = $updateItem->newValue; |
| 1786 | 1786 | |
| 1787 | 1787 | switch (true) { |
@@ -1824,7 +1824,7 @@ discard block |
||
| 1824 | 1824 | |
| 1825 | 1825 | if (count($filterClauses)) { |
| 1826 | 1826 | if ($condSql) { |
| 1827 | - $condSql = '(' . $condSql . ') AND '; |
|
| 1827 | + $condSql = '('.$condSql.') AND '; |
|
| 1828 | 1828 | } |
| 1829 | 1829 | |
| 1830 | 1830 | $condSql .= implode(' AND ', $filterClauses); |
@@ -1832,11 +1832,11 @@ discard block |
||
| 1832 | 1832 | } |
| 1833 | 1833 | |
| 1834 | 1834 | if ($condSql) { |
| 1835 | - return ' WHERE ' . (( ! $discrSql) ? $condSql : '(' . $condSql . ') AND ' . $discrSql); |
|
| 1835 | + return ' WHERE '.(( ! $discrSql) ? $condSql : '('.$condSql.') AND '.$discrSql); |
|
| 1836 | 1836 | } |
| 1837 | 1837 | |
| 1838 | 1838 | if ($discrSql) { |
| 1839 | - return ' WHERE ' . $discrSql; |
|
| 1839 | + return ' WHERE '.$discrSql; |
|
| 1840 | 1840 | } |
| 1841 | 1841 | |
| 1842 | 1842 | return ''; |
@@ -1879,7 +1879,7 @@ discard block |
||
| 1879 | 1879 | // if only one ConditionalPrimary is defined |
| 1880 | 1880 | return ( ! ($factor instanceof AST\ConditionalFactor)) |
| 1881 | 1881 | ? $this->walkConditionalPrimary($factor) |
| 1882 | - : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary); |
|
| 1882 | + : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary); |
|
| 1883 | 1883 | } |
| 1884 | 1884 | |
| 1885 | 1885 | /** |
@@ -1894,7 +1894,7 @@ discard block |
||
| 1894 | 1894 | if ($primary->isConditionalExpression()) { |
| 1895 | 1895 | $condExpr = $primary->conditionalExpression; |
| 1896 | 1896 | |
| 1897 | - return '(' . $this->walkConditionalExpression($condExpr) . ')'; |
|
| 1897 | + return '('.$this->walkConditionalExpression($condExpr).')'; |
|
| 1898 | 1898 | } |
| 1899 | 1899 | } |
| 1900 | 1900 | |
@@ -1905,7 +1905,7 @@ discard block |
||
| 1905 | 1905 | { |
| 1906 | 1906 | $sql = ($existsExpr->not) ? 'NOT ' : ''; |
| 1907 | 1907 | |
| 1908 | - $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')'; |
|
| 1908 | + $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')'; |
|
| 1909 | 1909 | |
| 1910 | 1910 | return $sql; |
| 1911 | 1911 | } |
@@ -1949,7 +1949,7 @@ discard block |
||
| 1949 | 1949 | $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName()); |
| 1950 | 1950 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
| 1951 | 1951 | |
| 1952 | - $sql .= $this->quoteStrategy->getTableName($targetClass, $this->platform) . ' ' . $targetTableAlias . ' WHERE '; |
|
| 1952 | + $sql .= $this->quoteStrategy->getTableName($targetClass, $this->platform).' '.$targetTableAlias.' WHERE '; |
|
| 1953 | 1953 | |
| 1954 | 1954 | $owningAssoc = $targetClass->associationMappings[$assoc['mappedBy']]; |
| 1955 | 1955 | $sqlParts = []; |
@@ -1957,7 +1957,7 @@ discard block |
||
| 1957 | 1957 | foreach ($owningAssoc['targetToSourceKeyColumns'] as $targetColumn => $sourceColumn) { |
| 1958 | 1958 | $targetColumn = $this->quoteStrategy->getColumnName($class->fieldNames[$targetColumn], $class, $this->platform); |
| 1959 | 1959 | |
| 1960 | - $sqlParts[] = $sourceTableAlias . '.' . $targetColumn . ' = ' . $targetTableAlias . '.' . $sourceColumn; |
|
| 1960 | + $sqlParts[] = $sourceTableAlias.'.'.$targetColumn.' = '.$targetTableAlias.'.'.$sourceColumn; |
|
| 1961 | 1961 | } |
| 1962 | 1962 | |
| 1963 | 1963 | foreach ($this->quoteStrategy->getIdentifierColumnNames($targetClass, $this->platform) as $targetColumnName) { |
@@ -1965,7 +1965,7 @@ discard block |
||
| 1965 | 1965 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
| 1966 | 1966 | } |
| 1967 | 1967 | |
| 1968 | - $sqlParts[] = $targetTableAlias . '.' . $targetColumnName . ' = ' . $entitySql; |
|
| 1968 | + $sqlParts[] = $targetTableAlias.'.'.$targetColumnName.' = '.$entitySql; |
|
| 1969 | 1969 | } |
| 1970 | 1970 | |
| 1971 | 1971 | $sql .= implode(' AND ', $sqlParts); |
@@ -1981,8 +1981,8 @@ discard block |
||
| 1981 | 1981 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
| 1982 | 1982 | |
| 1983 | 1983 | // join to target table |
| 1984 | - $sql .= $this->quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $this->platform) . ' ' . $joinTableAlias |
|
| 1985 | - . ' INNER JOIN ' . $this->quoteStrategy->getTableName($targetClass, $this->platform) . ' ' . $targetTableAlias . ' ON '; |
|
| 1984 | + $sql .= $this->quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $this->platform).' '.$joinTableAlias |
|
| 1985 | + . ' INNER JOIN '.$this->quoteStrategy->getTableName($targetClass, $this->platform).' '.$targetTableAlias.' ON '; |
|
| 1986 | 1986 | |
| 1987 | 1987 | // join conditions |
| 1988 | 1988 | $joinColumns = $assoc['isOwningSide'] ? $joinTable['inverseJoinColumns'] : $joinTable['joinColumns']; |
@@ -1991,7 +1991,7 @@ discard block |
||
| 1991 | 1991 | foreach ($joinColumns as $joinColumn) { |
| 1992 | 1992 | $targetColumn = $this->quoteStrategy->getColumnName($targetClass->fieldNames[$joinColumn['referencedColumnName']], $targetClass, $this->platform); |
| 1993 | 1993 | |
| 1994 | - $joinSqlParts[] = $joinTableAlias . '.' . $joinColumn['name'] . ' = ' . $targetTableAlias . '.' . $targetColumn; |
|
| 1994 | + $joinSqlParts[] = $joinTableAlias.'.'.$joinColumn['name'].' = '.$targetTableAlias.'.'.$targetColumn; |
|
| 1995 | 1995 | } |
| 1996 | 1996 | |
| 1997 | 1997 | $sql .= implode(' AND ', $joinSqlParts); |
@@ -2003,7 +2003,7 @@ discard block |
||
| 2003 | 2003 | foreach ($joinColumns as $joinColumn) { |
| 2004 | 2004 | $targetColumn = $this->quoteStrategy->getColumnName($class->fieldNames[$joinColumn['referencedColumnName']], $class, $this->platform); |
| 2005 | 2005 | |
| 2006 | - $sqlParts[] = $joinTableAlias . '.' . $joinColumn['name'] . ' = ' . $sourceTableAlias . '.' . $targetColumn; |
|
| 2006 | + $sqlParts[] = $joinTableAlias.'.'.$joinColumn['name'].' = '.$sourceTableAlias.'.'.$targetColumn; |
|
| 2007 | 2007 | } |
| 2008 | 2008 | |
| 2009 | 2009 | foreach ($this->quoteStrategy->getIdentifierColumnNames($targetClass, $this->platform) as $targetColumnName) { |
@@ -2011,13 +2011,13 @@ discard block |
||
| 2011 | 2011 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
| 2012 | 2012 | } |
| 2013 | 2013 | |
| 2014 | - $sqlParts[] = $targetTableAlias . '.' . $targetColumnName . ' IN (' . $entitySql . ')'; |
|
| 2014 | + $sqlParts[] = $targetTableAlias.'.'.$targetColumnName.' IN ('.$entitySql.')'; |
|
| 2015 | 2015 | } |
| 2016 | 2016 | |
| 2017 | 2017 | $sql .= implode(' AND ', $sqlParts); |
| 2018 | 2018 | } |
| 2019 | 2019 | |
| 2020 | - return $sql . ')'; |
|
| 2020 | + return $sql.')'; |
|
| 2021 | 2021 | } |
| 2022 | 2022 | |
| 2023 | 2023 | /** |
@@ -2028,7 +2028,7 @@ discard block |
||
| 2028 | 2028 | $sizeFunc = new AST\Functions\SizeFunction('size'); |
| 2029 | 2029 | $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression; |
| 2030 | 2030 | |
| 2031 | - return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
| 2031 | + return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
| 2032 | 2032 | } |
| 2033 | 2033 | |
| 2034 | 2034 | /** |
@@ -2037,19 +2037,19 @@ discard block |
||
| 2037 | 2037 | public function walkNullComparisonExpression($nullCompExpr) |
| 2038 | 2038 | { |
| 2039 | 2039 | $expression = $nullCompExpr->expression; |
| 2040 | - $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL'; |
|
| 2040 | + $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL'; |
|
| 2041 | 2041 | |
| 2042 | 2042 | // Handle ResultVariable |
| 2043 | 2043 | if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) { |
| 2044 | - return $this->walkResultVariable($expression) . $comparison; |
|
| 2044 | + return $this->walkResultVariable($expression).$comparison; |
|
| 2045 | 2045 | } |
| 2046 | 2046 | |
| 2047 | 2047 | // Handle InputParameter mapping inclusion to ParserResult |
| 2048 | 2048 | if ($expression instanceof AST\InputParameter) { |
| 2049 | - return $this->walkInputParameter($expression) . $comparison; |
|
| 2049 | + return $this->walkInputParameter($expression).$comparison; |
|
| 2050 | 2050 | } |
| 2051 | 2051 | |
| 2052 | - return $expression->dispatch($this) . $comparison; |
|
| 2052 | + return $expression->dispatch($this).$comparison; |
|
| 2053 | 2053 | } |
| 2054 | 2054 | |
| 2055 | 2055 | /** |
@@ -2057,7 +2057,7 @@ discard block |
||
| 2057 | 2057 | */ |
| 2058 | 2058 | public function walkInExpression($inExpr) |
| 2059 | 2059 | { |
| 2060 | - $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN ('; |
|
| 2060 | + $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN ('; |
|
| 2061 | 2061 | |
| 2062 | 2062 | $sql .= ($inExpr->subselect) |
| 2063 | 2063 | ? $this->walkSubselect($inExpr->subselect) |
@@ -2084,10 +2084,10 @@ discard block |
||
| 2084 | 2084 | } |
| 2085 | 2085 | |
| 2086 | 2086 | if ($this->useSqlTableAliases) { |
| 2087 | - $sql .= $this->getSQLTableAlias($discrClass->getTableName(), $dqlAlias) . '.'; |
|
| 2087 | + $sql .= $this->getSQLTableAlias($discrClass->getTableName(), $dqlAlias).'.'; |
|
| 2088 | 2088 | } |
| 2089 | 2089 | |
| 2090 | - $sql .= $class->discriminatorColumn['name'] . ($instanceOfExpr->not ? ' NOT IN ' : ' IN '); |
|
| 2090 | + $sql .= $class->discriminatorColumn['name'].($instanceOfExpr->not ? ' NOT IN ' : ' IN '); |
|
| 2091 | 2091 | $sql .= $this->getChildDiscriminatorsFromClassMetadata($discrClass, $instanceOfExpr); |
| 2092 | 2092 | |
| 2093 | 2093 | return $sql; |
@@ -2134,8 +2134,8 @@ discard block |
||
| 2134 | 2134 | $sql .= ' NOT'; |
| 2135 | 2135 | } |
| 2136 | 2136 | |
| 2137 | - $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
| 2138 | - . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
| 2137 | + $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
| 2138 | + . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
| 2139 | 2139 | |
| 2140 | 2140 | return $sql; |
| 2141 | 2141 | } |
@@ -2150,7 +2150,7 @@ discard block |
||
| 2150 | 2150 | ? $this->walkResultVariable($stringExpr) |
| 2151 | 2151 | : $stringExpr->dispatch($this); |
| 2152 | 2152 | |
| 2153 | - $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE '; |
|
| 2153 | + $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE '; |
|
| 2154 | 2154 | |
| 2155 | 2155 | if ($likeExpr->stringPattern instanceof AST\InputParameter) { |
| 2156 | 2156 | $sql .= $this->walkInputParameter($likeExpr->stringPattern); |
@@ -2163,7 +2163,7 @@ discard block |
||
| 2163 | 2163 | } |
| 2164 | 2164 | |
| 2165 | 2165 | if ($likeExpr->escapeChar) { |
| 2166 | - $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar); |
|
| 2166 | + $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar); |
|
| 2167 | 2167 | } |
| 2168 | 2168 | |
| 2169 | 2169 | return $sql; |
@@ -2190,7 +2190,7 @@ discard block |
||
| 2190 | 2190 | ? $leftExpr->dispatch($this) |
| 2191 | 2191 | : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr)); |
| 2192 | 2192 | |
| 2193 | - $sql .= ' ' . $compExpr->operator . ' '; |
|
| 2193 | + $sql .= ' '.$compExpr->operator.' '; |
|
| 2194 | 2194 | |
| 2195 | 2195 | $sql .= ($rightExpr instanceof AST\Node) |
| 2196 | 2196 | ? $rightExpr->dispatch($this) |
@@ -2222,7 +2222,7 @@ discard block |
||
| 2222 | 2222 | { |
| 2223 | 2223 | return ($arithmeticExpr->isSimpleArithmeticExpression()) |
| 2224 | 2224 | ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression) |
| 2225 | - : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')'; |
|
| 2225 | + : '('.$this->walkSubselect($arithmeticExpr->subselect).')'; |
|
| 2226 | 2226 | } |
| 2227 | 2227 | |
| 2228 | 2228 | /** |
@@ -2276,7 +2276,7 @@ discard block |
||
| 2276 | 2276 | |
| 2277 | 2277 | $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : ''); |
| 2278 | 2278 | |
| 2279 | - return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
| 2279 | + return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
| 2280 | 2280 | } |
| 2281 | 2281 | |
| 2282 | 2282 | /** |
@@ -2289,7 +2289,7 @@ discard block |
||
| 2289 | 2289 | public function walkArithmeticPrimary($primary) |
| 2290 | 2290 | { |
| 2291 | 2291 | if ($primary instanceof AST\SimpleArithmeticExpression) { |
| 2292 | - return '(' . $this->walkSimpleArithmeticExpression($primary) . ')'; |
|
| 2292 | + return '('.$this->walkSimpleArithmeticExpression($primary).')'; |
|
| 2293 | 2293 | } |
| 2294 | 2294 | |
| 2295 | 2295 | if ($primary instanceof AST\Node) { |
@@ -2353,6 +2353,6 @@ discard block |
||
| 2353 | 2353 | $sqlParameterList[] = $this->conn->quote($dis); |
| 2354 | 2354 | } |
| 2355 | 2355 | |
| 2356 | - return '(' . implode(', ', $sqlParameterList) . ')'; |
|
| 2356 | + return '('.implode(', ', $sqlParameterList).')'; |
|
| 2357 | 2357 | } |
| 2358 | 2358 | } |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | /** |
| 34 | 34 | * @var string |
| 35 | 35 | */ |
| 36 | - protected $preSeparator = ''; |
|
| 36 | + protected $preSeparator = ''; |
|
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | 39 | * @var string |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $schema = []; |
| 76 | 76 | foreach ($this->from as $path) { |
| 77 | 77 | if (is_dir($path)) { |
| 78 | - $files = glob($path . '/*.yml'); |
|
| 78 | + $files = glob($path.'/*.yml'); |
|
| 79 | 79 | foreach ($files as $file) { |
| 80 | 80 | $schema = array_merge($schema, (array) Yaml::parse(file_get_contents($file))); |
| 81 | 81 | } |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | $metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE); |
| 239 | 239 | |
| 240 | 240 | $definition = [ |
| 241 | - 'sequenceName' => is_array($column['sequence']) ? $column['sequence']['name']:$column['sequence'] |
|
| 241 | + 'sequenceName' => is_array($column['sequence']) ? $column['sequence']['name'] : $column['sequence'] |
|
| 242 | 242 | ]; |
| 243 | 243 | |
| 244 | 244 | if (isset($column['sequence']['size'])) { |