Completed
Pull Request — master (#6392)
by Alessandro
11:39
created
lib/Doctrine/ORM/Cache/DefaultEntityHydrator.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,6 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/Persister/Entity/AbstractEntityPersister.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,6 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -296,7 +296,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/NamingStrategy.php 1 patch
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -70,8 +70,6 @@
 block discarded – undo
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
      */
Please login to merge, or discard this patch.
lib/Doctrine/ORM/NativeQuery.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
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
      */
Please login to merge, or discard this patch.
lib/Doctrine/ORM/PersistentCollection.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -579,7 +579,7 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/QueryExpressionVisitor.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,6 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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,7 +182,7 @@  discard block
 block discarded – undo
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);
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
                     );
199 199
                 }
200 200
 
201
-                throw new \RuntimeException("Unknown comparison operator: " . $comparison->getOperator());
201
+                throw new \RuntimeException("Unknown comparison operator: ".$comparison->getOperator());
202 202
         }
203 203
     }
204 204
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/ResultSetMapping.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -389,7 +389,7 @@
 block discarded – undo
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)
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -227,7 +227,9 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/SqlWalker.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -1529,6 +1529,7 @@
 block discarded – undo
1529 1529
 
1530 1530
     /**
1531 1531
      * @param AST\NewObjectExpression $newObjectExpression
1532
+     * @param string $newObjectResultAlias
1532 1533
      *
1533 1534
      * @return string The SQL.
1534 1535
      */
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -444,7 +444,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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']);
Please login to merge, or discard this patch.
Spacing   +118 added lines, -118 removed lines patch added patch discarded remove patch
@@ -289,11 +289,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
@@ -764,7 +764,7 @@  discard block
 block discarded – undo
764 764
                     $columnAlias = $this->getSQLColumnAlias($columnName);
765 765
                     $columnType  = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em);
766 766
 
767
-                    $sqlSelectExpressions[] = $sqlTableAlias . '.' . $columnName . ' AS ' . $columnAlias;
767
+                    $sqlSelectExpressions[] = $sqlTableAlias.'.'.$columnName.' AS '.$columnAlias;
768 768
 
769 769
                     $this->rsm->addMetaResult($dqlAlias, $columnAlias, $columnName, $isIdentifier, $columnType);
770 770
                 }
@@ -792,7 +792,7 @@  discard block
 block discarded – undo
792 792
                             $columnAlias = $this->getSQLColumnAlias($columnName);
793 793
                             $columnType  = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em);
794 794
 
795
-                            $sqlSelectExpressions[] = $sqlTableAlias . '.' . $columnName . ' AS ' . $columnAlias;
795
+                            $sqlSelectExpressions[] = $sqlTableAlias.'.'.$columnName.' AS '.$columnAlias;
796 796
 
797 797
                             $this->rsm->addMetaResult($dqlAlias, $columnAlias, $columnName, $subClass->isIdentifier($columnName), $columnType);
798 798
                         }
@@ -818,7 +818,7 @@  discard block
 block discarded – undo
818 818
             $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl);
819 819
         }
820 820
 
821
-        return ' FROM ' . implode(', ', $sqlParts);
821
+        return ' FROM '.implode(', ', $sqlParts);
822 822
     }
823 823
 
