| @@ -21,7 +21,6 @@ | ||
| 21 | 21 | namespace Doctrine\ORM\Cache; | 
| 22 | 22 | |
| 23 | 23 | use Doctrine\Common\Util\ClassUtils; | 
| 24 | - | |
| 25 | 24 | use Doctrine\ORM\Query; | 
| 26 | 25 | use Doctrine\ORM\Mapping\ClassMetadata; | 
| 27 | 26 | use Doctrine\ORM\EntityManagerInterface; | 
| @@ -109,7 +109,7 @@ discard block | ||
| 109 | 109 | |
| 110 | 110 | $targetAssoc = $targetClassMetadata->associationMappings[$fieldName]; | 
| 111 | 111 | |
| 112 | -                    foreach($assoc['targetToSourceKeyColumns'] as $referencedColumn => $localColumn) { | |
| 112 | +                    foreach ($assoc['targetToSourceKeyColumns'] as $referencedColumn => $localColumn) { | |
| 113 | 113 |                          if (isset($targetAssoc['sourceToTargetKeyColumns'][$referencedColumn])) { | 
| 114 | 114 | $data[$localColumn] = $fieldValue; | 
| 115 | 115 | } | 
| @@ -161,7 +161,7 @@ discard block | ||
| 161 | 161 | } | 
| 162 | 162 | |
| 163 | 163 |          foreach ($metadata->associationMappings as $name => $assoc) { | 
| 164 | -            if ( ! isset($assoc['cache']) ||  ! isset($data[$name])) { | |
| 164 | +            if ( ! isset($assoc['cache']) || ! isset($data[$name])) { | |
| 165 | 165 | continue; | 
| 166 | 166 | } | 
| 167 | 167 | |
| @@ -282,7 +282,7 @@ | ||
| 282 | 282 | /** | 
| 283 | 283 | * Generates a string of currently query | 
| 284 | 284 | * | 
| 285 | - * @param array $query | |
| 285 | + * @param string $query | |
| 286 | 286 | * @param string $criteria | 
| 287 | 287 | * @param array $orderBy | 
| 288 | 288 | * @param integer $limit | 
| @@ -31,7 +31,6 @@ | ||
| 31 | 31 | use Doctrine\ORM\PersistentCollection; | 
| 32 | 32 | use Doctrine\ORM\EntityManagerInterface; | 
| 33 | 33 | use Doctrine\ORM\Persisters\Entity\EntityPersister; | 
| 34 | - | |
| 35 | 34 | use Doctrine\Common\Util\ClassUtils; | 
| 36 | 35 | use Doctrine\Common\Collections\Criteria; | 
| 37 | 36 | |
| @@ -296,7 +296,7 @@ | ||
| 296 | 296 | ? $this->persister->expandCriteriaParameters($criteria) | 
| 297 | 297 | : $this->persister->expandParameters($criteria); | 
| 298 | 298 | |
| 299 | - return sha1($query . serialize($params) . serialize($orderBy) . $limit . $offset); | |
| 299 | + return sha1($query.serialize($params).serialize($orderBy).$limit.$offset); | |
| 300 | 300 | } | 
| 301 | 301 | |
| 302 | 302 | /** | 
| @@ -41,9 +41,9 @@ discard block | ||
| 41 | 41 | */ | 
| 42 | 42 | abstract class AbstractEntityPersister implements CachedEntityPersister | 
| 43 | 43 |  { | 
| 44 | - /** | |
| 45 | - * @var \Doctrine\ORM\UnitOfWork | |
| 46 | - */ | |
| 44 | + /** | |
| 45 | + * @var \Doctrine\ORM\UnitOfWork | |
| 46 | + */ | |
| 47 | 47 | protected $uow; | 
| 48 | 48 | |
| 49 | 49 | /** | 
| @@ -61,9 +61,9 @@ discard block | ||
| 61 | 61 | */ | 
| 62 | 62 | protected $class; | 
| 63 | 63 | |
| 64 | - /** | |
| 65 | - * @var array | |
| 66 | - */ | |
| 64 | + /** | |
| 65 | + * @var array | |
| 66 | + */ | |
| 67 | 67 | protected $queuedCache = []; | 
| 68 | 68 | |
| 69 | 69 | /** | 
| @@ -70,8 +70,6 @@ | ||
| 70 | 70 | * Returns a join column name for a property. | 
| 71 | 71 | * | 
| 72 | 72 | * @param string $propertyName A property name. | 
| 73 | - * @param string|null $className The fully-qualified class name. | |
| 74 | - * This parameter is omitted from the signature due to BC | |
| 75 | 73 | * | 
| 76 | 74 | * @return string A join column name. | 
| 77 | 75 | */ | 
| @@ -49,7 +49,7 @@ | ||
| 49 | 49 | /** | 
| 50 | 50 | * Gets the SQL query. | 
| 51 | 51 | * | 
| 52 | - * @return mixed The built SQL query or an array of all SQL queries. | |
| 52 | + * @return string The built SQL query or an array of all SQL queries. | |
| 53 | 53 | * | 
| 54 | 54 | * @override | 
| 55 | 55 | */ | 
| @@ -579,7 +579,7 @@ | ||
| 579 | 579 | * Internal note: Tried to implement Serializable first but that did not work well | 
| 580 | 580 | * with circular references. This solution seems simpler and works well. | 
| 581 | 581 | * | 
| 582 | - * @return array | |
| 582 | + * @return string[] | |
| 583 | 583 | */ | 
| 584 | 584 | public function __sleep() | 
| 585 | 585 |      { | 
| @@ -403,7 +403,7 @@ discard block | ||
| 403 | 403 | */ | 
| 404 | 404 | public function containsKey($key) | 
| 405 | 405 |      { | 
| 406 | - if (! $this->initialized && $this->association['fetch'] === ClassMetadata::FETCH_EXTRA_LAZY | |
| 406 | + if ( ! $this->initialized && $this->association['fetch'] === ClassMetadata::FETCH_EXTRA_LAZY | |
| 407 | 407 |              && isset($this->association['indexBy'])) { | 
| 408 | 408 | $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association); | 
| 409 | 409 | |
| @@ -436,7 +436,7 @@ discard block | ||
| 436 | 436 | && $this->association['fetch'] === ClassMetadata::FETCH_EXTRA_LAZY | 
| 437 | 437 | && isset($this->association['indexBy']) | 
| 438 | 438 |          ) { | 
| 439 | -            if (!$this->typeClass->isIdentifierComposite && $this->typeClass->isIdentifier($this->association['indexBy'])) { | |
| 439 | +            if ( ! $this->typeClass->isIdentifierComposite && $this->typeClass->isIdentifier($this->association['indexBy'])) { | |
| 440 | 440 | return $this->em->find($this->typeClass->name, $key); | 
| 441 | 441 | } | 
| 442 | 442 | |
| @@ -20,7 +20,6 @@ | ||
| 20 | 20 | namespace Doctrine\ORM\Query; | 
| 21 | 21 | |
| 22 | 22 | use Doctrine\Common\Collections\ArrayCollection; | 
| 23 | - | |
| 24 | 23 | use Doctrine\Common\Collections\Expr\ExpressionVisitor; | 
| 25 | 24 | use Doctrine\Common\Collections\Expr\Comparison; | 
| 26 | 25 | use Doctrine\Common\Collections\Expr\CompositeExpression; | 
| @@ -114,7 +114,7 @@ discard block | ||
| 114 | 114 | $expressionList[] = $this->dispatch($child); | 
| 115 | 115 | } | 
| 116 | 116 | |
| 117 | -        switch($expr->getType()) { | |
| 117 | +        switch ($expr->getType()) { | |
| 118 | 118 | case CompositeExpression::TYPE_AND: | 
| 119 | 119 | return new Expr\Andx($expressionList); | 
| 120 | 120 | |
| @@ -122,7 +122,7 @@ discard block | ||
| 122 | 122 | return new Expr\Orx($expressionList); | 
| 123 | 123 | |
| 124 | 124 | default: | 
| 125 | -                throw new \RuntimeException("Unknown composite " . $expr->getType()); | |
| 125 | +                throw new \RuntimeException("Unknown composite ".$expr->getType()); | |
| 126 | 126 | } | 
| 127 | 127 | } | 
| 128 | 128 | |
| @@ -136,10 +136,10 @@ discard block | ||
| 136 | 136 |              throw new QueryException('No aliases are set before invoking walkComparison().'); | 
| 137 | 137 | } | 
| 138 | 138 | |
| 139 | - $field = $this->queryAliases[0] . '.' . $comparison->getField(); | |
| 139 | + $field = $this->queryAliases[0].'.'.$comparison->getField(); | |
| 140 | 140 | |
| 141 | -        foreach($this->queryAliases as $alias) { | |
| 142 | -            if(strpos($comparison->getField() . '.', $alias . '.') === 0) { | |
| 141 | +        foreach ($this->queryAliases as $alias) { | |
| 142 | +            if (strpos($comparison->getField().'.', $alias.'.') === 0) { | |
| 143 | 143 | $field = $comparison->getField(); | 
| 144 | 144 | break; | 
| 145 | 145 | } | 
| @@ -149,13 +149,13 @@ discard block | ||
| 149 | 149 | |
| 150 | 150 |          foreach ($this->parameters as $parameter) { | 
| 151 | 151 |              if ($parameter->getName() === $parameterName) { | 
| 152 | - $parameterName .= '_' . count($this->parameters); | |
| 152 | + $parameterName .= '_'.count($this->parameters); | |
| 153 | 153 | break; | 
| 154 | 154 | } | 
| 155 | 155 | } | 
| 156 | 156 | |
| 157 | 157 | $parameter = new Parameter($parameterName, $this->walkValue($comparison->getValue())); | 
| 158 | - $placeholder = ':' . $parameterName; | |
| 158 | + $placeholder = ':'.$parameterName; | |
| 159 | 159 | |
| 160 | 160 |          switch ($comparison->getOperator()) { | 
| 161 | 161 | case Comparison::IN: | 
| @@ -182,17 +182,17 @@ discard block | ||
| 182 | 182 | |
| 183 | 183 | return $this->expr->neq($field, $placeholder); | 
| 184 | 184 | case Comparison::CONTAINS: | 
| 185 | -                $parameter->setValue('%' . $parameter->getValue() . '%', $parameter->getType()); | |
| 185 | +                $parameter->setValue('%'.$parameter->getValue().'%', $parameter->getType()); | |
| 186 | 186 | $this->parameters[] = $parameter; | 
| 187 | 187 | |
| 188 | 188 | return $this->expr->like($field, $placeholder); | 
| 189 | 189 | case Comparison::STARTS_WITH: | 
| 190 | - $parameter->setValue($parameter->getValue() . '%', $parameter->getType()); | |
| 190 | + $parameter->setValue($parameter->getValue().'%', $parameter->getType()); | |
| 191 | 191 | $this->parameters[] = $parameter; | 
| 192 | 192 | |
| 193 | 193 | return $this->expr->like($field, $placeholder); | 
| 194 | 194 | case Comparison::ENDS_WITH: | 
| 195 | -                $parameter->setValue('%' . $parameter->getValue(), $parameter->getType()); | |
| 195 | +                $parameter->setValue('%'.$parameter->getValue(), $parameter->getType()); | |
| 196 | 196 | $this->parameters[] = $parameter; | 
| 197 | 197 | |
| 198 | 198 | return $this->expr->like($field, $placeholder); | 
| @@ -208,7 +208,7 @@ discard block | ||
| 208 | 208 | ); | 
| 209 | 209 | } | 
| 210 | 210 | |
| 211 | -                throw new \RuntimeException("Unknown comparison operator: " . $comparison->getOperator()); | |
| 211 | +                throw new \RuntimeException("Unknown comparison operator: ".$comparison->getOperator()); | |
| 212 | 212 | } | 
| 213 | 213 | } | 
| 214 | 214 | |
| @@ -389,7 +389,7 @@ | ||
| 389 | 389 | /** | 
| 390 | 390 | * Adds a metadata parameter mappings. | 
| 391 | 391 | * | 
| 392 | - * @param mixed $parameter The parameter name in the SQL result set. | |
| 392 | + * @param string $parameter The parameter name in the SQL result set. | |
| 393 | 393 | * @param string $attribute The metadata attribute. | 
| 394 | 394 | */ | 
| 395 | 395 | public function addMetadataParameterMapping($parameter, $attribute) | 
| @@ -227,7 +227,9 @@ | ||
| 227 | 227 | $found = false; | 
| 228 | 228 | |
| 229 | 229 |          foreach (array_merge($this->metaMappings, $this->fieldMappings) as $columnName => $columnFieldName) { | 
| 230 | - if ( ! ($columnFieldName === $fieldName && $this->columnOwnerMap[$columnName] === $alias)) continue; | |
| 230 | +            if ( ! ($columnFieldName === $fieldName && $this->columnOwnerMap[$columnName] === $alias)) { | |
| 231 | + continue; | |
| 232 | + } | |
| 231 | 233 | |
| 232 | 234 | $this->addIndexByColumn($alias, $columnName); | 
| 233 | 235 | $found = true; | 
| @@ -1529,6 +1529,7 @@ | ||
| 1529 | 1529 | |
| 1530 | 1530 | /** | 
| 1531 | 1531 | * @param AST\NewObjectExpression $newObjectExpression | 
| 1532 | + * @param string $newObjectResultAlias | |
| 1532 | 1533 | * | 
| 1533 | 1534 | * @return string The SQL. | 
| 1534 | 1535 | */ | 
| @@ -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']); | 
| @@ -289,11 +289,11 @@ discard block | ||
| 289 | 289 | */ | 
| 290 | 290 | public function getSQLTableAlias($tableName, $dqlAlias = '') | 
| 291 | 291 |      { | 
| 292 | - $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : ''; | |
| 292 | + $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : ''; | |
| 293 | 293 | |
| 294 | 294 |          if ( ! isset($this->tableAliasMap[$tableName])) { | 
| 295 | 295 |              $this->tableAliasMap[$tableName] = (preg_match('/[a-z]/i', $tableName[0]) ? strtolower($tableName[0]) : 't') | 
| 296 | - . $this->tableAliasCounter++ . '_'; | |
| 296 | + . $this->tableAliasCounter++.'_'; | |
| 297 | 297 | } | 
| 298 | 298 | |
| 299 | 299 | return $this->tableAliasMap[$tableName]; | 
| @@ -311,7 +311,7 @@ discard block | ||
| 311 | 311 | */ | 
| 312 | 312 | public function setSQLTableAlias($tableName, $alias, $dqlAlias = '') | 
| 313 | 313 |      { | 
| 314 | - $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : ''; | |
| 314 | + $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : ''; | |
| 315 | 315 | |
| 316 | 316 | $this->tableAliasMap[$tableName] = $alias; | 
| 317 | 317 | |
| @@ -352,12 +352,12 @@ discard block | ||
| 352 | 352 | |
| 353 | 353 | // If this is a joined association we must use left joins to preserve the correct result. | 
| 354 | 354 | $sql .= isset($this->queryComponents[$dqlAlias]['relation']) ? ' LEFT ' : ' INNER '; | 
| 355 | - $sql .= 'JOIN ' . $this->quoteStrategy->getTableName($parentClass, $this->platform) . ' ' . $tableAlias . ' ON '; | |
| 355 | + $sql .= 'JOIN '.$this->quoteStrategy->getTableName($parentClass, $this->platform).' '.$tableAlias.' ON '; | |
| 356 | 356 | |
| 357 | 357 | $sqlParts = []; | 
| 358 | 358 | |
| 359 | 359 |              foreach ($this->quoteStrategy->getIdentifierColumnNames($class, $this->platform) as $columnName) { | 
| 360 | - $sqlParts[] = $baseTableAlias . '.' . $columnName . ' = ' . $tableAlias . '.' . $columnName; | |
| 360 | + $sqlParts[] = $baseTableAlias.'.'.$columnName.' = '.$tableAlias.'.'.$columnName; | |
| 361 | 361 | } | 
| 362 | 362 | |
| 363 | 363 | // Add filters on the root class | 
| @@ -378,12 +378,12 @@ discard block | ||
| 378 | 378 | $subClass = $this->em->getClassMetadata($subClassName); | 
| 379 | 379 | $tableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias); | 
| 380 | 380 | |
| 381 | - $sql .= ' LEFT JOIN ' . $this->quoteStrategy->getTableName($subClass, $this->platform) . ' ' . $tableAlias . ' ON '; | |
| 381 | + $sql .= ' LEFT JOIN '.$this->quoteStrategy->getTableName($subClass, $this->platform).' '.$tableAlias.' ON '; | |
| 382 | 382 | |
| 383 | 383 | $sqlParts = []; | 
| 384 | 384 | |
| 385 | 385 |              foreach ($this->quoteStrategy->getIdentifierColumnNames($subClass, $this->platform) as $columnName) { | 
| 386 | - $sqlParts[] = $baseTableAlias . '.' . $columnName . ' = ' . $tableAlias . '.' . $columnName; | |
| 386 | + $sqlParts[] = $baseTableAlias.'.'.$columnName.' = '.$tableAlias.'.'.$columnName; | |
| 387 | 387 | } | 
| 388 | 388 | |
| 389 | 389 |              $sql .= implode(' AND ', $sqlParts); | 
| @@ -415,7 +415,7 @@ discard block | ||
| 415 | 415 | ? $persister->getOwningTable($fieldName) | 
| 416 | 416 | : $qComp['metadata']->getTableName(); | 
| 417 | 417 | |
| 418 | - $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias) . '.' . $columnName; | |
| 418 | + $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias).'.'.$columnName; | |
| 419 | 419 | |
| 420 | 420 | // OrderByClause should replace an ordered relation. see - DDC-2475 | 
| 421 | 421 |                  if (isset($this->orderedColumnsMap[$orderedColumn])) { | 
| @@ -423,7 +423,7 @@ discard block | ||
| 423 | 423 | } | 
| 424 | 424 | |
| 425 | 425 | $this->orderedColumnsMap[$orderedColumn] = $orientation; | 
| 426 | - $orderedColumns[] = $orderedColumn . ' ' . $orientation; | |
| 426 | + $orderedColumns[] = $orderedColumn.' '.$orientation; | |
| 427 | 427 | } | 
| 428 | 428 | } | 
| 429 | 429 | |
| @@ -458,15 +458,15 @@ discard block | ||
| 458 | 458 | } | 
| 459 | 459 | |
| 460 | 460 | $sqlTableAlias = ($this->useSqlTableAliases) | 
| 461 | - ? $this->getSQLTableAlias($class->getTableName(), $dqlAlias) . '.' | |
| 461 | + ? $this->getSQLTableAlias($class->getTableName(), $dqlAlias).'.' | |
| 462 | 462 | : ''; | 
| 463 | 463 | |
| 464 | -            $sqlParts[] = $sqlTableAlias . $class->discriminatorColumn['name'] . ' IN (' . implode(', ', $values) . ')'; | |
| 464 | +            $sqlParts[] = $sqlTableAlias.$class->discriminatorColumn['name'].' IN ('.implode(', ', $values).')'; | |
| 465 | 465 | } | 
| 466 | 466 | |
| 467 | 467 |          $sql = implode(' AND ', $sqlParts); | 
| 468 | 468 | |
| 469 | -        return (count($sqlParts) > 1) ? '(' . $sql . ')' : $sql; | |
| 469 | +        return (count($sqlParts) > 1) ? '('.$sql.')' : $sql; | |
| 470 | 470 | } | 
| 471 | 471 | |
| 472 | 472 | /** | 
| @@ -479,11 +479,11 @@ discard block | ||
| 479 | 479 | */ | 
| 480 | 480 | private function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias) | 
| 481 | 481 |      { | 
| 482 | -        if (!$this->em->hasFilters()) { | |
| 482 | +        if ( ! $this->em->hasFilters()) { | |
| 483 | 483 | return ''; | 
| 484 | 484 | } | 
| 485 | 485 | |
| 486 | -        switch($targetEntity->inheritanceType) { | |
| 486 | +        switch ($targetEntity->inheritanceType) { | |
| 487 | 487 | case ClassMetadata::INHERITANCE_TYPE_NONE: | 
| 488 | 488 | break; | 
| 489 | 489 | case ClassMetadata::INHERITANCE_TYPE_JOINED: | 
| @@ -506,7 +506,7 @@ discard block | ||
| 506 | 506 | $filterClauses = []; | 
| 507 | 507 |          foreach ($this->em->getFilters()->getEnabledFilters() as $filter) { | 
| 508 | 508 |              if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) { | 
| 509 | -                $filterClauses[] = '(' . $filterExpr . ')'; | |
| 509 | +                $filterClauses[] = '('.$filterExpr.')'; | |
| 510 | 510 | } | 
| 511 | 511 | } | 
| 512 | 512 | |
| @@ -538,7 +538,7 @@ discard block | ||
| 538 | 538 | } | 
| 539 | 539 | |
| 540 | 540 |          if ( ! $AST->orderByClause && ($orderBySql = $this->_generateOrderedCollectionOrderByItems())) { | 
| 541 | - $sql .= ' ORDER BY ' . $orderBySql; | |
| 541 | + $sql .= ' ORDER BY '.$orderBySql; | |
| 542 | 542 | } | 
| 543 | 543 | |
| 544 | 544 |          if ($limit !== null || $offset !== null) { | 
| @@ -550,11 +550,11 @@ discard block | ||
| 550 | 550 | } | 
| 551 | 551 | |
| 552 | 552 |          if ($lockMode === LockMode::PESSIMISTIC_READ) { | 
| 553 | - return $sql . ' ' . $this->platform->getReadLockSQL(); | |
| 553 | + return $sql.' '.$this->platform->getReadLockSQL(); | |
| 554 | 554 | } | 
| 555 | 555 | |
| 556 | 556 |          if ($lockMode === LockMode::PESSIMISTIC_WRITE) { | 
| 557 | - return $sql . ' ' . $this->platform->getWriteLockSQL(); | |
| 557 | + return $sql.' '.$this->platform->getWriteLockSQL(); | |
| 558 | 558 | } | 
| 559 | 559 | |
| 560 | 560 |          if ($lockMode !== LockMode::OPTIMISTIC) { | 
| @@ -609,7 +609,7 @@ discard block | ||
| 609 | 609 | $sqlParts = []; | 
| 610 | 610 | |
| 611 | 611 |          foreach ($this->quoteStrategy->getIdentifierColumnNames($class, $this->platform) as $columnName) { | 
| 612 | - $sqlParts[] = $tableAlias . '.' . $columnName; | |
| 612 | + $sqlParts[] = $tableAlias.'.'.$columnName; | |
| 613 | 613 | } | 
| 614 | 614 | |
| 615 | 615 |          return implode(', ', $sqlParts); | 
| @@ -651,7 +651,7 @@ discard block | ||
| 651 | 651 | $class = $this->queryComponents[$dqlAlias]['metadata']; | 
| 652 | 652 | |
| 653 | 653 |                  if ($this->useSqlTableAliases) { | 
| 654 | - $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName) . '.'; | |
| 654 | + $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName).'.'; | |
| 655 | 655 | } | 
| 656 | 656 | |
| 657 | 657 | $sql .= $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform); | 
| @@ -680,7 +680,7 @@ discard block | ||
| 680 | 680 | } | 
| 681 | 681 | |
| 682 | 682 |                  if ($this->useSqlTableAliases) { | 
| 683 | - $sql .= $this->getSQLTableAlias($class->getTableName(), $dqlAlias) . '.'; | |
| 683 | + $sql .= $this->getSQLTableAlias($class->getTableName(), $dqlAlias).'.'; | |
| 684 | 684 | } | 
| 685 | 685 | |
| 686 | 686 | $sql .= reset($assoc['targetToSourceKeyColumns']); | 
| @@ -698,7 +698,7 @@ discard block | ||
| 698 | 698 | */ | 
| 699 | 699 | public function walkSelectClause($selectClause) | 
| 700 | 700 |      { | 
| 701 | - $sql = 'SELECT ' . (($selectClause->isDistinct) ? 'DISTINCT ' : ''); | |
| 701 | + $sql = 'SELECT '.(($selectClause->isDistinct) ? 'DISTINCT ' : ''); | |
| 702 | 702 | $sqlSelectExpressions = array_filter(array_map([$this, 'walkSelectExpression'], $selectClause->selectExpressions)); | 
| 703 | 703 | |
| 704 | 704 |          if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && $selectClause->isDistinct) { | 
| @@ -735,7 +735,7 @@ discard block | ||
| 735 | 735 | $discrColumn = $rootClass->discriminatorColumn; | 
| 736 | 736 | $columnAlias = $this->getSQLColumnAlias($discrColumn['name']); | 
| 737 | 737 | |
| 738 | - $sqlSelectExpressions[] = $tblAlias . '.' . $discrColumn['name'] . ' AS ' . $columnAlias; | |
| 738 | + $sqlSelectExpressions[] = $tblAlias.'.'.$discrColumn['name'].' AS '.$columnAlias; | |
| 739 | 739 | |
| 740 | 740 | $this->rsm->setDiscriminatorColumn($dqlAlias, $columnAlias); | 
| 741 | 741 | $this->rsm->addMetaResult($dqlAlias, $columnAlias, $discrColumn['fieldName'], false, $discrColumn['type']); | 
| @@ -750,7 +750,7 @@ discard block | ||
| 750 | 750 |              foreach ($class->associationMappings as $assoc) { | 
| 751 | 751 |                  if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE)) { | 
| 752 | 752 | continue; | 
| 753 | -                } else if ( !$addMetaColumns && !isset($assoc['id'])) { | |
| 753 | +                } else if ( ! $addMetaColumns && ! isset($assoc['id'])) { | |
| 754 | 754 | continue; | 
| 755 | 755 | } | 
| 756 | 756 | |
| @@ -765,7 +765,7 @@ discard block | ||
| 765 | 765 | $columnType = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em); | 
| 766 | 766 | |
| 767 | 767 | $quotedColumnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform); | 
| 768 | - $sqlSelectExpressions[] = $sqlTableAlias . '.' . $quotedColumnName . ' AS ' . $columnAlias; | |
| 768 | + $sqlSelectExpressions[] = $sqlTableAlias.'.'.$quotedColumnName.' AS '.$columnAlias; | |
| 769 | 769 | |
| 770 | 770 | $this->rsm->addMetaResult($dqlAlias, $columnAlias, $columnName, $isIdentifier, $columnType); | 
| 771 | 771 | } | 
| @@ -794,7 +794,7 @@ discard block | ||
| 794 | 794 | $columnType = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em); | 
| 795 | 795 | |
| 796 | 796 | $quotedColumnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $subClass, $this->platform); | 
| 797 | - $sqlSelectExpressions[] = $sqlTableAlias . '.' . $quotedColumnName . ' AS ' . $columnAlias; | |
| 797 | + $sqlSelectExpressions[] = $sqlTableAlias.'.'.$quotedColumnName.' AS '.$columnAlias; | |
| 798 | 798 | |
| 799 | 799 | $this->rsm->addMetaResult($dqlAlias, $columnAlias, $columnName, $subClass->isIdentifier($columnName), $columnType); | 
| 800 | 800 | } | 
| @@ -820,7 +820,7 @@ discard block | ||
| 820 | 820 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl); | 
| 821 | 821 | } | 
| 822 | 822 | |
| 823 | -        return ' FROM ' . implode(', ', $sqlParts); | |
| 823 | +        return ' FROM '.implode(', ', $sqlParts); | |
| 824 | 824 | } | 
| 825 | 825 | |
| 826 | 826 | /** | 
| @@ -884,7 +884,7 @@ discard block | ||
| 884 | 884 | } | 
| 885 | 885 | |
| 886 | 886 | $sql = $this->platform->appendLockHint( | 
| 887 | - $this->quoteStrategy->getTableName($class, $this->platform) . ' ' . | |
| 887 | + $this->quoteStrategy->getTableName($class, $this->platform).' '. | |
| 888 | 888 | $this->getSQLTableAlias($class->getTableName(), $dqlAlias), | 
| 889 | 889 | $this->query->getHint(Query::HINT_LOCK_MODE) | 
| 890 | 890 | ); | 
| @@ -926,7 +926,7 @@ discard block | ||
| 926 | 926 | // Ensure we got the owning side, since it has all mapping info | 
| 927 | 927 | $assoc = ( ! $relation['isOwningSide']) ? $targetClass->associationMappings[$relation['mappedBy']] : $relation; | 
| 928 | 928 | |
| 929 | -        if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && (!$this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { | |
| 929 | +        if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { | |
| 930 | 930 |              if ($relation['type'] == ClassMetadata::ONE_TO_MANY || $relation['type'] == ClassMetadata::MANY_TO_MANY) { | 
| 931 | 931 | throw QueryException::iterateWithFetchJoinNotAllowed($assoc); | 
| 932 | 932 | } | 
| @@ -946,12 +946,12 @@ discard block | ||
| 946 | 946 | $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); | 
| 947 | 947 | |
| 948 | 948 |                      if ($relation['isOwningSide']) { | 
| 949 | - $conditions[] = $sourceTableAlias . '.' . $quotedSourceColumn . ' = ' . $targetTableAlias . '.' . $quotedTargetColumn; | |
| 949 | + $conditions[] = $sourceTableAlias.'.'.$quotedSourceColumn.' = '.$targetTableAlias.'.'.$quotedTargetColumn; | |
| 950 | 950 | |
| 951 | 951 | continue; | 
| 952 | 952 | } | 
| 953 | 953 | |
| 954 | - $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $targetTableAlias . '.' . $quotedSourceColumn; | |
| 954 | + $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$targetTableAlias.'.'.$quotedSourceColumn; | |
| 955 | 955 | } | 
| 956 | 956 | |
| 957 | 957 | // Apply remaining inheritance restrictions | 
| @@ -969,7 +969,7 @@ discard block | ||
| 969 | 969 | } | 
| 970 | 970 | |
| 971 | 971 | $targetTableJoin = [ | 
| 972 | - 'table' => $targetTableName . ' ' . $targetTableAlias, | |
| 972 | + 'table' => $targetTableName.' '.$targetTableAlias, | |
| 973 | 973 |                      'condition' => implode(' AND ', $conditions), | 
| 974 | 974 | ]; | 
| 975 | 975 | break; | 
| @@ -989,10 +989,10 @@ discard block | ||
| 989 | 989 | $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform); | 
| 990 | 990 | $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); | 
| 991 | 991 | |
| 992 | - $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn; | |
| 992 | + $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableAlias.'.'.$quotedSourceColumn; | |
| 993 | 993 | } | 
| 994 | 994 | |
| 995 | -                $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions); | |
| 995 | +                $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions); | |
| 996 | 996 | |
| 997 | 997 | // Join target table | 
| 998 | 998 | $sql .= ($joinType == AST\Join::JOIN_TYPE_LEFT || $joinType == AST\Join::JOIN_TYPE_LEFTOUTER) ? ' LEFT JOIN ' : ' INNER JOIN '; | 
| @@ -1006,7 +1006,7 @@ discard block | ||
| 1006 | 1006 | $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform); | 
| 1007 | 1007 | $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); | 
| 1008 | 1008 | |
| 1009 | - $conditions[] = $targetTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn; | |
| 1009 | + $conditions[] = $targetTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableAlias.'.'.$quotedSourceColumn; | |
| 1010 | 1010 | } | 
| 1011 | 1011 | |
| 1012 | 1012 | // Apply remaining inheritance restrictions | 
| @@ -1024,7 +1024,7 @@ discard block | ||
| 1024 | 1024 | } | 
| 1025 | 1025 | |
| 1026 | 1026 | $targetTableJoin = [ | 
| 1027 | - 'table' => $targetTableName . ' ' . $targetTableAlias, | |
| 1027 | + 'table' => $targetTableName.' '.$targetTableAlias, | |
| 1028 | 1028 |                      'condition' => implode(' AND ', $conditions), | 
| 1029 | 1029 | ]; | 
| 1030 | 1030 | break; | 
| @@ -1034,22 +1034,22 @@ discard block | ||
| 1034 | 1034 | } | 
| 1035 | 1035 | |
| 1036 | 1036 | // Handle WITH clause | 
| 1037 | -        $withCondition = (null === $condExpr) ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')'); | |
| 1037 | +        $withCondition = (null === $condExpr) ? '' : ('('.$this->walkConditionalExpression($condExpr).')'); | |
| 1038 | 1038 | |
| 1039 | 1039 |          if ($targetClass->isInheritanceTypeJoined()) { | 
| 1040 | 1040 | $ctiJoins = $this->_generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias); | 
| 1041 | 1041 | // If we have WITH condition, we need to build nested joins for target class table and cti joins | 
| 1042 | 1042 |              if ($withCondition) { | 
| 1043 | -                $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition']; | |
| 1043 | +                $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition']; | |
| 1044 | 1044 |              } else { | 
| 1045 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins; | |
| 1045 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins; | |
| 1046 | 1046 | } | 
| 1047 | 1047 |          } else { | 
| 1048 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition']; | |
| 1048 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition']; | |
| 1049 | 1049 | } | 
| 1050 | 1050 | |
| 1051 | 1051 |          if ($withCondition) { | 
| 1052 | - $sql .= ' AND ' . $withCondition; | |
| 1052 | + $sql .= ' AND '.$withCondition; | |
| 1053 | 1053 | } | 
| 1054 | 1054 | |
| 1055 | 1055 | // Apply the indexes | 
| @@ -1082,7 +1082,7 @@ discard block | ||
| 1082 | 1082 | $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems); | 
| 1083 | 1083 | } | 
| 1084 | 1084 | |
| 1085 | -        return ' ORDER BY ' . implode(', ', $orderByItems); | |
| 1085 | +        return ' ORDER BY '.implode(', ', $orderByItems); | |
| 1086 | 1086 | } | 
| 1087 | 1087 | |
| 1088 | 1088 | /** | 
| @@ -1099,10 +1099,10 @@ discard block | ||
| 1099 | 1099 | $this->orderedColumnsMap[$sql] = $type; | 
| 1100 | 1100 | |
| 1101 | 1101 |          if ($expr instanceof AST\Subselect) { | 
| 1102 | -            return '(' . $sql . ') ' . $type; | |
| 1102 | +            return '('.$sql.') '.$type; | |
| 1103 | 1103 | } | 
| 1104 | 1104 | |
| 1105 | - return $sql . ' ' . $type; | |
| 1105 | + return $sql.' '.$type; | |
| 1106 | 1106 | } | 
| 1107 | 1107 | |
| 1108 | 1108 | /** | 
| @@ -1110,7 +1110,7 @@ discard block | ||
| 1110 | 1110 | */ | 
| 1111 | 1111 | public function walkHavingClause($havingClause) | 
| 1112 | 1112 |      { | 
| 1113 | - return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression); | |
| 1113 | + return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression); | |
| 1114 | 1114 | } | 
| 1115 | 1115 | |
| 1116 | 1116 | /** | 
| @@ -1133,7 +1133,7 @@ discard block | ||
| 1133 | 1133 | $conditions = []; | 
| 1134 | 1134 | |
| 1135 | 1135 |                  if ($join->conditionalExpression) { | 
| 1136 | -                    $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')'; | |
| 1136 | +                    $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')'; | |
| 1137 | 1137 | } | 
| 1138 | 1138 | |
| 1139 | 1139 | $condExprConjunction = ($class->isInheritanceTypeJoined() && $joinType != AST\Join::JOIN_TYPE_LEFT && $joinType != AST\Join::JOIN_TYPE_LEFTOUTER) | 
| @@ -1157,7 +1157,7 @@ discard block | ||
| 1157 | 1157 | } | 
| 1158 | 1158 | |
| 1159 | 1159 |                  if ($conditions) { | 
| 1160 | -                    $sql .= $condExprConjunction . implode(' AND ', $conditions); | |
| 1160 | +                    $sql .= $condExprConjunction.implode(' AND ', $conditions); | |
| 1161 | 1161 | } | 
| 1162 | 1162 | |
| 1163 | 1163 | break; | 
| @@ -1187,7 +1187,7 @@ discard block | ||
| 1187 | 1187 | $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression); | 
| 1188 | 1188 | } | 
| 1189 | 1189 | |
| 1190 | -        $sql .= implode(', ', $scalarExpressions) . ')'; | |
| 1190 | +        $sql .= implode(', ', $scalarExpressions).')'; | |
| 1191 | 1191 | |
| 1192 | 1192 | return $sql; | 
| 1193 | 1193 | } | 
| @@ -1209,7 +1209,7 @@ discard block | ||
| 1209 | 1209 | ? $this->conn->quote($nullIfExpression->secondExpression) | 
| 1210 | 1210 | : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression); | 
| 1211 | 1211 | |
| 1212 | -        return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')'; | |
| 1212 | +        return 'NULLIF('.$firstExpression.', '.$secondExpression.')'; | |
| 1213 | 1213 | } | 
| 1214 | 1214 | |
| 1215 | 1215 | /** | 
| @@ -1224,11 +1224,11 @@ discard block | ||
| 1224 | 1224 | $sql = 'CASE'; | 
| 1225 | 1225 | |
| 1226 | 1226 |          foreach ($generalCaseExpression->whenClauses as $whenClause) { | 
| 1227 | - $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression); | |
| 1228 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); | |
| 1227 | + $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression); | |
| 1228 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); | |
| 1229 | 1229 | } | 
| 1230 | 1230 | |
| 1231 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END'; | |
| 1231 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END'; | |
| 1232 | 1232 | |
| 1233 | 1233 | return $sql; | 
| 1234 | 1234 | } | 
| @@ -1242,14 +1242,14 @@ discard block | ||
| 1242 | 1242 | */ | 
| 1243 | 1243 | public function walkSimpleCaseExpression($simpleCaseExpression) | 
| 1244 | 1244 |      { | 
| 1245 | - $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); | |
| 1245 | + $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); | |
| 1246 | 1246 | |
| 1247 | 1247 |          foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) { | 
| 1248 | - $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); | |
| 1249 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); | |
| 1248 | + $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); | |
| 1249 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); | |
| 1250 | 1250 | } | 
| 1251 | 1251 | |
| 1252 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END'; | |
| 1252 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END'; | |
| 1253 | 1253 | |
| 1254 | 1254 | return $sql; | 
| 1255 | 1255 | } | 
| @@ -1283,14 +1283,14 @@ discard block | ||
| 1283 | 1283 | $fieldMapping = $class->fieldMappings[$fieldName]; | 
| 1284 | 1284 | $columnName = $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform); | 
| 1285 | 1285 | $columnAlias = $this->getSQLColumnAlias($fieldMapping['columnName']); | 
| 1286 | - $col = $sqlTableAlias . '.' . $columnName; | |
| 1286 | + $col = $sqlTableAlias.'.'.$columnName; | |
| 1287 | 1287 | |
| 1288 | 1288 |                  if (isset($fieldMapping['requireSQLConversion'])) { | 
| 1289 | 1289 | $type = Type::getType($fieldMapping['type']); | 
| 1290 | 1290 | $col = $type->convertToPHPValueSQL($col, $this->conn->getDatabasePlatform()); | 
| 1291 | 1291 | } | 
| 1292 | 1292 | |
| 1293 | - $sql .= $col . ' AS ' . $columnAlias; | |
| 1293 | + $sql .= $col.' AS '.$columnAlias; | |
| 1294 | 1294 | |
| 1295 | 1295 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; | 
| 1296 | 1296 | |
| @@ -1315,7 +1315,7 @@ discard block | ||
| 1315 | 1315 |                  $columnAlias = $this->getSQLColumnAlias('sclr'); | 
| 1316 | 1316 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; | 
| 1317 | 1317 | |
| 1318 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; | |
| 1318 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; | |
| 1319 | 1319 | |
| 1320 | 1320 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; | 
| 1321 | 1321 | |
| @@ -1329,7 +1329,7 @@ discard block | ||
| 1329 | 1329 |                  $columnAlias = $this->getSQLColumnAlias('sclr'); | 
| 1330 | 1330 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; | 
| 1331 | 1331 | |
| 1332 | -                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; | |
| 1332 | +                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; | |
| 1333 | 1333 | |
| 1334 | 1334 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; | 
| 1335 | 1335 | |
| @@ -1340,7 +1340,7 @@ discard block | ||
| 1340 | 1340 | break; | 
| 1341 | 1341 | |
| 1342 | 1342 | case ($expr instanceof AST\NewObjectExpression): | 
| 1343 | - $sql .= $this->walkNewObject($expr,$selectExpression->fieldIdentificationVariable); | |
| 1343 | + $sql .= $this->walkNewObject($expr, $selectExpression->fieldIdentificationVariable); | |
| 1344 | 1344 | break; | 
| 1345 | 1345 | |
| 1346 | 1346 | default: | 
| @@ -1381,14 +1381,14 @@ discard block | ||
| 1381 | 1381 | $columnAlias = $this->getSQLColumnAlias($mapping['columnName']); | 
| 1382 | 1382 | $quotedColumnName = $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform); | 
| 1383 | 1383 | |
| 1384 | - $col = $sqlTableAlias . '.' . $quotedColumnName; | |
| 1384 | + $col = $sqlTableAlias.'.'.$quotedColumnName; | |
| 1385 | 1385 | |
| 1386 | 1386 |                      if (isset($mapping['requireSQLConversion'])) { | 
| 1387 | 1387 | $type = Type::getType($mapping['type']); | 
| 1388 | 1388 | $col = $type->convertToPHPValueSQL($col, $this->platform); | 
| 1389 | 1389 | } | 
| 1390 | 1390 | |
| 1391 | - $sqlParts[] = $col . ' AS '. $columnAlias; | |
| 1391 | + $sqlParts[] = $col.' AS '.$columnAlias; | |
| 1392 | 1392 | |
| 1393 | 1393 | $this->scalarResultAliasMap[$resultAlias][] = $columnAlias; | 
| 1394 | 1394 | |
| @@ -1405,21 +1405,21 @@ discard block | ||
| 1405 | 1405 | $sqlTableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias); | 
| 1406 | 1406 | |
| 1407 | 1407 |                          foreach ($subClass->fieldMappings as $fieldName => $mapping) { | 
| 1408 | -                            if (isset($mapping['inherited']) || ($partialFieldSet && !in_array($fieldName, $partialFieldSet))) { | |
| 1408 | +                            if (isset($mapping['inherited']) || ($partialFieldSet && ! in_array($fieldName, $partialFieldSet))) { | |
| 1409 | 1409 | continue; | 
| 1410 | 1410 | } | 
| 1411 | 1411 | |
| 1412 | 1412 | $columnAlias = $this->getSQLColumnAlias($mapping['columnName']); | 
| 1413 | 1413 | $quotedColumnName = $this->quoteStrategy->getColumnName($fieldName, $subClass, $this->platform); | 
| 1414 | 1414 | |
| 1415 | - $col = $sqlTableAlias . '.' . $quotedColumnName; | |
| 1415 | + $col = $sqlTableAlias.'.'.$quotedColumnName; | |
| 1416 | 1416 | |
| 1417 | 1417 |                              if (isset($mapping['requireSQLConversion'])) { | 
| 1418 | 1418 | $type = Type::getType($mapping['type']); | 
| 1419 | 1419 | $col = $type->convertToPHPValueSQL($col, $this->platform); | 
| 1420 | 1420 | } | 
| 1421 | 1421 | |
| 1422 | - $sqlParts[] = $col . ' AS ' . $columnAlias; | |
| 1422 | + $sqlParts[] = $col.' AS '.$columnAlias; | |
| 1423 | 1423 | |
| 1424 | 1424 | $this->scalarResultAliasMap[$resultAlias][] = $columnAlias; | 
| 1425 | 1425 | |
| @@ -1439,7 +1439,7 @@ discard block | ||
| 1439 | 1439 | */ | 
| 1440 | 1440 | public function walkQuantifiedExpression($qExpr) | 
| 1441 | 1441 |      { | 
| 1442 | -        return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')'; | |
| 1442 | +        return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')'; | |
| 1443 | 1443 | } | 
| 1444 | 1444 | |
| 1445 | 1445 | /** | 
| @@ -1479,7 +1479,7 @@ discard block | ||
| 1479 | 1479 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl); | 
| 1480 | 1480 | } | 
| 1481 | 1481 | |
| 1482 | -        return ' FROM ' . implode(', ', $sqlParts); | |
| 1482 | +        return ' FROM '.implode(', ', $sqlParts); | |
| 1483 | 1483 | } | 
| 1484 | 1484 | |
| 1485 | 1485 | /** | 
| @@ -1487,7 +1487,7 @@ discard block | ||
| 1487 | 1487 | */ | 
| 1488 | 1488 | public function walkSimpleSelectClause($simpleSelectClause) | 
| 1489 | 1489 |      { | 
| 1490 | - return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '') | |
| 1490 | + return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '') | |
| 1491 | 1491 | . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression); | 
| 1492 | 1492 | } | 
| 1493 | 1493 | |
| @@ -1506,10 +1506,10 @@ discard block | ||
| 1506 | 1506 | * | 
| 1507 | 1507 | * @return string The SQL. | 
| 1508 | 1508 | */ | 
| 1509 | - public function walkNewObject($newObjectExpression, $newObjectResultAlias=null) | |
| 1509 | + public function walkNewObject($newObjectExpression, $newObjectResultAlias = null) | |
| 1510 | 1510 |      { | 
| 1511 | 1511 | $sqlSelectExpressions = []; | 
| 1512 | - $objIndex = $newObjectResultAlias?:$this->newObjectCounter++; | |
| 1512 | + $objIndex = $newObjectResultAlias ?: $this->newObjectCounter++; | |
| 1513 | 1513 | |
| 1514 | 1514 |          foreach ($newObjectExpression->args as $argIndex => $e) { | 
| 1515 | 1515 | $resultAlias = $this->scalarResultCounter++; | 
| @@ -1522,7 +1522,7 @@ discard block | ||
| 1522 | 1522 | break; | 
| 1523 | 1523 | |
| 1524 | 1524 | case ($e instanceof AST\Subselect): | 
| 1525 | -                    $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias; | |
| 1525 | +                    $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias; | |
| 1526 | 1526 | break; | 
| 1527 | 1527 | |
| 1528 | 1528 | case ($e instanceof AST\PathExpression): | 
| @@ -1531,7 +1531,7 @@ discard block | ||
| 1531 | 1531 | $class = $qComp['metadata']; | 
| 1532 | 1532 | $fieldType = $class->fieldMappings[$e->field]['type']; | 
| 1533 | 1533 | |
| 1534 | - $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias; | |
| 1534 | + $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias; | |
| 1535 | 1535 | break; | 
| 1536 | 1536 | |
| 1537 | 1537 | case ($e instanceof AST\Literal): | 
| @@ -1545,11 +1545,11 @@ discard block | ||
| 1545 | 1545 | break; | 
| 1546 | 1546 | } | 
| 1547 | 1547 | |
| 1548 | - $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias; | |
| 1548 | + $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias; | |
| 1549 | 1549 | break; | 
| 1550 | 1550 | |
| 1551 | 1551 | default: | 
| 1552 | - $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias; | |
| 1552 | + $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias; | |
| 1553 | 1553 | break; | 
| 1554 | 1554 | } | 
| 1555 | 1555 | |
| @@ -1582,16 +1582,16 @@ discard block | ||
| 1582 | 1582 | case ($expr instanceof AST\AggregateExpression): | 
| 1583 | 1583 | $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; | 
| 1584 | 1584 | |
| 1585 | - $sql .= $this->walkAggregateExpression($expr) . ' AS dctrn__' . $alias; | |
| 1585 | + $sql .= $this->walkAggregateExpression($expr).' AS dctrn__'.$alias; | |
| 1586 | 1586 | break; | 
| 1587 | 1587 | |
| 1588 | 1588 | case ($expr instanceof AST\Subselect): | 
| 1589 | 1589 | $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; | 
| 1590 | 1590 | |
| 1591 | - $columnAlias = 'sclr' . $this->aliasCounter++; | |
| 1591 | + $columnAlias = 'sclr'.$this->aliasCounter++; | |
| 1592 | 1592 | $this->scalarResultAliasMap[$alias] = $columnAlias; | 
| 1593 | 1593 | |
| 1594 | -                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; | |
| 1594 | +                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; | |
| 1595 | 1595 | break; | 
| 1596 | 1596 | |
| 1597 | 1597 | case ($expr instanceof AST\Functions\FunctionNode): | 
| @@ -1608,7 +1608,7 @@ discard block | ||
| 1608 | 1608 |                  $columnAlias = $this->getSQLColumnAlias('sclr'); | 
| 1609 | 1609 | $this->scalarResultAliasMap[$alias] = $columnAlias; | 
| 1610 | 1610 | |
| 1611 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; | |
| 1611 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; | |
| 1612 | 1612 | break; | 
| 1613 | 1613 | |
| 1614 | 1614 | case ($expr instanceof AST\ParenthesisExpression): | 
| @@ -1628,8 +1628,8 @@ discard block | ||
| 1628 | 1628 | */ | 
| 1629 | 1629 | public function walkAggregateExpression($aggExpression) | 
| 1630 | 1630 |      { | 
| 1631 | -        return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '') | |
| 1632 | - . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')'; | |
| 1631 | +        return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '') | |
| 1632 | + . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')'; | |
| 1633 | 1633 | } | 
| 1634 | 1634 | |
| 1635 | 1635 | /** | 
| @@ -1643,7 +1643,7 @@ discard block | ||
| 1643 | 1643 | $sqlParts[] = $this->walkGroupByItem($groupByItem); | 
| 1644 | 1644 | } | 
| 1645 | 1645 | |
| 1646 | -        return ' GROUP BY ' . implode(', ', $sqlParts); | |
| 1646 | +        return ' GROUP BY '.implode(', ', $sqlParts); | |
| 1647 | 1647 | } | 
| 1648 | 1648 | |
| 1649 | 1649 | /** | 
| @@ -1700,7 +1700,7 @@ discard block | ||
| 1700 | 1700 |      { | 
| 1701 | 1701 | $class = $this->em->getClassMetadata($deleteClause->abstractSchemaName); | 
| 1702 | 1702 | $tableName = $class->getTableName(); | 
| 1703 | - $sql = 'DELETE FROM ' . $this->quoteStrategy->getTableName($class, $this->platform); | |
| 1703 | + $sql = 'DELETE FROM '.$this->quoteStrategy->getTableName($class, $this->platform); | |
| 1704 | 1704 | |
| 1705 | 1705 | $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable); | 
| 1706 | 1706 | $this->rootAliases[] = $deleteClause->aliasIdentificationVariable; | 
| @@ -1715,12 +1715,12 @@ discard block | ||
| 1715 | 1715 |      { | 
| 1716 | 1716 | $class = $this->em->getClassMetadata($updateClause->abstractSchemaName); | 
| 1717 | 1717 | $tableName = $class->getTableName(); | 
| 1718 | - $sql = 'UPDATE ' . $this->quoteStrategy->getTableName($class, $this->platform); | |
| 1718 | + $sql = 'UPDATE '.$this->quoteStrategy->getTableName($class, $this->platform); | |
| 1719 | 1719 | |
| 1720 | 1720 | $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable); | 
| 1721 | 1721 | $this->rootAliases[] = $updateClause->aliasIdentificationVariable; | 
| 1722 | 1722 | |
| 1723 | -        $sql .= ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); | |
| 1723 | +        $sql .= ' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); | |
| 1724 | 1724 | |
| 1725 | 1725 | return $sql; | 
| 1726 | 1726 | } | 
| @@ -1733,7 +1733,7 @@ discard block | ||
| 1733 | 1733 | $useTableAliasesBefore = $this->useSqlTableAliases; | 
| 1734 | 1734 | $this->useSqlTableAliases = false; | 
| 1735 | 1735 | |
| 1736 | - $sql = $this->walkPathExpression($updateItem->pathExpression) . ' = '; | |
| 1736 | + $sql = $this->walkPathExpression($updateItem->pathExpression).' = '; | |
| 1737 | 1737 | $newValue = $updateItem->newValue; | 
| 1738 | 1738 | |
| 1739 | 1739 |          switch (true) { | 
| @@ -1776,7 +1776,7 @@ discard block | ||
| 1776 | 1776 | |
| 1777 | 1777 |              if (count($filterClauses)) { | 
| 1778 | 1778 |                  if ($condSql) { | 
| 1779 | -                    $condSql = '(' . $condSql . ') AND '; | |
| 1779 | +                    $condSql = '('.$condSql.') AND '; | |
| 1780 | 1780 | } | 
| 1781 | 1781 | |
| 1782 | 1782 |                  $condSql .= implode(' AND ', $filterClauses); | 
| @@ -1784,11 +1784,11 @@ discard block | ||
| 1784 | 1784 | } | 
| 1785 | 1785 | |
| 1786 | 1786 |          if ($condSql) { | 
| 1787 | -            return ' WHERE ' . (( ! $discrSql) ? $condSql : '(' . $condSql . ') AND ' . $discrSql); | |
| 1787 | +            return ' WHERE '.(( ! $discrSql) ? $condSql : '('.$condSql.') AND '.$discrSql); | |
| 1788 | 1788 | } | 
| 1789 | 1789 | |
| 1790 | 1790 |          if ($discrSql) { | 
| 1791 | - return ' WHERE ' . $discrSql; | |
| 1791 | + return ' WHERE '.$discrSql; | |
| 1792 | 1792 | } | 
| 1793 | 1793 | |
| 1794 | 1794 | return ''; | 
| @@ -1831,7 +1831,7 @@ discard block | ||
| 1831 | 1831 | // if only one ConditionalPrimary is defined | 
| 1832 | 1832 | return ( ! ($factor instanceof AST\ConditionalFactor)) | 
| 1833 | 1833 | ? $this->walkConditionalPrimary($factor) | 
| 1834 | - : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary); | |
| 1834 | + : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary); | |
| 1835 | 1835 | } | 
| 1836 | 1836 | |
| 1837 | 1837 | /** | 
| @@ -1846,7 +1846,7 @@ discard block | ||
| 1846 | 1846 |          if ($primary->isConditionalExpression()) { | 
| 1847 | 1847 | $condExpr = $primary->conditionalExpression; | 
| 1848 | 1848 | |
| 1849 | -            return '(' . $this->walkConditionalExpression($condExpr) . ')'; | |
| 1849 | +            return '('.$this->walkConditionalExpression($condExpr).')'; | |
| 1850 | 1850 | } | 
| 1851 | 1851 | } | 
| 1852 | 1852 | |
| @@ -1857,7 +1857,7 @@ discard block | ||
| 1857 | 1857 |      { | 
| 1858 | 1858 | $sql = ($existsExpr->not) ? 'NOT ' : ''; | 
| 1859 | 1859 | |
| 1860 | -        $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')'; | |
| 1860 | +        $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')'; | |
| 1861 | 1861 | |
| 1862 | 1862 | return $sql; | 
| 1863 | 1863 | } | 
| @@ -1901,7 +1901,7 @@ discard block | ||
| 1901 | 1901 | $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName()); | 
| 1902 | 1902 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); | 
| 1903 | 1903 | |
| 1904 | - $sql .= $this->quoteStrategy->getTableName($targetClass, $this->platform) . ' ' . $targetTableAlias . ' WHERE '; | |
| 1904 | + $sql .= $this->quoteStrategy->getTableName($targetClass, $this->platform).' '.$targetTableAlias.' WHERE '; | |
| 1905 | 1905 | |
| 1906 | 1906 | $owningAssoc = $targetClass->associationMappings[$assoc['mappedBy']]; | 
| 1907 | 1907 | $sqlParts = []; | 
| @@ -1909,7 +1909,7 @@ discard block | ||
| 1909 | 1909 |              foreach ($owningAssoc['targetToSourceKeyColumns'] as $targetColumn => $sourceColumn) { | 
| 1910 | 1910 | $targetColumn = $this->quoteStrategy->getColumnName($class->fieldNames[$targetColumn], $class, $this->platform); | 
| 1911 | 1911 | |
| 1912 | - $sqlParts[] = $sourceTableAlias . '.' . $targetColumn . ' = ' . $targetTableAlias . '.' . $sourceColumn; | |
| 1912 | + $sqlParts[] = $sourceTableAlias.'.'.$targetColumn.' = '.$targetTableAlias.'.'.$sourceColumn; | |
| 1913 | 1913 | } | 
| 1914 | 1914 | |
| 1915 | 1915 |              foreach ($this->quoteStrategy->getIdentifierColumnNames($targetClass, $this->platform) as $targetColumnName) { | 
| @@ -1917,7 +1917,7 @@ discard block | ||
| 1917 | 1917 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); | 
| 1918 | 1918 | } | 
| 1919 | 1919 | |
| 1920 | - $sqlParts[] = $targetTableAlias . '.' . $targetColumnName . ' = ' . $entitySql; | |
| 1920 | + $sqlParts[] = $targetTableAlias.'.'.$targetColumnName.' = '.$entitySql; | |
| 1921 | 1921 | } | 
| 1922 | 1922 | |
| 1923 | 1923 |              $sql .= implode(' AND ', $sqlParts); | 
| @@ -1933,8 +1933,8 @@ discard block | ||
| 1933 | 1933 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); | 
| 1934 | 1934 | |
| 1935 | 1935 | // join to target table | 
| 1936 | - $sql .= $this->quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $this->platform) . ' ' . $joinTableAlias | |
| 1937 | - . ' INNER JOIN ' . $this->quoteStrategy->getTableName($targetClass, $this->platform) . ' ' . $targetTableAlias . ' ON '; | |
| 1936 | + $sql .= $this->quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $this->platform).' '.$joinTableAlias | |
| 1937 | + . ' INNER JOIN '.$this->quoteStrategy->getTableName($targetClass, $this->platform).' '.$targetTableAlias.' ON '; | |
| 1938 | 1938 | |
| 1939 | 1939 | // join conditions | 
| 1940 | 1940 | $joinColumns = $assoc['isOwningSide'] ? $joinTable['inverseJoinColumns'] : $joinTable['joinColumns']; | 
| @@ -1943,7 +1943,7 @@ discard block | ||
| 1943 | 1943 |              foreach ($joinColumns as $joinColumn) { | 
| 1944 | 1944 | $targetColumn = $this->quoteStrategy->getColumnName($targetClass->fieldNames[$joinColumn['referencedColumnName']], $targetClass, $this->platform); | 
| 1945 | 1945 | |
| 1946 | - $joinSqlParts[] = $joinTableAlias . '.' . $joinColumn['name'] . ' = ' . $targetTableAlias . '.' . $targetColumn; | |
| 1946 | + $joinSqlParts[] = $joinTableAlias.'.'.$joinColumn['name'].' = '.$targetTableAlias.'.'.$targetColumn; | |
| 1947 | 1947 | } | 
| 1948 | 1948 | |
| 1949 | 1949 |              $sql .= implode(' AND ', $joinSqlParts); | 
| @@ -1955,7 +1955,7 @@ discard block | ||
| 1955 | 1955 |              foreach ($joinColumns as $joinColumn) { | 
| 1956 | 1956 | $targetColumn = $this->quoteStrategy->getColumnName($class->fieldNames[$joinColumn['referencedColumnName']], $class, $this->platform); | 
| 1957 | 1957 | |
| 1958 | - $sqlParts[] = $joinTableAlias . '.' . $joinColumn['name'] . ' = ' . $sourceTableAlias . '.' . $targetColumn; | |
| 1958 | + $sqlParts[] = $joinTableAlias.'.'.$joinColumn['name'].' = '.$sourceTableAlias.'.'.$targetColumn; | |
| 1959 | 1959 | } | 
| 1960 | 1960 | |
| 1961 | 1961 |              foreach ($this->quoteStrategy->getIdentifierColumnNames($targetClass, $this->platform) as $targetColumnName) { | 
| @@ -1963,13 +1963,13 @@ discard block | ||
| 1963 | 1963 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); | 
| 1964 | 1964 | } | 
| 1965 | 1965 | |
| 1966 | -                $sqlParts[] = $targetTableAlias . '.' . $targetColumnName . ' IN (' . $entitySql . ')'; | |
| 1966 | +                $sqlParts[] = $targetTableAlias.'.'.$targetColumnName.' IN ('.$entitySql.')'; | |
| 1967 | 1967 | } | 
| 1968 | 1968 | |
| 1969 | 1969 |              $sql .= implode(' AND ', $sqlParts); | 
| 1970 | 1970 | } | 
| 1971 | 1971 | |
| 1972 | - return $sql . ')'; | |
| 1972 | + return $sql.')'; | |
| 1973 | 1973 | } | 
| 1974 | 1974 | |
| 1975 | 1975 | /** | 
| @@ -1980,7 +1980,7 @@ discard block | ||
| 1980 | 1980 |          $sizeFunc = new AST\Functions\SizeFunction('size'); | 
| 1981 | 1981 | $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression; | 
| 1982 | 1982 | |
| 1983 | - return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0'); | |
| 1983 | + return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0'); | |
| 1984 | 1984 | } | 
| 1985 | 1985 | |
| 1986 | 1986 | /** | 
| @@ -1989,19 +1989,19 @@ discard block | ||
| 1989 | 1989 | public function walkNullComparisonExpression($nullCompExpr) | 
| 1990 | 1990 |      { | 
| 1991 | 1991 | $expression = $nullCompExpr->expression; | 
| 1992 | - $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL'; | |
| 1992 | + $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL'; | |
| 1993 | 1993 | |
| 1994 | 1994 | // Handle ResultVariable | 
| 1995 | 1995 |          if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) { | 
| 1996 | - return $this->walkResultVariable($expression) . $comparison; | |
| 1996 | + return $this->walkResultVariable($expression).$comparison; | |
| 1997 | 1997 | } | 
| 1998 | 1998 | |
| 1999 | 1999 | // Handle InputParameter mapping inclusion to ParserResult | 
| 2000 | 2000 |          if ($expression instanceof AST\InputParameter) { | 
| 2001 | - return $this->walkInputParameter($expression) . $comparison; | |
| 2001 | + return $this->walkInputParameter($expression).$comparison; | |
| 2002 | 2002 | } | 
| 2003 | 2003 | |
| 2004 | - return $expression->dispatch($this) . $comparison; | |
| 2004 | + return $expression->dispatch($this).$comparison; | |
| 2005 | 2005 | } | 
| 2006 | 2006 | |
| 2007 | 2007 | /** | 
| @@ -2009,7 +2009,7 @@ discard block | ||
| 2009 | 2009 | */ | 
| 2010 | 2010 | public function walkInExpression($inExpr) | 
| 2011 | 2011 |      { | 
| 2012 | -        $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN ('; | |
| 2012 | +        $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN ('; | |
| 2013 | 2013 | |
| 2014 | 2014 | $sql .= ($inExpr->subselect) | 
| 2015 | 2015 | ? $this->walkSubselect($inExpr->subselect) | 
| @@ -2035,10 +2035,10 @@ discard block | ||
| 2035 | 2035 | } | 
| 2036 | 2036 | |
| 2037 | 2037 |          if ($this->useSqlTableAliases) { | 
| 2038 | - $sql .= $this->getSQLTableAlias($discrClass->getTableName(), $dqlAlias) . '.'; | |
| 2038 | + $sql .= $this->getSQLTableAlias($discrClass->getTableName(), $dqlAlias).'.'; | |
| 2039 | 2039 | } | 
| 2040 | 2040 | |
| 2041 | - $sql .= $class->discriminatorColumn['name'] . ($instanceOfExpr->not ? ' NOT IN ' : ' IN '); | |
| 2041 | + $sql .= $class->discriminatorColumn['name'].($instanceOfExpr->not ? ' NOT IN ' : ' IN '); | |
| 2042 | 2042 | |
| 2043 | 2043 | $sqlParameterList = []; | 
| 2044 | 2044 | |
| @@ -2068,7 +2068,7 @@ discard block | ||
| 2068 | 2068 | $sqlParameterList[] = $this->conn->quote($discriminatorValue); | 
| 2069 | 2069 | } | 
| 2070 | 2070 | |
| 2071 | -        $sql .= '(' . implode(', ', $sqlParameterList) . ')'; | |
| 2071 | +        $sql .= '('.implode(', ', $sqlParameterList).')'; | |
| 2072 | 2072 | |
| 2073 | 2073 | return $sql; | 
| 2074 | 2074 | } | 
| @@ -2114,8 +2114,8 @@ discard block | ||
| 2114 | 2114 | $sql .= ' NOT'; | 
| 2115 | 2115 | } | 
| 2116 | 2116 | |
| 2117 | - $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) | |
| 2118 | - . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); | |
| 2117 | + $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) | |
| 2118 | + . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); | |
| 2119 | 2119 | |
| 2120 | 2120 | return $sql; | 
| 2121 | 2121 | } | 
| @@ -2130,7 +2130,7 @@ discard block | ||
| 2130 | 2130 | ? $this->walkResultVariable($stringExpr) | 
| 2131 | 2131 | : $stringExpr->dispatch($this); | 
| 2132 | 2132 | |
| 2133 | - $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE '; | |
| 2133 | + $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE '; | |
| 2134 | 2134 | |
| 2135 | 2135 |          if ($likeExpr->stringPattern instanceof AST\InputParameter) { | 
| 2136 | 2136 | $sql .= $this->walkInputParameter($likeExpr->stringPattern); | 
| @@ -2143,7 +2143,7 @@ discard block | ||
| 2143 | 2143 | } | 
| 2144 | 2144 | |
| 2145 | 2145 |          if ($likeExpr->escapeChar) { | 
| 2146 | - $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar); | |
| 2146 | + $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar); | |
| 2147 | 2147 | } | 
| 2148 | 2148 | |
| 2149 | 2149 | return $sql; | 
| @@ -2170,7 +2170,7 @@ discard block | ||
| 2170 | 2170 | ? $leftExpr->dispatch($this) | 
| 2171 | 2171 | : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr)); | 
| 2172 | 2172 | |
| 2173 | - $sql .= ' ' . $compExpr->operator . ' '; | |
| 2173 | + $sql .= ' '.$compExpr->operator.' '; | |
| 2174 | 2174 | |
| 2175 | 2175 | $sql .= ($rightExpr instanceof AST\Node) | 
| 2176 | 2176 | ? $rightExpr->dispatch($this) | 
| @@ -2202,7 +2202,7 @@ discard block | ||
| 2202 | 2202 |      { | 
| 2203 | 2203 | return ($arithmeticExpr->isSimpleArithmeticExpression()) | 
| 2204 | 2204 | ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression) | 
| 2205 | -            : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')'; | |
| 2205 | +            : '('.$this->walkSubselect($arithmeticExpr->subselect).')'; | |
| 2206 | 2206 | } | 
| 2207 | 2207 | |
| 2208 | 2208 | /** | 
| @@ -2256,7 +2256,7 @@ discard block | ||
| 2256 | 2256 | |
| 2257 | 2257 | $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : ''); | 
| 2258 | 2258 | |
| 2259 | - return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary); | |
| 2259 | + return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary); | |
| 2260 | 2260 | } | 
| 2261 | 2261 | |
| 2262 | 2262 | /** | 
| @@ -2269,7 +2269,7 @@ discard block | ||
| 2269 | 2269 | public function walkArithmeticPrimary($primary) | 
| 2270 | 2270 |      { | 
| 2271 | 2271 |          if ($primary instanceof AST\SimpleArithmeticExpression) { | 
| 2272 | -            return '(' . $this->walkSimpleArithmeticExpression($primary) . ')'; | |
| 2272 | +            return '('.$this->walkSimpleArithmeticExpression($primary).')'; | |
| 2273 | 2273 | } | 
| 2274 | 2274 | |
| 2275 | 2275 |          if ($primary instanceof AST\Node) { | 
| @@ -21,7 +21,6 @@ | ||
| 21 | 21 | |
| 22 | 22 | use Doctrine\Common\Collections\ArrayCollection; | 
| 23 | 23 | use Doctrine\Common\Collections\Criteria; | 
| 24 | - | |
| 25 | 24 | use Doctrine\ORM\Query\Expr; | 
| 26 | 25 | use Doctrine\ORM\Query\QueryExpressionVisitor; | 
| 27 | 26 | |
| @@ -606,7 +606,7 @@ discard block | ||
| 606 | 606 | /** | 
| 607 | 607 | * Gets a (previously set) query parameter of the query being constructed. | 
| 608 | 608 | * | 
| 609 | - * @param mixed $key The key (index or name) of the bound parameter. | |
| 609 | + * @param string $key The key (index or name) of the bound parameter. | |
| 610 | 610 | * | 
| 611 | 611 | * @return Query\Parameter|null The value of the bound parameter. | 
| 612 | 612 | */ | 
| @@ -794,7 +794,7 @@ discard block | ||
| 794 | 794 |       *         ->leftJoin('u.Phonenumbers', 'p'); | 
| 795 | 795 | * </code> | 
| 796 | 796 | * | 
| 797 | - * @param mixed $select The selection expression. | |
| 797 | + * @param string $select The selection expression. | |
| 798 | 798 | * | 
| 799 | 799 | * @return self | 
| 800 | 800 | */ | 
| @@ -1094,7 +1094,6 @@ discard block | ||
| 1094 | 1094 |       *         ->andWhere('u.is_active = 1'); | 
| 1095 | 1095 | * </code> | 
| 1096 | 1096 | * | 
| 1097 | - * @param mixed $where The query restrictions. | |
| 1098 | 1097 | * | 
| 1099 | 1098 | * @return self | 
| 1100 | 1099 | * | 
| @@ -1127,7 +1126,6 @@ discard block | ||
| 1127 | 1126 |       *         ->orWhere('u.id = 2'); | 
| 1128 | 1127 | * </code> | 
| 1129 | 1128 | * | 
| 1130 | - * @param mixed $where The WHERE statement. | |
| 1131 | 1129 | * | 
| 1132 | 1130 | * @return self | 
| 1133 | 1131 | * | 
| @@ -1192,7 +1190,7 @@ discard block | ||
| 1192 | 1190 | * Specifies a restriction over the groups of the query. | 
| 1193 | 1191 | * Replaces any previous having restrictions, if any. | 
| 1194 | 1192 | * | 
| 1195 | - * @param mixed $having The restriction over the groups. | |
| 1193 | + * @param string $having The restriction over the groups. | |
| 1196 | 1194 | * | 
| 1197 | 1195 | * @return self | 
| 1198 | 1196 | */ | 
| @@ -1209,7 +1207,7 @@ discard block | ||
| 1209 | 1207 | * Adds a restriction over the groups of the query, forming a logical | 
| 1210 | 1208 | * conjunction with any existing having restrictions. | 
| 1211 | 1209 | * | 
| 1212 | - * @param mixed $having The restriction to append. | |
| 1210 | + * @param string $having The restriction to append. | |
| 1213 | 1211 | * | 
| 1214 | 1212 | * @return self | 
| 1215 | 1213 | */ | 
| @@ -1232,7 +1230,7 @@ discard block | ||
| 1232 | 1230 | * Adds a restriction over the groups of the query, forming a logical | 
| 1233 | 1231 | * disjunction with any existing having restrictions. | 
| 1234 | 1232 | * | 
| 1235 | - * @param mixed $having The restriction to add. | |
| 1233 | + * @param string $having The restriction to add. | |
| 1236 | 1234 | * | 
| 1237 | 1235 | * @return self | 
| 1238 | 1236 | */ | 
| @@ -1451,7 +1449,7 @@ discard block | ||
| 1451 | 1449 | /** | 
| 1452 | 1450 | * Resets DQL parts. | 
| 1453 | 1451 | * | 
| 1454 | - * @param array|null $parts | |
| 1452 | + * @param string[] $parts | |
| 1455 | 1453 | * | 
| 1456 | 1454 | * @return self | 
| 1457 | 1455 | */ | 
| @@ -118,11 +118,11 @@ discard block | ||
| 118 | 118 | */ | 
| 119 | 119 | private $joinRootAliases = []; | 
| 120 | 120 | |
| 121 | - /** | |
| 122 | - * Whether to use second level cache, if available. | |
| 123 | - * | |
| 124 | - * @var boolean | |
| 125 | - */ | |
| 121 | + /** | |
| 122 | + * Whether to use second level cache, if available. | |
| 123 | + * | |
| 124 | + * @var boolean | |
| 125 | + */ | |
| 126 | 126 | protected $cacheable = false; | 
| 127 | 127 | |
| 128 | 128 | /** | 
| @@ -213,10 +213,10 @@ discard block | ||
| 213 | 213 | } | 
| 214 | 214 | |
| 215 | 215 | /** | 
| 216 | - * Obtain the name of the second level query cache region in which query results will be stored | |
| 217 | - * | |
| 218 | - * @return string|null The cache region name; NULL indicates the default region. | |
| 219 | - */ | |
| 216 | + * Obtain the name of the second level query cache region in which query results will be stored | |
| 217 | + * | |
| 218 | + * @return string|null The cache region name; NULL indicates the default region. | |
| 219 | + */ | |
| 220 | 220 | public function getCacheRegion() | 
| 221 | 221 |      { | 
| 222 | 222 | return $this->cacheRegion; | 
| @@ -1373,10 +1373,10 @@ discard block | ||
| 1373 | 1373 | */ | 
| 1374 | 1374 | private function _getDQLForDelete() | 
| 1375 | 1375 |      { | 
| 1376 | - return 'DELETE' | |
| 1377 | -              . $this->_getReducedDQLQueryPart('from', ['pre' => ' ', 'separator' => ', ']) | |
| 1378 | -              . $this->_getReducedDQLQueryPart('where', ['pre' => ' WHERE ']) | |
| 1379 | -              . $this->_getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']); | |
| 1376 | + return 'DELETE' | |
| 1377 | +                . $this->_getReducedDQLQueryPart('from', ['pre' => ' ', 'separator' => ', ']) | |
| 1378 | +                . $this->_getReducedDQLQueryPart('where', ['pre' => ' WHERE ']) | |
| 1379 | +                . $this->_getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']); | |
| 1380 | 1380 | } | 
| 1381 | 1381 | |
| 1382 | 1382 | /** | 
| @@ -1384,11 +1384,11 @@ discard block | ||
| 1384 | 1384 | */ | 
| 1385 | 1385 | private function _getDQLForUpdate() | 
| 1386 | 1386 |      { | 
| 1387 | - return 'UPDATE' | |
| 1388 | -              . $this->_getReducedDQLQueryPart('from', ['pre' => ' ', 'separator' => ', ']) | |
| 1389 | -              . $this->_getReducedDQLQueryPart('set', ['pre' => ' SET ', 'separator' => ', ']) | |
| 1390 | -              . $this->_getReducedDQLQueryPart('where', ['pre' => ' WHERE ']) | |
| 1391 | -              . $this->_getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']); | |
| 1387 | + return 'UPDATE' | |
| 1388 | +                . $this->_getReducedDQLQueryPart('from', ['pre' => ' ', 'separator' => ', ']) | |
| 1389 | +                . $this->_getReducedDQLQueryPart('set', ['pre' => ' SET ', 'separator' => ', ']) | |
| 1390 | +                . $this->_getReducedDQLQueryPart('where', ['pre' => ' WHERE ']) | |
| 1391 | +                . $this->_getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']); | |
| 1392 | 1392 | } | 
| 1393 | 1393 | |
| 1394 | 1394 | /** | 
| @@ -1397,8 +1397,8 @@ discard block | ||
| 1397 | 1397 | private function _getDQLForSelect() | 
| 1398 | 1398 |      { | 
| 1399 | 1399 | $dql = 'SELECT' | 
| 1400 | - . ($this->_dqlParts['distinct']===true ? ' DISTINCT' : '') | |
| 1401 | -             . $this->_getReducedDQLQueryPart('select', ['pre' => ' ', 'separator' => ', ']); | |
| 1400 | + . ($this->_dqlParts['distinct']===true ? ' DISTINCT' : '') | |
| 1401 | +                . $this->_getReducedDQLQueryPart('select', ['pre' => ' ', 'separator' => ', ']); | |
| 1402 | 1402 | |
| 1403 | 1403 |          $fromParts   = $this->getDQLPart('from'); | 
| 1404 | 1404 |          $joinParts   = $this->getDQLPart('join'); | 
| @@ -1422,10 +1422,10 @@ discard block | ||
| 1422 | 1422 | } | 
| 1423 | 1423 | |
| 1424 | 1424 |          $dql .= implode(', ', $fromClauses) | 
| 1425 | -              . $this->_getReducedDQLQueryPart('where', ['pre' => ' WHERE ']) | |
| 1426 | -              . $this->_getReducedDQLQueryPart('groupBy', ['pre' => ' GROUP BY ', 'separator' => ', ']) | |
| 1427 | -              . $this->_getReducedDQLQueryPart('having', ['pre' => ' HAVING ']) | |
| 1428 | -              . $this->_getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']); | |
| 1425 | +                . $this->_getReducedDQLQueryPart('where', ['pre' => ' WHERE ']) | |
| 1426 | +                . $this->_getReducedDQLQueryPart('groupBy', ['pre' => ' GROUP BY ', 'separator' => ', ']) | |
| 1427 | +                . $this->_getReducedDQLQueryPart('having', ['pre' => ' HAVING ']) | |
| 1428 | +                . $this->_getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']); | |
| 1429 | 1429 | |
| 1430 | 1430 | return $dql; | 
| 1431 | 1431 | } | 
| @@ -1445,8 +1445,8 @@ discard block | ||
| 1445 | 1445 | } | 
| 1446 | 1446 | |
| 1447 | 1447 | return (isset($options['pre']) ? $options['pre'] : '') | 
| 1448 | - . (is_array($queryPart) ? implode($options['separator'], $queryPart) : $queryPart) | |
| 1449 | - . (isset($options['post']) ? $options['post'] : ''); | |
| 1448 | + . (is_array($queryPart) ? implode($options['separator'], $queryPart) : $queryPart) | |
| 1449 | + . (isset($options['post']) ? $options['post'] : ''); | |
| 1450 | 1450 | } | 
| 1451 | 1451 | |
| 1452 | 1452 | /** | 
| @@ -533,7 +533,7 @@ discard block | ||
| 533 | 533 | public function setParameter($key, $value, $type = null) | 
| 534 | 534 |      { | 
| 535 | 535 | $filteredParameters = $this->parameters->filter( | 
| 536 | - function ($parameter) use ($key) | |
| 536 | + function($parameter) use ($key) | |
| 537 | 537 |              { | 
| 538 | 538 | /* @var Query\Parameter $parameter */ | 
| 539 | 539 | // Must not be identical because of string to integer conversion | 
| @@ -614,7 +614,7 @@ discard block | ||
| 614 | 614 | public function getParameter($key) | 
| 615 | 615 |      { | 
| 616 | 616 | $filteredParameters = $this->parameters->filter( | 
| 617 | - function ($parameter) use ($key) | |
| 617 | + function($parameter) use ($key) | |
| 618 | 618 |              { | 
| 619 | 619 | /* @var Query\Parameter $parameter */ | 
| 620 | 620 | // Must not be identical because of string to integer conversion | 
| @@ -697,7 +697,7 @@ discard block | ||
| 697 | 697 | } | 
| 698 | 698 | |
| 699 | 699 | $isMultiple = is_array($this->_dqlParts[$dqlPartName]) | 
| 700 | - && !($dqlPartName == 'join' && !$append); | |
| 700 | + && ! ($dqlPartName == 'join' && ! $append); | |
| 701 | 701 | |
| 702 | 702 | // Allow adding any part retrieved from self::getDQLParts(). | 
| 703 | 703 |          if (is_array($dqlPart) && $dqlPartName != 'join') { | 
| @@ -914,7 +914,7 @@ discard block | ||
| 914 | 914 |      { | 
| 915 | 915 | $rootAliases = $this->getRootAliases(); | 
| 916 | 916 | |
| 917 | -        if (!in_array($alias, $rootAliases)) { | |
| 917 | +        if ( ! in_array($alias, $rootAliases)) { | |
| 918 | 918 | throw new Query\QueryException( | 
| 919 | 919 |                  sprintf('Specified root alias %s must be set before invoking indexBy().', $alias) | 
| 920 | 920 | ); | 
| @@ -1316,15 +1316,15 @@ discard block | ||
| 1316 | 1316 |              foreach ($criteria->getOrderings() as $sort => $order) { | 
| 1317 | 1317 | |
| 1318 | 1318 | $hasValidAlias = false; | 
| 1319 | -                foreach($allAliases as $alias) { | |
| 1320 | -                    if(strpos($sort . '.', $alias . '.') === 0) { | |
| 1319 | +                foreach ($allAliases as $alias) { | |
| 1320 | +                    if (strpos($sort.'.', $alias.'.') === 0) { | |
| 1321 | 1321 | $hasValidAlias = true; | 
| 1322 | 1322 | break; | 
| 1323 | 1323 | } | 
| 1324 | 1324 | } | 
| 1325 | 1325 | |
| 1326 | -                if(!$hasValidAlias) { | |
| 1327 | - $sort = $allAliases[0] . '.' . $sort; | |
| 1326 | +                if ( ! $hasValidAlias) { | |
| 1327 | + $sort = $allAliases[0].'.'.$sort; | |
| 1328 | 1328 | } | 
| 1329 | 1329 | |
| 1330 | 1330 | $this->addOrderBy($sort, $order); | 
| @@ -1397,7 +1397,7 @@ discard block | ||
| 1397 | 1397 | private function _getDQLForSelect() | 
| 1398 | 1398 |      { | 
| 1399 | 1399 | $dql = 'SELECT' | 
| 1400 | - . ($this->_dqlParts['distinct']===true ? ' DISTINCT' : '') | |
| 1400 | + . ($this->_dqlParts['distinct'] === true ? ' DISTINCT' : '') | |
| 1401 | 1401 |               . $this->_getReducedDQLQueryPart('select', ['pre' => ' ', 'separator' => ', ']); | 
| 1402 | 1402 | |
| 1403 | 1403 |          $fromParts   = $this->getDQLPart('from'); | 
| @@ -1413,7 +1413,7 @@ discard block | ||
| 1413 | 1413 | |
| 1414 | 1414 |                  if ($from instanceof Expr\From && isset($joinParts[$from->getAlias()])) { | 
| 1415 | 1415 |                      foreach ($joinParts[$from->getAlias()] as $join) { | 
| 1416 | - $fromClause .= ' ' . ((string) $join); | |
| 1416 | + $fromClause .= ' '.((string) $join); | |
| 1417 | 1417 | } | 
| 1418 | 1418 | } | 
| 1419 | 1419 | |