824 824
     /**
@@ -882,7 +882,7 @@  discard block
 block discarded – undo
882 882
         }
883 883
 
884 884
         $sql = $this->platform->appendLockHint(
885
-            $this->quoteStrategy->getTableName($class, $this->platform) . ' ' .
885
+            $this->quoteStrategy->getTableName($class, $this->platform).' '.
886 886
             $this->getSQLTableAlias($class->getTableName(), $dqlAlias),
887 887
             $this->query->getHint(Query::HINT_LOCK_MODE)
888 888
         );
@@ -924,7 +924,7 @@  discard block
 block discarded – undo
924 924
         // Ensure we got the owning side, since it has all mapping info
925 925
         $assoc = ( ! $relation['isOwningSide']) ? $targetClass->associationMappings[$relation['mappedBy']] : $relation;
926 926
 
927
-        if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && (!$this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) {
927
+        if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) {
928 928
             if ($relation['type'] == ClassMetadata::ONE_TO_MANY || $relation['type'] == ClassMetadata::MANY_TO_MANY) {
929 929
                 throw QueryException::iterateWithFetchJoinNotAllowed($assoc);
930 930
             }
@@ -944,12 +944,12 @@  discard block
 block discarded – undo
944 944
                     $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform);
945 945
 
946 946
                     if ($relation['isOwningSide']) {
947
-                        $conditions[] = $sourceTableAlias . '.' . $quotedSourceColumn . ' = ' . $targetTableAlias . '.' . $quotedTargetColumn;
947
+                        $conditions[] = $sourceTableAlias.'.'.$quotedSourceColumn.' = '.$targetTableAlias.'.'.$quotedTargetColumn;
948 948
 
949 949
                         continue;
950 950
                     }
951 951
 
952
-                    $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $targetTableAlias . '.' . $quotedSourceColumn;
952
+                    $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$targetTableAlias.'.'.$quotedSourceColumn;
953 953
                 }
954 954
 
955 955
                 // Apply remaining inheritance restrictions
@@ -967,7 +967,7 @@  discard block
 block discarded – undo
967 967
                 }
968 968
 
969 969
                 $targetTableJoin = [
970
-                    'table' => $targetTableName . ' ' . $targetTableAlias,
970
+                    'table' => $targetTableName.' '.$targetTableAlias,
971 971
                     'condition' => implode(' AND ', $conditions),
972 972
                 ];
973 973
                 break;
@@ -987,10 +987,10 @@  discard block
 block discarded – undo
987 987
                     $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform);
988 988
                     $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform);
989 989
 
990
-                    $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn;
990
+                    $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableAlias.'.'.$quotedSourceColumn;
991 991
                 }
992 992
 
993
-                $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions);
993
+                $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions);
994 994
 
995 995
                 // Join target table
996 996
                 $sql .= ($joinType == AST\Join::JOIN_TYPE_LEFT || $joinType == AST\Join::JOIN_TYPE_LEFTOUTER) ? ' LEFT JOIN ' : ' INNER JOIN ';
@@ -1004,7 +1004,7 @@  discard block
 block discarded – undo
1004 1004
                     $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform);
1005 1005
                     $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform);
1006 1006
 
1007
-                    $conditions[] = $targetTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn;
1007
+                    $conditions[] = $targetTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableAlias.'.'.$quotedSourceColumn;
1008 1008
                 }
1009 1009
 
1010 1010
                 // Apply remaining inheritance restrictions
@@ -1022,7 +1022,7 @@  discard block
 block discarded – undo
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;
@@ -1032,22 +1032,22 @@  discard block
 block discarded – undo
1032 1032
         }
1033 1033
 
1034 1034
         // Handle WITH clause
1035
-        $withCondition = (null === $condExpr) ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')');
1035
+        $withCondition = (null === $condExpr) ? '' : ('('.$this->walkConditionalExpression($condExpr).')');
1036 1036
 
1037 1037
         if ($targetClass->isInheritanceTypeJoined()) {
1038 1038
             $ctiJoins = $this->_generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias);
1039 1039
             // If we have WITH condition, we need to build nested joins for target class table and cti joins
1040 1040
             if ($withCondition) {
1041
-                $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition'];
1041
+                $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition'];
1042 1042
             } else {
1043
-                $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins;
1043
+                $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins;
1044 1044
             }
1045 1045
         } else {
1046
-            $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'];
1046
+            $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'];
1047 1047
         }
1048 1048
 
1049 1049
         if ($withCondition) {
1050
-            $sql .= ' AND ' . $withCondition;
1050
+            $sql .= ' AND '.$withCondition;
1051 1051
         }
1052 1052
 
1053 1053
         // Apply the indexes
@@ -1080,7 +1080,7 @@  discard block
 block discarded – undo
1080 1080
             $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems);
1081 1081
         }
1082 1082
 
1083
-        return ' ORDER BY ' . implode(', ', $orderByItems);
1083
+        return ' ORDER BY '.implode(', ', $orderByItems);
1084 1084
     }
1085 1085
 
1086 1086
     /**
@@ -1097,10 +1097,10 @@  discard block
 block discarded – undo
1097 1097
         $this->orderedColumnsMap[$sql] = $type;
1098 1098
 
1099 1099
         if ($expr instanceof AST\Subselect) {
1100
-            return '(' . $sql . ') ' . $type;
1100
+            return '('.$sql.') '.$type;
1101 1101
         }
1102 1102
 
1103
-        return $sql . ' ' . $type;
1103
+        return $sql.' '.$type;
1104 1104
     }
1105 1105
 
1106 1106
     /**
@@ -1108,7 +1108,7 @@  discard block
 block discarded – undo
1108 1108
      */
1109 1109
     public function walkHavingClause($havingClause)
1110 1110
     {
1111
-        return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression);
1111
+        return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression);
1112 1112
     }
1113 1113
 
1114 1114
     /**
@@ -1131,7 +1131,7 @@  discard block
 block discarded – undo
1131 1131
                 $conditions = [];
1132 1132
 
1133 1133
                 if ($join->conditionalExpression) {
1134
-                    $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')';
1134
+                    $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')';
1135 1135
                 }
1136 1136
 
1137 1137
                 $condExprConjunction = ($class->isInheritanceTypeJoined() && $joinType != AST\Join::JOIN_TYPE_LEFT && $joinType != AST\Join::JOIN_TYPE_LEFTOUTER)
@@ -1155,7 +1155,7 @@  discard block
 block discarded – undo
1155 1155
                 }
1156 1156
 
1157 1157
                 if ($conditions) {
1158
-                    $sql .= $condExprConjunction . implode(' AND ', $conditions);
1158
+                    $sql .= $condExprConjunction.implode(' AND ', $conditions);
1159 1159
                 }
1160 1160
 
1161 1161
                 break;
@@ -1185,7 +1185,7 @@  discard block
 block discarded – undo
1185 1185
             $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression);
1186 1186
         }
1187 1187
 
1188
-        $sql .= implode(', ', $scalarExpressions) . ')';
1188
+        $sql .= implode(', ', $scalarExpressions).')';
1189 1189
 
1190 1190
         return $sql;
1191 1191
     }
@@ -1207,7 +1207,7 @@  discard block
 block discarded – undo
1207 1207
             ? $this->conn->quote($nullIfExpression->secondExpression)
1208 1208
             : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression);
1209 1209
 
1210
-        return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')';
1210
+        return 'NULLIF('.$firstExpression.', '.$secondExpression.')';
1211 1211
     }
1212 1212
 
1213 1213
     /**
@@ -1222,11 +1222,11 @@  discard block
 block discarded – undo
1222 1222
         $sql = 'CASE';
1223 1223
 
1224 1224
         foreach ($generalCaseExpression->whenClauses as $whenClause) {
1225
-            $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression);
1226
-            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
1225
+            $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression);
1226
+            $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
1227 1227
         }
1228 1228
 
1229
-        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END';
1229
+        $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END';
1230 1230
 
1231 1231
         return $sql;
1232 1232
     }
@@ -1240,14 +1240,14 @@  discard block
 block discarded – undo
1240 1240
      */
1241 1241
     public function walkSimpleCaseExpression($simpleCaseExpression)
1242 1242
     {
1243
-        $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
1243
+        $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
1244 1244
 
1245 1245
         foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) {
1246
-            $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
1247
-            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
1246
+            $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
1247
+            $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
1248 1248
         }
1249 1249
 
1250
-        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END';
1250
+        $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END';
1251 1251
 
1252 1252
         return $sql;
1253 1253
     }
@@ -1281,14 +1281,14 @@  discard block
 block discarded – undo
1281 1281
                 $fieldMapping  = $class->fieldMappings[$fieldName];
1282 1282
                 $columnName    = $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform);
1283 1283
                 $columnAlias   = $this->getSQLColumnAlias($fieldMapping['columnName']);
1284
-                $col           = $sqlTableAlias . '.' . $columnName;
1284
+                $col           = $sqlTableAlias.'.'.$columnName;
1285 1285
 
1286 1286
                 if (isset($fieldMapping['requireSQLConversion'])) {
1287 1287
                     $type = Type::getType($fieldMapping['type']);
1288 1288
                     $col  = $type->convertToPHPValueSQL($col, $this->conn->getDatabasePlatform());
1289 1289
                 }
1290 1290
 
1291
-                $sql .= $col . ' AS ' . $columnAlias;
1291
+                $sql .= $col.' AS '.$columnAlias;
1292 1292
 
1293 1293
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1294 1294
 
@@ -1313,7 +1313,7 @@  discard block
 block discarded – undo
1313 1313
                 $columnAlias = $this->getSQLColumnAlias('sclr');
1314 1314
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1315 1315
 
1316
-                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
1316
+                $sql .= $expr->dispatch($this).' AS '.$columnAlias;
1317 1317
 
1318 1318
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1319 1319
 
@@ -1327,7 +1327,7 @@  discard block
 block discarded – undo
1327 1327
                 $columnAlias = $this->getSQLColumnAlias('sclr');
1328 1328
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1329 1329
 
1330
-                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1330
+                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias;
1331 1331
 
1332 1332
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1333 1333
 
@@ -1338,7 +1338,7 @@  discard block
 block discarded – undo
1338 1338
                 break;
1339 1339
 
1340 1340
             case ($expr instanceof AST\NewObjectExpression):
1341
-                $sql .= $this->walkNewObject($expr,$selectExpression->fieldIdentificationVariable);
1341
+                $sql .= $this->walkNewObject($expr, $selectExpression->fieldIdentificationVariable);
1342 1342
                 break;
1343 1343
 
1344 1344
             default:
@@ -1379,14 +1379,14 @@  discard block
 block discarded – undo
1379 1379
                     $columnAlias      = $this->getSQLColumnAlias($mapping['columnName']);
1380 1380
                     $quotedColumnName = $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform);
1381 1381
 
1382
-                    $col = $sqlTableAlias . '.' . $quotedColumnName;
1382
+                    $col = $sqlTableAlias.'.'.$quotedColumnName;
1383 1383
 
1384 1384
                     if (isset($mapping['requireSQLConversion'])) {
1385 1385
                         $type = Type::getType($mapping['type']);
1386 1386
                         $col = $type->convertToPHPValueSQL($col, $this->platform);
1387 1387
                     }
1388 1388
 
1389
-                    $sqlParts[] = $col . ' AS '. $columnAlias;
1389
+                    $sqlParts[] = $col.' AS '.$columnAlias;
1390 1390
 
1391 1391
                     $this->scalarResultAliasMap[$resultAlias][] = $columnAlias;
1392 1392
 
@@ -1403,21 +1403,21 @@  discard block
 block discarded – undo
1403 1403
                         $sqlTableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias);
1404 1404
 
1405 1405
                         foreach ($subClass->fieldMappings as $fieldName => $mapping) {
1406
-                            if (isset($mapping['inherited']) || ($partialFieldSet && !in_array($fieldName, $partialFieldSet))) {
1406
+                            if (isset($mapping['inherited']) || ($partialFieldSet && ! in_array($fieldName, $partialFieldSet))) {
1407 1407
                                 continue;
1408 1408
                             }
1409 1409
 
1410 1410
                             $columnAlias      = $this->getSQLColumnAlias($mapping['columnName']);
1411 1411
                             $quotedColumnName = $this->quoteStrategy->getColumnName($fieldName, $subClass, $this->platform);
1412 1412
 
1413
-                            $col = $sqlTableAlias . '.' . $quotedColumnName;
1413
+                            $col = $sqlTableAlias.'.'.$quotedColumnName;
1414 1414
 
1415 1415
                             if (isset($mapping['requireSQLConversion'])) {
1416 1416
                                 $type = Type::getType($mapping['type']);
1417 1417
                                 $col = $type->convertToPHPValueSQL($col, $this->platform);
1418 1418
                             }
1419 1419
 
1420
-                            $sqlParts[] = $col . ' AS ' . $columnAlias;
1420
+                            $sqlParts[] = $col.' AS '.$columnAlias;
1421 1421
 
1422 1422
                             $this->scalarResultAliasMap[$resultAlias][] = $columnAlias;
1423 1423
 
@@ -1437,7 +1437,7 @@  discard block
 block discarded – undo
1437 1437
      */
1438 1438
     public function walkQuantifiedExpression($qExpr)
1439 1439
     {
1440
-        return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')';
1440
+        return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')';
1441 1441
     }
1442 1442
 
1443 1443
     /**
@@ -1477,7 +1477,7 @@  discard block
 block discarded – undo
1477 1477
             $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl);
1478 1478
         }
1479 1479
 
1480
-        return ' FROM ' . implode(', ', $sqlParts);
1480
+        return ' FROM '.implode(', ', $sqlParts);
1481 1481
     }
1482 1482
 
1483 1483
     /**
@@ -1485,7 +1485,7 @@  discard block
 block discarded – undo
1485 1485
      */
1486 1486
     public function walkSimpleSelectClause($simpleSelectClause)
1487 1487
     {
1488
-        return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '')
1488
+        return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '')
1489 1489
             . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression);
1490 1490
     }
1491 1491
 
@@ -1504,10 +1504,10 @@  discard block
 block discarded – undo
1504 1504
      *
1505 1505
      * @return string The SQL.
1506 1506
      */
1507
-    public function walkNewObject($newObjectExpression, $newObjectResultAlias=null)
1507
+    public function walkNewObject($newObjectExpression, $newObjectResultAlias = null)
1508 1508
     {
1509 1509
         $sqlSelectExpressions = [];
1510
-        $objIndex             = $newObjectResultAlias?:$this->newObjectCounter++;
1510
+        $objIndex             = $newObjectResultAlias ?: $this->newObjectCounter++;
1511 1511
 
1512 1512
         foreach ($newObjectExpression->args as $argIndex => $e) {
1513 1513
             $resultAlias = $this->scalarResultCounter++;
@@ -1520,7 +1520,7 @@  discard block
 block discarded – undo
1520 1520
                     break;
1521 1521
 
1522 1522
                 case ($e instanceof AST\Subselect):
1523
-                    $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias;
1523
+                    $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias;
1524 1524
                     break;
1525 1525
 
1526 1526
                 case ($e instanceof AST\PathExpression):
@@ -1529,7 +1529,7 @@  discard block
 block discarded – undo
1529 1529
                     $class     = $qComp['metadata'];
1530 1530
                     $fieldType = $class->fieldMappings[$e->field]['type'];
1531 1531
 
1532
-                    $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias;
1532
+                    $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias;
1533 1533
                     break;
1534 1534
 
1535 1535
                 case ($e instanceof AST\Literal):
@@ -1543,11 +1543,11 @@  discard block
 block discarded – undo
1543 1543
                             break;
1544 1544
                     }
1545 1545
 
1546
-                    $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias;
1546
+                    $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias;
1547 1547
                     break;
1548 1548
 
1549 1549
                 default:
1550
-                    $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias;
1550
+                    $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias;
1551 1551
                     break;
1552 1552
             }
1553 1553
 
@@ -1580,16 +1580,16 @@  discard block
 block discarded – undo
1580 1580
             case ($expr instanceof AST\AggregateExpression):
1581 1581
                 $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1582 1582
 
1583
-                $sql .= $this->walkAggregateExpression($expr) . ' AS dctrn__' . $alias;
1583
+                $sql .= $this->walkAggregateExpression($expr).' AS dctrn__'.$alias;
1584 1584
                 break;
1585 1585
 
1586 1586
             case ($expr instanceof AST\Subselect):
1587 1587
                 $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1588 1588
 
1589
-                $columnAlias = 'sclr' . $this->aliasCounter++;
1589
+                $columnAlias = 'sclr'.$this->aliasCounter++;
1590 1590
                 $this->scalarResultAliasMap[$alias] = $columnAlias;
1591 1591
 
1592
-                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1592
+                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias;
1593 1593
                 break;
1594 1594
 
1595 1595
             case ($expr instanceof AST\Functions\FunctionNode):
@@ -1606,7 +1606,7 @@  discard block
 block discarded – undo
1606 1606
                 $columnAlias = $this->getSQLColumnAlias('sclr');
1607 1607
                 $this->scalarResultAliasMap[$alias] = $columnAlias;
1608 1608
 
1609
-                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
1609
+                $sql .= $expr->dispatch($this).' AS '.$columnAlias;
1610 1610
                 break;
1611 1611
 
1612 1612
             case ($expr instanceof AST\ParenthesisExpression):
@@ -1626,8 +1626,8 @@  discard block
 block discarded – undo
1626 1626
      */
1627 1627
     public function walkAggregateExpression($aggExpression)
1628 1628
     {
1629
-        return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '')
1630
-            . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')';
1629
+        return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '')
1630
+            . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')';
1631 1631
     }
1632 1632
 
1633 1633
     /**
@@ -1641,7 +1641,7 @@  discard block
 block discarded – undo
1641 1641
             $sqlParts[] = $this->walkGroupByItem($groupByItem);
1642 1642
         }
1643 1643
 
1644
-        return ' GROUP BY ' . implode(', ', $sqlParts);
1644
+        return ' GROUP BY '.implode(', ', $sqlParts);
1645 1645
     }
1646 1646
 
1647 1647
     /**
@@ -1698,7 +1698,7 @@  discard block
 block discarded – undo
1698 1698
     {
1699 1699
         $class     = $this->em->getClassMetadata($deleteClause->abstractSchemaName);
1700 1700
         $tableName = $class->getTableName();
1701
-        $sql       = 'DELETE FROM ' . $this->quoteStrategy->getTableName($class, $this->platform);
1701
+        $sql       = 'DELETE FROM '.$this->quoteStrategy->getTableName($class, $this->platform);
1702 1702
 
1703 1703
         $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable);
1704 1704
         $this->rootAliases[] = $deleteClause->aliasIdentificationVariable;
@@ -1713,12 +1713,12 @@  discard block
 block discarded – undo
1713 1713
     {
1714 1714
         $class     = $this->em->getClassMetadata($updateClause->abstractSchemaName);
1715 1715
         $tableName = $class->getTableName();
1716
-        $sql       = 'UPDATE ' . $this->quoteStrategy->getTableName($class, $this->platform);
1716
+        $sql       = 'UPDATE '.$this->quoteStrategy->getTableName($class, $this->platform);
1717 1717
 
1718 1718
         $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable);
1719 1719
         $this->rootAliases[] = $updateClause->aliasIdentificationVariable;
1720 1720
 
1721
-        $sql .= ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems));
1721
+        $sql .= ' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems));
1722 1722
 
1723 1723
         return $sql;
1724 1724
     }
@@ -1731,7 +1731,7 @@  discard block
 block discarded – undo
1731 1731
         $useTableAliasesBefore = $this->useSqlTableAliases;
1732 1732
         $this->useSqlTableAliases = false;
1733 1733
 
1734
-        $sql      = $this->walkPathExpression($updateItem->pathExpression) . ' = ';
1734
+        $sql      = $this->walkPathExpression($updateItem->pathExpression).' = ';
1735 1735
         $newValue = $updateItem->newValue;
1736 1736
 
1737 1737
         switch (true) {
@@ -1774,7 +1774,7 @@  discard block
 block discarded – undo
1774 1774
 
1775 1775
             if (count($filterClauses)) {
1776 1776
                 if ($condSql) {
1777
-                    $condSql = '(' . $condSql . ') AND ';
1777
+                    $condSql = '('.$condSql.') AND ';
1778 1778
                 }
1779 1779
 
1780 1780
                 $condSql .= implode(' AND ', $filterClauses);
@@ -1782,11 +1782,11 @@  discard block
 block discarded – undo
1782 1782
         }
1783 1783
 
1784 1784
         if ($condSql) {
1785
-            return ' WHERE ' . (( ! $discrSql) ? $condSql : '(' . $condSql . ') AND ' . $discrSql);
1785
+            return ' WHERE '.(( ! $discrSql) ? $condSql : '('.$condSql.') AND '.$discrSql);
1786 1786
         }
1787 1787
 
1788 1788
         if ($discrSql) {
1789
-            return ' WHERE ' . $discrSql;
1789
+            return ' WHERE '.$discrSql;
1790 1790
         }
1791 1791
 
1792 1792
         return '';
@@ -1829,7 +1829,7 @@  discard block
 block discarded – undo
1829 1829
         // if only one ConditionalPrimary is defined
1830 1830
         return ( ! ($factor instanceof AST\ConditionalFactor))
1831 1831
             ? $this->walkConditionalPrimary($factor)
1832
-            : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary);
1832
+            : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary);
1833 1833
     }
1834 1834
 
1835 1835
     /**
@@ -1844,7 +1844,7 @@  discard block
 block discarded – undo
1844 1844
         if ($primary->isConditionalExpression()) {
1845 1845
             $condExpr = $primary->conditionalExpression;
1846 1846
 
1847
-            return '(' . $this->walkConditionalExpression($condExpr) . ')';
1847
+            return '('.$this->walkConditionalExpression($condExpr).')';
1848 1848
         }
1849 1849
     }
1850 1850
 
@@ -1855,7 +1855,7 @@  discard block
 block discarded – undo
1855 1855
     {
1856 1856
         $sql = ($existsExpr->not) ? 'NOT ' : '';
1857 1857
 
1858
-        $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')';
1858
+        $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')';
1859 1859
 
1860 1860
         return $sql;
1861 1861
     }
@@ -1899,7 +1899,7 @@  discard block
 block discarded – undo
1899 1899
             $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName());
1900 1900
             $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
1901 1901
 
1902
-            $sql .= $this->quoteStrategy->getTableName($targetClass, $this->platform) . ' ' . $targetTableAlias . ' WHERE ';
1902
+            $sql .= $this->quoteStrategy->getTableName($targetClass, $this->platform).' '.$targetTableAlias.' WHERE ';
1903 1903
 
1904 1904
             $owningAssoc = $targetClass->associationMappings[$assoc['mappedBy']];
1905 1905
             $sqlParts    = [];
@@ -1907,7 +1907,7 @@  discard block
 block discarded – undo
1907 1907
             foreach ($owningAssoc['targetToSourceKeyColumns'] as $targetColumn => $sourceColumn) {
1908 1908
                 $targetColumn = $this->quoteStrategy->getColumnName($class->fieldNames[$targetColumn], $class, $this->platform);
1909 1909
 
1910
-                $sqlParts[] = $sourceTableAlias . '.' . $targetColumn . ' = ' . $targetTableAlias . '.' . $sourceColumn;
1910
+                $sqlParts[] = $sourceTableAlias.'.'.$targetColumn.' = '.$targetTableAlias.'.'.$sourceColumn;
1911 1911
             }
1912 1912
 
1913 1913
             foreach ($this->quoteStrategy->getIdentifierColumnNames($targetClass, $this->platform) as $targetColumnName) {
@@ -1915,7 +1915,7 @@  discard block
 block discarded – undo
1915 1915
                     $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++);
1916 1916
                 }
1917 1917
 
1918
-                $sqlParts[] = $targetTableAlias . '.'  . $targetColumnName . ' = ' . $entitySql;
1918
+                $sqlParts[] = $targetTableAlias.'.'.$targetColumnName.' = '.$entitySql;
1919 1919
             }
1920 1920
 
1921 1921
             $sql .= implode(' AND ', $sqlParts);
@@ -1931,8 +1931,8 @@  discard block
 block discarded – undo
1931 1931
             $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
1932 1932
 
1933 1933
             // join to target table
1934
-            $sql .= $this->quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $this->platform) . ' ' . $joinTableAlias
1935
-                . ' INNER JOIN ' . $this->quoteStrategy->getTableName($targetClass, $this->platform) . ' ' . $targetTableAlias . ' ON ';
1934
+            $sql .= $this->quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $this->platform).' '.$joinTableAlias
1935
+                . ' INNER JOIN '.$this->quoteStrategy->getTableName($targetClass, $this->platform).' '.$targetTableAlias.' ON ';
1936 1936
 
1937 1937
             // join conditions
1938 1938
             $joinColumns  = $assoc['isOwningSide'] ? $joinTable['inverseJoinColumns'] : $joinTable['joinColumns'];
@@ -1941,7 +1941,7 @@  discard block
 block discarded – undo
1941 1941
             foreach ($joinColumns as $joinColumn) {
1942 1942
                 $targetColumn = $this->quoteStrategy->getColumnName($targetClass->fieldNames[$joinColumn['referencedColumnName']], $targetClass, $this->platform);
1943 1943
 
1944
-                $joinSqlParts[] = $joinTableAlias . '.' . $joinColumn['name'] . ' = ' . $targetTableAlias . '.' . $targetColumn;
1944
+                $joinSqlParts[] = $joinTableAlias.'.'.$joinColumn['name'].' = '.$targetTableAlias.'.'.$targetColumn;
1945 1945
             }
1946 1946
 
1947 1947
             $sql .= implode(' AND ', $joinSqlParts);
@@ -1953,7 +1953,7 @@  discard block
 block discarded – undo
1953 1953
             foreach ($joinColumns as $joinColumn) {
1954 1954
                 $targetColumn = $this->quoteStrategy->getColumnName($class->fieldNames[$joinColumn['referencedColumnName']], $class, $this->platform);
1955 1955
 
1956
-                $sqlParts[] = $joinTableAlias . '.' . $joinColumn['name'] . ' = ' . $sourceTableAlias . '.' . $targetColumn;
1956
+                $sqlParts[] = $joinTableAlias.'.'.$joinColumn['name'].' = '.$sourceTableAlias.'.'.$targetColumn;
1957 1957
             }
1958 1958
 
1959 1959
             foreach ($this->quoteStrategy->getIdentifierColumnNames($targetClass, $this->platform) as $targetColumnName) {
@@ -1961,13 +1961,13 @@  discard block
 block discarded – undo
1961 1961
                     $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++);
1962 1962
                 }
1963 1963
 
1964
-                $sqlParts[] = $targetTableAlias . '.' . $targetColumnName . ' IN (' . $entitySql . ')';
1964
+                $sqlParts[] = $targetTableAlias.'.'.$targetColumnName.' IN ('.$entitySql.')';
1965 1965
             }
1966 1966
 
1967 1967
             $sql .= implode(' AND ', $sqlParts);
1968 1968
         }
1969 1969
 
1970
-        return $sql . ')';
1970
+        return $sql.')';
1971 1971
     }
1972 1972
 
1973 1973
     /**
@@ -1978,7 +1978,7 @@  discard block
 block discarded – undo
1978 1978
         $sizeFunc = new AST\Functions\SizeFunction('size');
1979 1979
         $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression;
1980 1980
 
1981
-        return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0');
1981
+        return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0');
1982 1982
     }
1983 1983
 
1984 1984
     /**
@@ -1987,19 +1987,19 @@  discard block
 block discarded – undo
1987 1987
     public function walkNullComparisonExpression($nullCompExpr)
1988 1988
     {
1989 1989
         $expression = $nullCompExpr->expression;
1990
-        $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL';
1990
+        $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL';
1991 1991
 
1992 1992
         // Handle ResultVariable
1993 1993
         if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) {
1994
-            return $this->walkResultVariable($expression) . $comparison;
1994
+            return $this->walkResultVariable($expression).$comparison;
1995 1995
         }
1996 1996
 
1997 1997
         // Handle InputParameter mapping inclusion to ParserResult
1998 1998
         if ($expression instanceof AST\InputParameter) {
1999
-            return $this->walkInputParameter($expression) . $comparison;
1999
+            return $this->walkInputParameter($expression).$comparison;
2000 2000
         }
2001 2001
 
2002
-        return $expression->dispatch($this) . $comparison;
2002
+        return $expression->dispatch($this).$comparison;
2003 2003
     }
2004 2004
 
2005 2005
     /**
@@ -2007,7 +2007,7 @@  discard block
 block discarded – undo
2007 2007
      */
2008 2008
     public function walkInExpression($inExpr)
2009 2009
     {
2010
-        $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN (';
2010
+        $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN (';
2011 2011
 
2012 2012
         $sql .= ($inExpr->subselect)
2013 2013
             ? $this->walkSubselect($inExpr->subselect)
@@ -2033,10 +2033,10 @@  discard block
 block discarded – undo
2033 2033
         }
2034 2034
 
2035 2035
         if ($this->useSqlTableAliases) {
2036
-            $sql .= $this->getSQLTableAlias($discrClass->getTableName(), $dqlAlias) . '.';
2036
+            $sql .= $this->getSQLTableAlias($discrClass->getTableName(), $dqlAlias).'.';
2037 2037
         }
2038 2038
 
2039
-        $sql .= $class->discriminatorColumn['name'] . ($instanceOfExpr->not ? ' NOT IN ' : ' IN ');
2039
+        $sql .= $class->discriminatorColumn['name'].($instanceOfExpr->not ? ' NOT IN ' : ' IN ');
2040 2040
 
2041 2041
         $knownSubclasses = array_flip($discrClass->subClasses);
2042 2042
 
@@ -2078,7 +2078,7 @@  discard block
 block discarded – undo
2078 2078
             $sqlParameterList[] = $this->conn->quote($dis);
2079 2079
         }
2080 2080
 
2081
-        $sql .= '(' . implode(', ', $sqlParameterList) . ')';
2081
+        $sql .= '('.implode(', ', $sqlParameterList).')';
2082 2082
 
2083 2083
         return $sql;
2084 2084
     }
@@ -2124,8 +2124,8 @@  discard block
 block discarded – undo
2124 2124
             $sql .= ' NOT';
2125 2125
         }
2126 2126
 
2127
-        $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression)
2128
-            . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression);
2127
+        $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression)
2128
+            . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression);
2129 2129
 
2130 2130
         return $sql;
2131 2131
     }
@@ -2140,7 +2140,7 @@  discard block
 block discarded – undo
2140 2140
             ? $this->walkResultVariable($stringExpr)
2141 2141
             : $stringExpr->dispatch($this);
2142 2142
 
2143
-        $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE ';
2143
+        $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE ';
2144 2144
 
2145 2145
         if ($likeExpr->stringPattern instanceof AST\InputParameter) {
2146 2146
             $sql .= $this->walkInputParameter($likeExpr->stringPattern);
@@ -2153,7 +2153,7 @@  discard block
 block discarded – undo
2153 2153
         }
2154 2154
 
2155 2155
         if ($likeExpr->escapeChar) {
2156
-            $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar);
2156
+            $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar);
2157 2157
         }
2158 2158
 
2159 2159
         return $sql;
@@ -2180,7 +2180,7 @@  discard block
 block discarded – undo
2180 2180
             ? $leftExpr->dispatch($this)
2181 2181
             : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr));
2182 2182
 
2183
-        $sql .= ' ' . $compExpr->operator . ' ';
2183
+        $sql .= ' '.$compExpr->operator.' ';
2184 2184
 
2185 2185
         $sql .= ($rightExpr instanceof AST\Node)
2186 2186
             ? $rightExpr->dispatch($this)
@@ -2212,7 +2212,7 @@  discard block
 block discarded – undo
2212 2212
     {
2213 2213
         return ($arithmeticExpr->isSimpleArithmeticExpression())
2214 2214
             ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression)
2215
-            : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')';
2215
+            : '('.$this->walkSubselect($arithmeticExpr->subselect).')';
2216 2216
     }
2217 2217
 
2218 2218
     /**
@@ -2266,7 +2266,7 @@  discard block
 block discarded – undo
2266 2266
 
2267 2267
         $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : '');
2268 2268
 
2269
-        return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary);
2269
+        return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary);
2270 2270
     }
2271 2271
 
2272 2272
     /**
@@ -2279,7 +2279,7 @@  discard block
 block discarded – undo
2279 2279
     public function walkArithmeticPrimary($primary)
2280 2280
     {
2281 2281
         if ($primary instanceof AST\SimpleArithmeticExpression) {
2282
-            return '(' . $this->walkSimpleArithmeticExpression($primary) . ')';
2282
+            return '('.$this->walkSimpleArithmeticExpression($primary).')';
2283 2283
         }
2284 2284
 
2285 2285
         if ($primary instanceof AST\Node) {
Please login to merge, or discard this patch.
lib/Doctrine/ORM/QueryBuilder.php 4 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,6 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Doc Comments   +6 added lines, -8 removed lines patch added patch discarded remove patch
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
      */
Please login to merge, or discard this patch.
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -118,11 +118,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.