Completed
Pull Request — master (#5569)
by Jérémy
10:47
created
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/ResultSetMappingBuilder.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,6 @@
 block discarded – undo
19 19
 
20 20
 namespace Doctrine\ORM\Query;
21 21
 
22
-use Doctrine\DBAL\Types\Type;
23 22
 use Doctrine\ORM\EntityManagerInterface;
24 23
 use Doctrine\ORM\Mapping\ClassMetadataInfo;
25 24
 use Doctrine\ORM\Mapping\MappingException;
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
     {
205 205
         switch ($mode) {
206 206
             case self::COLUMN_RENAMING_INCREMENT:
207
-                return $columnName . $this->sqlCounter++;
207
+                return $columnName.$this->sqlCounter++;
208 208
 
209 209
             case self::COLUMN_RENAMING_CUSTOM:
210 210
                 return isset($customRenameColumns[$columnName])
@@ -327,19 +327,19 @@  discard block
 block discarded – undo
327 327
         $counter        = 0;
328 328
         $resultMapping  = $class->getSqlResultSetMapping($resultSetMappingName);
329 329
         $rootShortName  = $class->reflClass->getShortName();
330
-        $rootAlias      = strtolower($rootShortName[0]) . $counter;
330
+        $rootAlias      = strtolower($rootShortName[0]).$counter;
331 331
 
332 332
 
333 333
         if (isset($resultMapping['entities'])) {
334 334
             foreach ($resultMapping['entities'] as $key => $entityMapping) {
335
-                $classMetadata  = $this->em->getClassMetadata($entityMapping['entityClass']);
335
+                $classMetadata = $this->em->getClassMetadata($entityMapping['entityClass']);
336 336
 
337 337
                 if ($class->reflClass->name == $classMetadata->reflClass->name) {
338 338
                     $this->addEntityResult($classMetadata->name, $rootAlias);
339 339
                     $this->addNamedNativeQueryEntityResultMapping($classMetadata, $entityMapping, $rootAlias);
340 340
                 } else {
341 341
                     $shortName      = $classMetadata->reflClass->getShortName();
342
-                    $joinAlias      = strtolower($shortName[0]) . ++ $counter;
342
+                    $joinAlias      = strtolower($shortName[0]).++ $counter;
343 343
                     $associations   = $class->getAssociationsByTargetClass($classMetadata->name);
344 344
 
345 345
                     $this->addNamedNativeQueryEntityResultMapping($classMetadata, $entityMapping, $joinAlias);
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
             $this->addMetaResult($alias, $discriminatorColumn, $discriminatorColumn, false, $discriminatorType);
388 388
         }
389 389
 
390
-        if (isset($entityMapping['fields']) && !empty($entityMapping['fields'])) {
390
+        if (isset($entityMapping['fields']) && ! empty($entityMapping['fields'])) {
391 391
             foreach ($entityMapping['fields'] as $field) {
392 392
                 $fieldName = $field['name'];
393 393
                 $relation  = null;
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
                 $sql .= ", ";
450 450
             }
451 451
 
452
-            $sql .= $tableAlias . ".";
452
+            $sql .= $tableAlias.".";
453 453
 
454 454
             if (isset($this->fieldMappings[$columnName])) {
455 455
                 $class = $this->em->getClassMetadata($this->declaringClasses[$columnName]);
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
                 $sql .= $this->discriminatorColumns[$dqlAlias];
461 461
             }
462 462
 
463
-            $sql .= " AS " . $columnName;
463
+            $sql .= " AS ".$columnName;
464 464
         }
465 465
 
466 466
         return $sql;
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.
Spacing   +119 added lines, -119 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 = array();
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 = array();
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:
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
         $filterClauses = array();
508 508
         foreach ($this->em->getFilters()->getEnabledFilters() as $filter) {
509 509
             if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
510
-                $filterClauses[] = '(' . $filterExpr . ')';
510
+                $filterClauses[] = '('.$filterExpr.')';
511 511
             }
512 512
         }
513 513
 
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
         }
540 540
 
541 541
         if ( ! $AST->orderByClause && ($orderBySql = $this->_generateOrderedCollectionOrderByItems())) {
542
-            $sql .= ' ORDER BY ' . $orderBySql;
542
+            $sql .= ' ORDER BY '.$orderBySql;
543 543
         }
544 544
 
545 545
         if ($limit !== null || $offset !== null) {
@@ -551,11 +551,11 @@  discard block
 block discarded – undo
551 551
         }
552 552
 
553 553
         if ($lockMode === LockMode::PESSIMISTIC_READ) {
554
-            return $sql . ' ' . $this->platform->getReadLockSQL();
554
+            return $sql.' '.$this->platform->getReadLockSQL();
555 555
         }
556 556
 
557 557
         if ($lockMode === LockMode::PESSIMISTIC_WRITE) {
558
-            return $sql . ' ' . $this->platform->getWriteLockSQL();
558
+            return $sql.' '.$this->platform->getWriteLockSQL();
559 559
         }
560 560
 
561 561
         if ($lockMode !== LockMode::OPTIMISTIC) {
@@ -610,7 +610,7 @@  discard block
 block discarded – undo
610 610
         $sqlParts   = array();
611 611
 
612 612
         foreach ($this->quoteStrategy->getIdentifierColumnNames($class, $this->platform) as $columnName) {
613
-            $sqlParts[] = $tableAlias . '.' . $columnName;
613
+            $sqlParts[] = $tableAlias.'.'.$columnName;
614 614
         }
615 615
 
616 616
         return implode(', ', $sqlParts);
@@ -652,7 +652,7 @@  discard block
 block discarded – undo
652 652
                 $class = $this->queryComponents[$dqlAlias]['metadata'];
653 653
 
654 654
                 if ($this->useSqlTableAliases) {
655
-                    $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName) . '.';
655
+                    $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName).'.';
656 656
                 }
657 657
 
658 658
                 $sql .= $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform);
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
                 }
682 682
 
683 683
                 if ($this->useSqlTableAliases) {
684
-                    $sql .= $this->getSQLTableAlias($class->getTableName(), $dqlAlias) . '.';
684
+                    $sql .= $this->getSQLTableAlias($class->getTableName(), $dqlAlias).'.';
685 685
                 }
686 686
 
687 687
                 $sql .= reset($assoc['targetToSourceKeyColumns']);
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
      */
700 700
     public function walkSelectClause($selectClause)
701 701
     {
702
-        $sql = 'SELECT ' . (($selectClause->isDistinct) ? 'DISTINCT ' : '');
702
+        $sql = 'SELECT '.(($selectClause->isDistinct) ? 'DISTINCT ' : '');
703 703
         $sqlSelectExpressions = array_filter(array_map(array($this, 'walkSelectExpression'), $selectClause->selectExpressions));
704 704
 
705 705
         if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && $selectClause->isDistinct) {
@@ -736,7 +736,7 @@  discard block
 block discarded – undo
736 736
                 $discrColumn = $rootClass->discriminatorColumn;
737 737
                 $columnAlias = $this->getSQLColumnAlias($discrColumn['name']);
738 738
 
739
-                $sqlSelectExpressions[] = $tblAlias . '.' . $discrColumn['name'] . ' AS ' . $columnAlias;
739
+                $sqlSelectExpressions[] = $tblAlias.'.'.$discrColumn['name'].' AS '.$columnAlias;
740 740
 
741 741
                 $this->rsm->setDiscriminatorColumn($dqlAlias, $columnAlias);
742 742
                 $this->rsm->addMetaResult($dqlAlias, $columnAlias, $discrColumn['fieldName'], false, $discrColumn['type']);
@@ -751,7 +751,7 @@  discard block
 block discarded – undo
751 751
             foreach ($class->associationMappings as $assoc) {
752 752
                 if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE)) {
753 753
                     continue;
754
-                } else if ( !$addMetaColumns && !isset($assoc['id'])) {
754
+                } else if ( ! $addMetaColumns && ! isset($assoc['id'])) {
755 755
                     continue;
756 756
                 }
757 757
 
@@ -765,7 +765,7 @@  discard block
 block discarded – undo
765 765
                     $columnAlias = $this->getSQLColumnAlias($columnName);
766 766
                     $columnType  = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em);
767 767
 
768
-                    $sqlSelectExpressions[] = $sqlTableAlias . '.' . $columnName . ' AS ' . $columnAlias;
768
+                    $sqlSelectExpressions[] = $sqlTableAlias.'.'.$columnName.' AS '.$columnAlias;
769 769
 
770 770
                     $this->rsm->addMetaResult($dqlAlias, $columnAlias, $columnName, $isIdentifier, $columnType);
771 771
                 }
@@ -793,7 +793,7 @@  discard block
 block discarded – undo
793 793
                             $columnAlias = $this->getSQLColumnAlias($columnName);
794 794
                             $columnType  = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em);
795 795
 
796
-                            $sqlSelectExpressions[] = $sqlTableAlias . '.' . $columnName . ' AS ' . $columnAlias;
796
+                            $sqlSelectExpressions[] = $sqlTableAlias.'.'.$columnName.' AS '.$columnAlias;
797 797
 
798 798
                             $this->rsm->addMetaResult($dqlAlias, $columnAlias, $columnName, $subClass->isIdentifier($columnName), $columnType);
799 799
                         }
@@ -819,7 +819,7 @@  discard block
 block discarded – undo
819 819
             $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl);
820 820
         }
821 821
 
822
-        return ' FROM ' . implode(', ', $sqlParts);
822
+        return ' FROM '.implode(', ', $sqlParts);
823 823
     }
824 824
 
825 825
     /**
@@ -883,7 +883,7 @@  discard block
 block discarded – undo
883 883
         }
884 884
 
885 885
         $sql = $this->platform->appendLockHint(
886
-            $this->quoteStrategy->getTableName($class, $this->platform) . ' ' .
886
+            $this->quoteStrategy->getTableName($class, $this->platform).' '.
887 887
             $this->getSQLTableAlias($class->getTableName(), $dqlAlias),
888 888
             $this->query->getHint(Query::HINT_LOCK_MODE)
889 889
         );
@@ -925,7 +925,7 @@  discard block
 block discarded – undo
925 925
         // Ensure we got the owning side, since it has all mapping info
926 926
         $assoc = ( ! $relation['isOwningSide']) ? $targetClass->associationMappings[$relation['mappedBy']] : $relation;
927 927
 
928
-        if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && (!$this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) {
928
+        if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) {
929 929
             if ($relation['type'] == ClassMetadata::ONE_TO_MANY || $relation['type'] == ClassMetadata::MANY_TO_MANY) {
930 930
                 throw QueryException::iterateWithFetchJoinNotAllowed($assoc);
931 931
             }
@@ -945,12 +945,12 @@  discard block
 block discarded – undo
945 945
                     $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform);
946 946
 
947 947
                     if ($relation['isOwningSide']) {
948
-                        $conditions[] = $sourceTableAlias . '.' . $quotedSourceColumn . ' = ' . $targetTableAlias . '.' . $quotedTargetColumn;
948
+                        $conditions[] = $sourceTableAlias.'.'.$quotedSourceColumn.' = '.$targetTableAlias.'.'.$quotedTargetColumn;
949 949
 
950 950
                         continue;
951 951
                     }
952 952
 
953
-                    $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $targetTableAlias . '.' . $quotedSourceColumn;
953
+                    $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$targetTableAlias.'.'.$quotedSourceColumn;
954 954
                 }
955 955
 
956 956
                 // Apply remaining inheritance restrictions
@@ -968,7 +968,7 @@  discard block
 block discarded – undo
968 968
                 }
969 969
 
970 970
                 $targetTableJoin = array(
971
-                    'table' => $targetTableName . ' ' . $targetTableAlias,
971
+                    'table' => $targetTableName.' '.$targetTableAlias,
972 972
                     'condition' => implode(' AND ', $conditions),
973 973
                 );
974 974
                 break;
@@ -988,10 +988,10 @@  discard block
 block discarded – undo
988 988
                     $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform);
989 989
                     $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform);
990 990
 
991
-                    $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn;
991
+                    $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableAlias.'.'.$quotedSourceColumn;
992 992
                 }
993 993
 
994
-                $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions);
994
+                $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions);
995 995
 
996 996
                 // Join target table
997 997
                 $sql .= ($joinType == AST\Join::JOIN_TYPE_LEFT || $joinType == AST\Join::JOIN_TYPE_LEFTOUTER) ? ' LEFT JOIN ' : ' INNER JOIN ';
@@ -1005,7 +1005,7 @@  discard block
 block discarded – undo
1005 1005
                     $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform);
1006 1006
                     $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform);
1007 1007
 
1008
-                    $conditions[] = $targetTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn;
1008
+                    $conditions[] = $targetTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableAlias.'.'.$quotedSourceColumn;
1009 1009
                 }
1010 1010
 
1011 1011
                 // Apply remaining inheritance restrictions
@@ -1023,7 +1023,7 @@  discard block
 block discarded – undo
1023 1023
                 }
1024 1024
 
1025 1025
                 $targetTableJoin = array(
1026
-                    'table' => $targetTableName . ' ' . $targetTableAlias,
1026
+                    'table' => $targetTableName.' '.$targetTableAlias,
1027 1027
                     'condition' => implode(' AND ', $conditions),
1028 1028
                 );
1029 1029
                 break;
@@ -1033,22 +1033,22 @@  discard block
 block discarded – undo
1033 1033
         }
1034 1034
 
1035 1035
         // Handle WITH clause
1036
-        $withCondition = (null === $condExpr) ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')');
1036
+        $withCondition = (null === $condExpr) ? '' : ('('.$this->walkConditionalExpression($condExpr).')');
1037 1037
 
1038 1038
         if ($targetClass->isInheritanceTypeJoined()) {
1039 1039
             $ctiJoins = $this->_generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias);
1040 1040
             // If we have WITH condition, we need to build nested joins for target class table and cti joins
1041 1041
             if ($withCondition) {
1042
-                $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition'];
1042
+                $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition'];
1043 1043
             } else {
1044
-                $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins;
1044
+                $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins;
1045 1045
             }
1046 1046
         } else {
1047
-            $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'];
1047
+            $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'];
1048 1048
         }
1049 1049
 
1050 1050
         if ($withCondition) {
1051
-            $sql .= ' AND ' . $withCondition;
1051
+            $sql .= ' AND '.$withCondition;
1052 1052
         }
1053 1053
 
1054 1054
         // Apply the indexes
@@ -1081,7 +1081,7 @@  discard block
 block discarded – undo
1081 1081
             $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems);
1082 1082
         }
1083 1083
 
1084
-        return ' ORDER BY ' . implode(', ', $orderByItems);
1084
+        return ' ORDER BY '.implode(', ', $orderByItems);
1085 1085
     }
1086 1086
 
1087 1087
     /**
@@ -1098,10 +1098,10 @@  discard block
 block discarded – undo
1098 1098
         $this->orderedColumnsMap[$sql] = $type;
1099 1099
 
1100 1100
         if ($expr instanceof AST\Subselect) {
1101
-            return '(' . $sql . ') ' . $type;
1101
+            return '('.$sql.') '.$type;
1102 1102
         }
1103 1103
 
1104
-        return $sql . ' ' . $type;
1104
+        return $sql.' '.$type;
1105 1105
     }
1106 1106
 
1107 1107
     /**
@@ -1109,7 +1109,7 @@  discard block
 block discarded – undo
1109 1109
      */
1110 1110
     public function walkHavingClause($havingClause)
1111 1111
     {
1112
-        return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression);
1112
+        return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression);
1113 1113
     }
1114 1114
 
1115 1115
     /**
@@ -1132,7 +1132,7 @@  discard block
 block discarded – undo
1132 1132
                 $conditions = [];
1133 1133
 
1134 1134
                 if ($join->conditionalExpression) {
1135
-                    $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')';
1135
+                    $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')';
1136 1136
                 }
1137 1137
 
1138 1138
                 $condExprConjunction = ($class->isInheritanceTypeJoined() && $joinType != AST\Join::JOIN_TYPE_LEFT && $joinType != AST\Join::JOIN_TYPE_LEFTOUTER)
@@ -1156,7 +1156,7 @@  discard block
 block discarded – undo
1156 1156
                 }
1157 1157
 
1158 1158
                 if ($conditions) {
1159
-                    $sql .= $condExprConjunction . implode(' AND ', $conditions);
1159
+                    $sql .= $condExprConjunction.implode(' AND ', $conditions);
1160 1160
                 }
1161 1161
 
1162 1162
                 break;
@@ -1213,7 +1213,7 @@  discard block
 block discarded – undo
1213 1213
             $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression);
1214 1214
         }
1215 1215
 
1216
-        $sql .= implode(', ', $scalarExpressions) . ')';
1216
+        $sql .= implode(', ', $scalarExpressions).')';
1217 1217
 
1218 1218
         return $sql;
1219 1219
     }
@@ -1235,7 +1235,7 @@  discard block
 block discarded – undo
1235 1235
             ? $this->conn->quote($nullIfExpression->secondExpression)
1236 1236
             : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression);
1237 1237
 
1238
-        return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')';
1238
+        return 'NULLIF('.$firstExpression.', '.$secondExpression.')';
1239 1239
     }
1240 1240
 
1241 1241
     /**
@@ -1250,11 +1250,11 @@  discard block
 block discarded – undo
1250 1250
         $sql = 'CASE';
1251 1251
 
1252 1252
         foreach ($generalCaseExpression->whenClauses as $whenClause) {
1253
-            $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression);
1254
-            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
1253
+            $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression);
1254
+            $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
1255 1255
         }
1256 1256
 
1257
-        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END';
1257
+        $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END';
1258 1258
 
1259 1259
         return $sql;
1260 1260
     }
@@ -1268,14 +1268,14 @@  discard block
 block discarded – undo
1268 1268
      */
1269 1269
     public function walkSimpleCaseExpression($simpleCaseExpression)
1270 1270
     {
1271
-        $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
1271
+        $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
1272 1272
 
1273 1273
         foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) {
1274
-            $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
1275
-            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
1274
+            $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
1275
+            $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
1276 1276
         }
1277 1277
 
1278
-        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END';
1278
+        $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END';
1279 1279
 
1280 1280
         return $sql;
1281 1281
     }
@@ -1309,14 +1309,14 @@  discard block
 block discarded – undo
1309 1309
                 $fieldMapping  = $class->fieldMappings[$fieldName];
1310 1310
                 $columnName    = $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform);
1311 1311
                 $columnAlias   = $this->getSQLColumnAlias($fieldMapping['columnName']);
1312
-                $col           = $sqlTableAlias . '.' . $columnName;
1312
+                $col           = $sqlTableAlias.'.'.$columnName;
1313 1313
 
1314 1314
                 if (isset($fieldMapping['requireSQLConversion'])) {
1315 1315
                     $type = Type::getType($fieldMapping['type']);
1316 1316
                     $col  = $type->convertToPHPValueSQL($col, $this->conn->getDatabasePlatform());
1317 1317
                 }
1318 1318
 
1319
-                $sql .= $col . ' AS ' . $columnAlias;
1319
+                $sql .= $col.' AS '.$columnAlias;
1320 1320
 
1321 1321
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1322 1322
 
@@ -1341,7 +1341,7 @@  discard block
 block discarded – undo
1341 1341
                 $columnAlias = $this->getSQLColumnAlias('sclr');
1342 1342
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1343 1343
 
1344
-                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
1344
+                $sql .= $expr->dispatch($this).' AS '.$columnAlias;
1345 1345
 
1346 1346
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1347 1347
 
@@ -1355,7 +1355,7 @@  discard block
 block discarded – undo
1355 1355
                 $columnAlias = $this->getSQLColumnAlias('sclr');
1356 1356
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1357 1357
 
1358
-                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1358
+                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias;
1359 1359
 
1360 1360
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1361 1361
 
@@ -1366,7 +1366,7 @@  discard block
 block discarded – undo
1366 1366
                 break;
1367 1367
 
1368 1368
             case ($expr instanceof AST\NewObjectExpression):
1369
-                $sql .= $this->walkNewObject($expr,$selectExpression->fieldIdentificationVariable);
1369
+                $sql .= $this->walkNewObject($expr, $selectExpression->fieldIdentificationVariable);
1370 1370
                 break;
1371 1371
 
1372 1372
             default:
@@ -1407,14 +1407,14 @@  discard block
 block discarded – undo
1407 1407
                     $columnAlias      = $this->getSQLColumnAlias($mapping['columnName']);
1408 1408
                     $quotedColumnName = $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform);
1409 1409
 
1410
-                    $col = $sqlTableAlias . '.' . $quotedColumnName;
1410
+                    $col = $sqlTableAlias.'.'.$quotedColumnName;
1411 1411
 
1412 1412
                     if (isset($mapping['requireSQLConversion'])) {
1413 1413
                         $type = Type::getType($mapping['type']);
1414 1414
                         $col = $type->convertToPHPValueSQL($col, $this->platform);
1415 1415
                     }
1416 1416
 
1417
-                    $sqlParts[] = $col . ' AS '. $columnAlias;
1417
+                    $sqlParts[] = $col.' AS '.$columnAlias;
1418 1418
 
1419 1419
                     $this->scalarResultAliasMap[$resultAlias][] = $columnAlias;
1420 1420
 
@@ -1431,21 +1431,21 @@  discard block
 block discarded – undo
1431 1431
                         $sqlTableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias);
1432 1432
 
1433 1433
                         foreach ($subClass->fieldMappings as $fieldName => $mapping) {
1434
-                            if (isset($mapping['inherited']) || ($partialFieldSet && !in_array($fieldName, $partialFieldSet))) {
1434
+                            if (isset($mapping['inherited']) || ($partialFieldSet && ! in_array($fieldName, $partialFieldSet))) {
1435 1435
                                 continue;
1436 1436
                             }
1437 1437
 
1438 1438
                             $columnAlias      = $this->getSQLColumnAlias($mapping['columnName']);
1439 1439
                             $quotedColumnName = $this->quoteStrategy->getColumnName($fieldName, $subClass, $this->platform);
1440 1440
 
1441
-                            $col = $sqlTableAlias . '.' . $quotedColumnName;
1441
+                            $col = $sqlTableAlias.'.'.$quotedColumnName;
1442 1442
 
1443 1443
                             if (isset($mapping['requireSQLConversion'])) {
1444 1444
                                 $type = Type::getType($mapping['type']);
1445 1445
                                 $col = $type->convertToPHPValueSQL($col, $this->platform);
1446 1446
                             }
1447 1447
 
1448
-                            $sqlParts[] = $col . ' AS ' . $columnAlias;
1448
+                            $sqlParts[] = $col.' AS '.$columnAlias;
1449 1449
 
1450 1450
                             $this->scalarResultAliasMap[$resultAlias][] = $columnAlias;
1451 1451
 
@@ -1465,7 +1465,7 @@  discard block
 block discarded – undo
1465 1465
      */
1466 1466
     public function walkQuantifiedExpression($qExpr)
1467 1467
     {
1468
-        return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')';
1468
+        return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')';
1469 1469
     }
1470 1470
 
1471 1471
     /**
@@ -1499,13 +1499,13 @@  discard block
 block discarded – undo
1499 1499
     public function walkSubselectFromClause($subselectFromClause)
1500 1500
     {
1501 1501
         $identificationVarDecls = $subselectFromClause->identificationVariableDeclarations;
1502
-        $sqlParts               = array ();
1502
+        $sqlParts               = array();
1503 1503
 
1504 1504
         foreach ($identificationVarDecls as $subselectIdVarDecl) {
1505 1505
             $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl);
1506 1506
         }
1507 1507
 
1508
-        return ' FROM ' . implode(', ', $sqlParts);
1508
+        return ' FROM '.implode(', ', $sqlParts);
1509 1509
     }
1510 1510
 
1511 1511
     /**
@@ -1513,7 +1513,7 @@  discard block
 block discarded – undo
1513 1513
      */
1514 1514
     public function walkSimpleSelectClause($simpleSelectClause)
1515 1515
     {
1516
-        return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '')
1516
+        return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '')
1517 1517
             . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression);
1518 1518
     }
1519 1519
 
@@ -1532,10 +1532,10 @@  discard block
 block discarded – undo
1532 1532
      *
1533 1533
      * @return string The SQL.
1534 1534
      */
1535
-    public function walkNewObject($newObjectExpression, $newObjectResultAlias=null)
1535
+    public function walkNewObject($newObjectExpression, $newObjectResultAlias = null)
1536 1536
     {
1537 1537
         $sqlSelectExpressions = array();
1538
-        $objIndex             = $newObjectResultAlias?:$this->newObjectCounter++;
1538
+        $objIndex             = $newObjectResultAlias ?: $this->newObjectCounter++;
1539 1539
 
1540 1540
         foreach ($newObjectExpression->args as $argIndex => $e) {
1541 1541
             $resultAlias = $this->scalarResultCounter++;
@@ -1548,7 +1548,7 @@  discard block
 block discarded – undo
1548 1548
                     break;
1549 1549
 
1550 1550
                 case ($e instanceof AST\Subselect):
1551
-                    $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias;
1551
+                    $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias;
1552 1552
                     break;
1553 1553
 
1554 1554
                 case ($e instanceof AST\PathExpression):
@@ -1557,7 +1557,7 @@  discard block
 block discarded – undo
1557 1557
                     $class     = $qComp['metadata'];
1558 1558
                     $fieldType = $class->fieldMappings[$e->field]['type'];
1559 1559
 
1560
-                    $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias;
1560
+                    $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias;
1561 1561
                     break;
1562 1562
 
1563 1563
                 case ($e instanceof AST\Literal):
@@ -1571,11 +1571,11 @@  discard block
 block discarded – undo
1571 1571
                             break;
1572 1572
                     }
1573 1573
 
1574
-                    $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias;
1574
+                    $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias;
1575 1575
                     break;
1576 1576
 
1577 1577
                 default:
1578
-                    $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias;
1578
+                    $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias;
1579 1579
                     break;
1580 1580
             }
1581 1581
 
@@ -1608,16 +1608,16 @@  discard block
 block discarded – undo
1608 1608
             case ($expr instanceof AST\AggregateExpression):
1609 1609
                 $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1610 1610
 
1611
-                $sql .= $this->walkAggregateExpression($expr) . ' AS dctrn__' . $alias;
1611
+                $sql .= $this->walkAggregateExpression($expr).' AS dctrn__'.$alias;
1612 1612
                 break;
1613 1613
 
1614 1614
             case ($expr instanceof AST\Subselect):
1615 1615
                 $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1616 1616
 
1617
-                $columnAlias = 'sclr' . $this->aliasCounter++;
1617
+                $columnAlias = 'sclr'.$this->aliasCounter++;
1618 1618
                 $this->scalarResultAliasMap[$alias] = $columnAlias;
1619 1619
 
1620
-                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1620
+                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias;
1621 1621
                 break;
1622 1622
 
1623 1623
             case ($expr instanceof AST\Functions\FunctionNode):
@@ -1634,7 +1634,7 @@  discard block
 block discarded – undo
1634 1634
                 $columnAlias = $this->getSQLColumnAlias('sclr');
1635 1635
                 $this->scalarResultAliasMap[$alias] = $columnAlias;
1636 1636
 
1637
-                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
1637
+                $sql .= $expr->dispatch($this).' AS '.$columnAlias;
1638 1638
                 break;
1639 1639
 
1640 1640
             case ($expr instanceof AST\ParenthesisExpression):
@@ -1654,8 +1654,8 @@  discard block
 block discarded – undo
1654 1654
      */
1655 1655
     public function walkAggregateExpression($aggExpression)
1656 1656
     {
1657
-        return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '')
1658
-            . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')';
1657
+        return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '')
1658
+            . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')';
1659 1659
     }
1660 1660
 
1661 1661
     /**
@@ -1669,7 +1669,7 @@  discard block
 block discarded – undo
1669 1669
             $sqlParts[] = $this->walkGroupByItem($groupByItem);
1670 1670
         }
1671 1671
 
1672
-        return ' GROUP BY ' . implode(', ', $sqlParts);
1672
+        return ' GROUP BY '.implode(', ', $sqlParts);
1673 1673
     }
1674 1674
 
1675 1675
     /**
@@ -1726,7 +1726,7 @@  discard block
 block discarded – undo
1726 1726
     {
1727 1727
         $class     = $this->em->getClassMetadata($deleteClause->abstractSchemaName);
1728 1728
         $tableName = $class->getTableName();
1729
-        $sql       = 'DELETE FROM ' . $this->quoteStrategy->getTableName($class, $this->platform);
1729
+        $sql       = 'DELETE FROM '.$this->quoteStrategy->getTableName($class, $this->platform);
1730 1730
 
1731 1731
         $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable);
1732 1732
         $this->rootAliases[] = $deleteClause->aliasIdentificationVariable;
@@ -1741,12 +1741,12 @@  discard block
 block discarded – undo
1741 1741
     {
1742 1742
         $class     = $this->em->getClassMetadata($updateClause->abstractSchemaName);
1743 1743
         $tableName = $class->getTableName();
1744
-        $sql       = 'UPDATE ' . $this->quoteStrategy->getTableName($class, $this->platform);
1744
+        $sql       = 'UPDATE '.$this->quoteStrategy->getTableName($class, $this->platform);
1745 1745
 
1746 1746
         $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable);
1747 1747
         $this->rootAliases[] = $updateClause->aliasIdentificationVariable;
1748 1748
 
1749
-        $sql .= ' SET ' . implode(', ', array_map(array($this, 'walkUpdateItem'), $updateClause->updateItems));
1749
+        $sql .= ' SET '.implode(', ', array_map(array($this, 'walkUpdateItem'), $updateClause->updateItems));
1750 1750
 
1751 1751
         return $sql;
1752 1752
     }
@@ -1759,7 +1759,7 @@  discard block
 block discarded – undo
1759 1759
         $useTableAliasesBefore = $this->useSqlTableAliases;
1760 1760
         $this->useSqlTableAliases = false;
1761 1761
 
1762
-        $sql      = $this->walkPathExpression($updateItem->pathExpression) . ' = ';
1762
+        $sql      = $this->walkPathExpression($updateItem->pathExpression).' = ';
1763 1763
         $newValue = $updateItem->newValue;
1764 1764
 
1765 1765
         switch (true) {
@@ -1802,7 +1802,7 @@  discard block
 block discarded – undo
1802 1802
 
1803 1803
             if (count($filterClauses)) {
1804 1804
                 if ($condSql) {
1805
-                    $condSql = '(' . $condSql . ') AND ';
1805
+                    $condSql = '('.$condSql.') AND ';
1806 1806
                 }
1807 1807
 
1808 1808
                 $condSql .= implode(' AND ', $filterClauses);
@@ -1810,11 +1810,11 @@  discard block
 block discarded – undo
1810 1810
         }
1811 1811
 
1812 1812
         if ($condSql) {
1813
-            return ' WHERE ' . (( ! $discrSql) ? $condSql : '(' . $condSql . ') AND ' . $discrSql);
1813
+            return ' WHERE '.(( ! $discrSql) ? $condSql : '('.$condSql.') AND '.$discrSql);
1814 1814
         }
1815 1815
 
1816 1816
         if ($discrSql) {
1817
-            return ' WHERE ' . $discrSql;
1817
+            return ' WHERE '.$discrSql;
1818 1818
         }
1819 1819
 
1820 1820
         return '';
@@ -1857,7 +1857,7 @@  discard block
 block discarded – undo
1857 1857
         // if only one ConditionalPrimary is defined
1858 1858
         return ( ! ($factor instanceof AST\ConditionalFactor))
1859 1859
             ? $this->walkConditionalPrimary($factor)
1860
-            : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary);
1860
+            : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary);
1861 1861
     }
1862 1862
 
1863 1863
     /**
@@ -1872,7 +1872,7 @@  discard block
 block discarded – undo
1872 1872
         if ($primary->isConditionalExpression()) {
1873 1873
             $condExpr = $primary->conditionalExpression;
1874 1874
 
1875
-            return '(' . $this->walkConditionalExpression($condExpr) . ')';
1875
+            return '('.$this->walkConditionalExpression($condExpr).')';
1876 1876
         }
1877 1877
     }
1878 1878
 
@@ -1883,7 +1883,7 @@  discard block
 block discarded – undo
1883 1883
     {
1884 1884
         $sql = ($existsExpr->not) ? 'NOT ' : '';
1885 1885
 
1886
-        $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')';
1886
+        $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')';
1887 1887
 
1888 1888
         return $sql;
1889 1889
     }
@@ -1927,7 +1927,7 @@  discard block
 block discarded – undo
1927 1927
             $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName());
1928 1928
             $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
1929 1929
 
1930
-            $sql .= $this->quoteStrategy->getTableName($targetClass, $this->platform) . ' ' . $targetTableAlias . ' WHERE ';
1930
+            $sql .= $this->quoteStrategy->getTableName($targetClass, $this->platform).' '.$targetTableAlias.' WHERE ';
1931 1931
 
1932 1932
             $owningAssoc = $targetClass->associationMappings[$assoc['mappedBy']];
1933 1933
             $sqlParts    = array();
@@ -1935,7 +1935,7 @@  discard block
 block discarded – undo
1935 1935
             foreach ($owningAssoc['targetToSourceKeyColumns'] as $targetColumn => $sourceColumn) {
1936 1936
                 $targetColumn = $this->quoteStrategy->getColumnName($class->fieldNames[$targetColumn], $class, $this->platform);
1937 1937
 
1938
-                $sqlParts[] = $sourceTableAlias . '.' . $targetColumn . ' = ' . $targetTableAlias . '.' . $sourceColumn;
1938
+                $sqlParts[] = $sourceTableAlias.'.'.$targetColumn.' = '.$targetTableAlias.'.'.$sourceColumn;
1939 1939
             }
1940 1940
 
1941 1941
             foreach ($this->quoteStrategy->getIdentifierColumnNames($targetClass, $this->platform) as $targetColumnName) {
@@ -1943,7 +1943,7 @@  discard block
 block discarded – undo
1943 1943
                     $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++);
1944 1944
                 }
1945 1945
 
1946
-                $sqlParts[] = $targetTableAlias . '.'  . $targetColumnName . ' = ' . $entitySql;
1946
+                $sqlParts[] = $targetTableAlias.'.'.$targetColumnName.' = '.$entitySql;
1947 1947
             }
1948 1948
 
1949 1949
             $sql .= implode(' AND ', $sqlParts);
@@ -1959,8 +1959,8 @@  discard block
 block discarded – undo
1959 1959
             $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
1960 1960
 
1961 1961
             // join to target table
1962
-            $sql .= $this->quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $this->platform) . ' ' . $joinTableAlias
1963
-                . ' INNER JOIN ' . $this->quoteStrategy->getTableName($targetClass, $this->platform) . ' ' . $targetTableAlias . ' ON ';
1962
+            $sql .= $this->quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $this->platform).' '.$joinTableAlias
1963
+                . ' INNER JOIN '.$this->quoteStrategy->getTableName($targetClass, $this->platform).' '.$targetTableAlias.' ON ';
1964 1964
 
1965 1965
             // join conditions
1966 1966
             $joinColumns  = $assoc['isOwningSide'] ? $joinTable['inverseJoinColumns'] : $joinTable['joinColumns'];
@@ -1969,7 +1969,7 @@  discard block
 block discarded – undo
1969 1969
             foreach ($joinColumns as $joinColumn) {
1970 1970
                 $targetColumn = $this->quoteStrategy->getColumnName($targetClass->fieldNames[$joinColumn['referencedColumnName']], $targetClass, $this->platform);
1971 1971
 
1972
-                $joinSqlParts[] = $joinTableAlias . '.' . $joinColumn['name'] . ' = ' . $targetTableAlias . '.' . $targetColumn;
1972
+                $joinSqlParts[] = $joinTableAlias.'.'.$joinColumn['name'].' = '.$targetTableAlias.'.'.$targetColumn;
1973 1973
             }
1974 1974
 
1975 1975
             $sql .= implode(' AND ', $joinSqlParts);
@@ -1981,7 +1981,7 @@  discard block
 block discarded – undo
1981 1981
             foreach ($joinColumns as $joinColumn) {
1982 1982
                 $targetColumn = $this->quoteStrategy->getColumnName($class->fieldNames[$joinColumn['referencedColumnName']], $class, $this->platform);
1983 1983
 
1984
-                $sqlParts[] = $joinTableAlias . '.' . $joinColumn['name'] . ' = ' . $sourceTableAlias . '.' . $targetColumn;
1984
+                $sqlParts[] = $joinTableAlias.'.'.$joinColumn['name'].' = '.$sourceTableAlias.'.'.$targetColumn;
1985 1985
             }
1986 1986
 
1987 1987
             foreach ($this->quoteStrategy->getIdentifierColumnNames($targetClass, $this->platform) as $targetColumnName) {
@@ -1989,13 +1989,13 @@  discard block
 block discarded – undo
1989 1989
                     $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++);
1990 1990
                 }
1991 1991
 
1992
-                $sqlParts[] = $targetTableAlias . '.' . $targetColumnName . ' IN (' . $entitySql . ')';
1992
+                $sqlParts[] = $targetTableAlias.'.'.$targetColumnName.' IN ('.$entitySql.')';
1993 1993
             }
1994 1994
 
1995 1995
             $sql .= implode(' AND ', $sqlParts);
1996 1996
         }
1997 1997
 
1998
-        return $sql . ')';
1998
+        return $sql.')';
1999 1999
     }
2000 2000
 
2001 2001
     /**
@@ -2006,7 +2006,7 @@  discard block
 block discarded – undo
2006 2006
         $sizeFunc = new AST\Functions\SizeFunction('size');
2007 2007
         $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression;
2008 2008
 
2009
-        return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0');
2009
+        return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0');
2010 2010
     }
2011 2011
 
2012 2012
     /**
@@ -2015,19 +2015,19 @@  discard block
 block discarded – undo
2015 2015
     public function walkNullComparisonExpression($nullCompExpr)
2016 2016
     {
2017 2017
         $expression = $nullCompExpr->expression;
2018
-        $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL';
2018
+        $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL';
2019 2019
 
2020 2020
         // Handle ResultVariable
2021 2021
         if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) {
2022
-            return $this->walkResultVariable($expression) . $comparison;
2022
+            return $this->walkResultVariable($expression).$comparison;
2023 2023
         }
2024 2024
 
2025 2025
         // Handle InputParameter mapping inclusion to ParserResult
2026 2026
         if ($expression instanceof AST\InputParameter) {
2027
-            return $this->walkInputParameter($expression) . $comparison;
2027
+            return $this->walkInputParameter($expression).$comparison;
2028 2028
         }
2029 2029
 
2030
-        return $expression->dispatch($this) . $comparison;
2030
+        return $expression->dispatch($this).$comparison;
2031 2031
     }
2032 2032
 
2033 2033
     /**
@@ -2035,7 +2035,7 @@  discard block
 block discarded – undo
2035 2035
      */
2036 2036
     public function walkInExpression($inExpr)
2037 2037
     {
2038
-        $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN (';
2038
+        $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN (';
2039 2039
 
2040 2040
         $sql .= ($inExpr->subselect)
2041 2041
             ? $this->walkSubselect($inExpr->subselect)
@@ -2061,10 +2061,10 @@  discard block
 block discarded – undo
2061 2061
         }
2062 2062
 
2063 2063
         if ($this->useSqlTableAliases) {
2064
-            $sql .= $this->getSQLTableAlias($discrClass->getTableName(), $dqlAlias) . '.';
2064
+            $sql .= $this->getSQLTableAlias($discrClass->getTableName(), $dqlAlias).'.';
2065 2065
         }
2066 2066
 
2067
-        $sql .= $class->discriminatorColumn['name'] . ($instanceOfExpr->not ? ' NOT IN ' : ' IN ');
2067
+        $sql .= $class->discriminatorColumn['name'].($instanceOfExpr->not ? ' NOT IN ' : ' IN ');
2068 2068
 
2069 2069
         $sqlParameterList = array();
2070 2070
 
@@ -2094,7 +2094,7 @@  discard block
 block discarded – undo
2094 2094
             $sqlParameterList[] = $this->conn->quote($discriminatorValue);
2095 2095
         }
2096 2096
 
2097
-        $sql .= '(' . implode(', ', $sqlParameterList) . ')';
2097
+        $sql .= '('.implode(', ', $sqlParameterList).')';
2098 2098
 
2099 2099
         return $sql;
2100 2100
     }
@@ -2143,8 +2143,8 @@  discard block
 block discarded – undo
2143 2143
             $sql .= ' NOT';
2144 2144
         }
2145 2145
 
2146
-        $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression)
2147
-            . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression);
2146
+        $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression)
2147
+            . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression);
2148 2148
 
2149 2149
         return $sql;
2150 2150
     }
@@ -2159,7 +2159,7 @@  discard block
 block discarded – undo
2159 2159
             ? $this->walkResultVariable($stringExpr)
2160 2160
             : $stringExpr->dispatch($this);
2161 2161
 
2162
-        $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE ';
2162
+        $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE ';
2163 2163
 
2164 2164
         if ($likeExpr->stringPattern instanceof AST\InputParameter) {
2165 2165
             $sql .= $this->walkInputParameter($likeExpr->stringPattern);
@@ -2172,7 +2172,7 @@  discard block
 block discarded – undo
2172 2172
         }
2173 2173
 
2174 2174
         if ($likeExpr->escapeChar) {
2175
-            $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar);
2175
+            $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar);
2176 2176
         }
2177 2177
 
2178 2178
         return $sql;
@@ -2199,7 +2199,7 @@  discard block
 block discarded – undo
2199 2199
             ? $leftExpr->dispatch($this)
2200 2200
             : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr));
2201 2201
 
2202
-        $sql .= ' ' . $compExpr->operator . ' ';
2202
+        $sql .= ' '.$compExpr->operator.' ';
2203 2203
 
2204 2204
         $sql .= ($rightExpr instanceof AST\Node)
2205 2205
             ? $rightExpr->dispatch($this)
@@ -2231,7 +2231,7 @@  discard block
 block discarded – undo
2231 2231
     {
2232 2232
         return ($arithmeticExpr->isSimpleArithmeticExpression())
2233 2233
             ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression)
2234
-            : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')';
2234
+            : '('.$this->walkSubselect($arithmeticExpr->subselect).')';
2235 2235
     }
2236 2236
 
2237 2237
     /**
@@ -2283,7 +2283,7 @@  discard block
 block discarded – undo
2283 2283
 
2284 2284
         $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : '');
2285 2285
 
2286
-        return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary);
2286
+        return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary);
2287 2287
     }
2288 2288
 
2289 2289
     /**
@@ -2296,7 +2296,7 @@  discard block
 block discarded – undo
2296 2296
     public function walkArithmeticPrimary($primary)
2297 2297
     {
2298 2298
         if ($primary instanceof AST\SimpleArithmeticExpression) {
2299
-            return '(' . $this->walkSimpleArithmeticExpression($primary) . ')';
2299
+            return '('.$this->walkSimpleArithmeticExpression($primary).')';
2300 2300
         }
2301 2301
 
2302 2302
         if ($primary instanceof AST\Node) {
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 = array();
@@ -783,7 +785,9 @@  discard block
 block discarded – undo
783 785
 
784 786
                 foreach ($subClass->associationMappings as $assoc) {
785 787
                     // Skip if association is inherited
786
-                    if (isset($assoc['inherited'])) continue;
788
+                    if (isset($assoc['inherited'])) {
789
+                        continue;
790
+                    }
787 791
 
788 792
                     if ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) {
789 793
                         $targetClass = $this->em->getClassMetadata($assoc['targetEntity']);
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.
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 = array();
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;
@@ -1372,10 +1372,10 @@  discard block
 block discarded – undo
1372 1372
      */
1373 1373
     private function _getDQLForDelete()
1374 1374
     {
1375
-         return 'DELETE'
1376
-              . $this->_getReducedDQLQueryPart('from', array('pre' => ' ', 'separator' => ', '))
1377
-              . $this->_getReducedDQLQueryPart('where', array('pre' => ' WHERE '))
1378
-              . $this->_getReducedDQLQueryPart('orderBy', array('pre' => ' ORDER BY ', 'separator' => ', '));
1375
+            return 'DELETE'
1376
+                . $this->_getReducedDQLQueryPart('from', array('pre' => ' ', 'separator' => ', '))
1377
+                . $this->_getReducedDQLQueryPart('where', array('pre' => ' WHERE '))
1378
+                . $this->_getReducedDQLQueryPart('orderBy', array('pre' => ' ORDER BY ', 'separator' => ', '));
1379 1379
     }
1380 1380
 
1381 1381
     /**
@@ -1383,11 +1383,11 @@  discard block
 block discarded – undo
1383 1383
      */
1384 1384
     private function _getDQLForUpdate()
1385 1385
     {
1386
-         return 'UPDATE'
1387
-              . $this->_getReducedDQLQueryPart('from', array('pre' => ' ', 'separator' => ', '))
1388
-              . $this->_getReducedDQLQueryPart('set', array('pre' => ' SET ', 'separator' => ', '))
1389
-              . $this->_getReducedDQLQueryPart('where', array('pre' => ' WHERE '))
1390
-              . $this->_getReducedDQLQueryPart('orderBy', array('pre' => ' ORDER BY ', 'separator' => ', '));
1386
+            return 'UPDATE'
1387
+                . $this->_getReducedDQLQueryPart('from', array('pre' => ' ', 'separator' => ', '))
1388
+                . $this->_getReducedDQLQueryPart('set', array('pre' => ' SET ', 'separator' => ', '))
1389
+                . $this->_getReducedDQLQueryPart('where', array('pre' => ' WHERE '))
1390
+                . $this->_getReducedDQLQueryPart('orderBy', array('pre' => ' ORDER BY ', 'separator' => ', '));
1391 1391
     }
1392 1392
 
1393 1393
     /**
@@ -1396,8 +1396,8 @@  discard block
 block discarded – undo
1396 1396
     private function _getDQLForSelect()
1397 1397
     {
1398 1398
         $dql = 'SELECT'
1399
-             . ($this->_dqlParts['distinct']===true ? ' DISTINCT' : '')
1400
-             . $this->_getReducedDQLQueryPart('select', array('pre' => ' ', 'separator' => ', '));
1399
+                . ($this->_dqlParts['distinct']===true ? ' DISTINCT' : '')
1400
+                . $this->_getReducedDQLQueryPart('select', array('pre' => ' ', 'separator' => ', '));
1401 1401
 
1402 1402
         $fromParts   = $this->getDQLPart('from');
1403 1403
         $joinParts   = $this->getDQLPart('join');
@@ -1421,10 +1421,10 @@  discard block
 block discarded – undo
1421 1421
         }
1422 1422
 
1423 1423
         $dql .= implode(', ', $fromClauses)
1424
-              . $this->_getReducedDQLQueryPart('where', array('pre' => ' WHERE '))
1425
-              . $this->_getReducedDQLQueryPart('groupBy', array('pre' => ' GROUP BY ', 'separator' => ', '))
1426
-              . $this->_getReducedDQLQueryPart('having', array('pre' => ' HAVING '))
1427
-              . $this->_getReducedDQLQueryPart('orderBy', array('pre' => ' ORDER BY ', 'separator' => ', '));
1424
+                . $this->_getReducedDQLQueryPart('where', array('pre' => ' WHERE '))
1425
+                . $this->_getReducedDQLQueryPart('groupBy', array('pre' => ' GROUP BY ', 'separator' => ', '))
1426
+                . $this->_getReducedDQLQueryPart('having', array('pre' => ' HAVING '))
1427
+                . $this->_getReducedDQLQueryPart('orderBy', array('pre' => ' ORDER BY ', 'separator' => ', '));
1428 1428
 
1429 1429
         return $dql;
1430 1430
     }
@@ -1444,8 +1444,8 @@  discard block
 block discarded – undo
1444 1444
         }
1445 1445
 
1446 1446
         return (isset($options['pre']) ? $options['pre'] : '')
1447
-             . (is_array($queryPart) ? implode($options['separator'], $queryPart) : $queryPart)
1448
-             . (isset($options['post']) ? $options['post'] : '');
1447
+                . (is_array($queryPart) ? implode($options['separator'], $queryPart) : $queryPart)
1448
+                . (isset($options['post']) ? $options['post'] : '');
1449 1449
     }
1450 1450
 
1451 1451
     /**
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
      * @return array
477 477
      */
478 478
     public function getAllAliases() {
479
-        return array_merge($this->getRootAliases(),array_keys($this->joinRootAliases));
479
+        return array_merge($this->getRootAliases(), array_keys($this->joinRootAliases));
480 480
     }
481 481
 
482 482
     /**
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
     public function setParameter($key, $value, $type = null)
533 533
     {
534 534
         $filteredParameters = $this->parameters->filter(
535
-            function ($parameter) use ($key)
535
+            function($parameter) use ($key)
536 536
             {
537 537
                 /* @var Query\Parameter $parameter */
538 538
                 // Must not be identical because of string to integer conversion
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
     public function getParameter($key)
614 614
     {
615 615
         $filteredParameters = $this->parameters->filter(
616
-            function ($parameter) use ($key)
616
+            function($parameter) use ($key)
617 617
             {
618 618
                 /* @var Query\Parameter $parameter */
619 619
                 // Must not be identical because of string to integer conversion
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
         }
697 697
 
698 698
         $isMultiple = is_array($this->_dqlParts[$dqlPartName])
699
-            && !($dqlPartName == 'join' && !$append);
699
+            && ! ($dqlPartName == 'join' && ! $append);
700 700
 
701 701
         // Allow adding any part retrieved from self::getDQLParts().
702 702
         if (is_array($dqlPart) && $dqlPartName != 'join') {
@@ -913,7 +913,7 @@  discard block
 block discarded – undo
913 913
     {
914 914
         $rootAliases = $this->getRootAliases();
915 915
 
916
-        if (!in_array($alias, $rootAliases)) {
916
+        if ( ! in_array($alias, $rootAliases)) {
917 917
             throw new Query\QueryException(
918 918
                 sprintf('Specified root alias %s must be set before invoking indexBy().', $alias)
919 919
             );
@@ -1315,15 +1315,15 @@  discard block
 block discarded – undo
1315 1315
             foreach ($criteria->getOrderings() as $sort => $order) {
1316 1316
 
1317 1317
                 $hasValidAlias = false;
1318
-                foreach($allAliases as $alias) {
1319
-                    if(strpos($sort . '.', $alias . '.') === 0) {
1318
+                foreach ($allAliases as $alias) {
1319
+                    if (strpos($sort.'.', $alias.'.') === 0) {
1320 1320
                         $hasValidAlias = true;
1321 1321
                         break;
1322 1322
                     }
1323 1323
                 }
1324 1324
 
1325
-                if(!$hasValidAlias) {
1326
-                    $sort = $allAliases[0] . '.' . $sort;
1325
+                if ( ! $hasValidAlias) {
1326
+                    $sort = $allAliases[0].'.'.$sort;
1327 1327
                 }
1328 1328
 
1329 1329
                 $this->addOrderBy($sort, $order);
@@ -1396,7 +1396,7 @@  discard block
 block discarded – undo
1396 1396
     private function _getDQLForSelect()
1397 1397
     {
1398 1398
         $dql = 'SELECT'
1399
-             . ($this->_dqlParts['distinct']===true ? ' DISTINCT' : '')
1399
+             . ($this->_dqlParts['distinct'] === true ? ' DISTINCT' : '')
1400 1400
              . $this->_getReducedDQLQueryPart('select', array('pre' => ' ', 'separator' => ', '));
1401 1401
 
1402 1402
         $fromParts   = $this->getDQLPart('from');
@@ -1412,7 +1412,7 @@  discard block
 block discarded – undo
1412 1412
 
1413 1413
                 if ($from instanceof Expr\From && isset($joinParts[$from->getAlias()])) {
1414 1414
                     foreach ($joinParts[$from->getAlias()] as $join) {
1415
-                        $fromClause .= ' ' . ((string) $join);
1415
+                        $fromClause .= ' '.((string) $join);
1416 1416
                     }
1417 1417
                 }
1418 1418
 
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.
lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryOutputWalker.php 3 patches
Unused Use Statements   -9 removed lines patch added patch discarded remove patch
@@ -18,18 +18,9 @@
 block discarded – undo
18 18
 use Doctrine\DBAL\Platforms\PostgreSqlPlatform;
19 19
 use Doctrine\DBAL\Platforms\SQLAnywherePlatform;
20 20
 use Doctrine\DBAL\Platforms\SQLServerPlatform;
21
-use Doctrine\ORM\Query\AST\ArithmeticExpression;
22
-use Doctrine\ORM\Query\AST\ArithmeticFactor;
23
-use Doctrine\ORM\Query\AST\ArithmeticTerm;
24
-use Doctrine\ORM\Query\AST\Literal;
25 21
 use Doctrine\ORM\Query\AST\OrderByClause;
26
-use Doctrine\ORM\Query\AST\OrderByItem;
27 22
 use Doctrine\ORM\Query\AST\PartialObjectExpression;
28
-use Doctrine\ORM\Query\AST\PathExpression;
29 23
 use Doctrine\ORM\Query\AST\SelectExpression;
30
-use Doctrine\ORM\Query\AST\SimpleArithmeticExpression;
31
-use Doctrine\ORM\Query\Expr\OrderBy;
32
-use Doctrine\ORM\Query\Expr\Select;
33 24
 use Doctrine\ORM\Query\SqlWalker;
34 25
 use Doctrine\ORM\Query\AST\SelectStatement;
35 26
 
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -209,8 +209,8 @@  discard block
 block discarded – undo
209 209
         $sqlIdentifier = $this->getSQLIdentifier($AST);
210 210
 
211 211
         if ($hasOrderBy) {
212
-            $orderGroupBy = ' GROUP BY ' . implode(', ', $sqlIdentifier);
213
-            $sqlIdentifier[] = 'MIN(' . $this->walkResultVariable('dctrn_rownum') . ') AS dctrn_minrownum';
212
+            $orderGroupBy = ' GROUP BY '.implode(', ', $sqlIdentifier);
213
+            $sqlIdentifier[] = 'MIN('.$this->walkResultVariable('dctrn_rownum').') AS dctrn_minrownum';
214 214
         }
215 215
 
216 216
         // Build the counter query
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
         );
222 222
 
223 223
         if ($hasOrderBy) {
224
-            $sql .= $orderGroupBy . $outerOrderBy;
224
+            $sql .= $orderGroupBy.$outerOrderBy;
225 225
         }
226 226
 
227 227
         // Apply the limit and offset.
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
         foreach ($orderByPathExpressions as $pathExpression) {
325 325
             $idVar = $pathExpression->identificationVariable;
326 326
             $field = $pathExpression->field;
327
-            if (!isset($selects[$idVar])) {
327
+            if ( ! isset($selects[$idVar])) {
328 328
                 $selects[$idVar] = [];
329 329
             }
330 330
             $selects[$idVar][$field] = true;
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
         foreach ($AST->selectClause->selectExpressions as $selectExpression) {
336 336
             if ($selectExpression instanceof SelectExpression) {
337 337
                 $idVar = $selectExpression->expression;
338
-                if (!is_string($idVar)) {
338
+                if ( ! is_string($idVar)) {
339 339
                     continue;
340 340
                 }
341 341
                 $field = $selectExpression->fieldIdentificationVariable;
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
     {
369 369
         // If the sql statement has an order by clause, we need to wrap it in a new select distinct
370 370
         // statement
371
-        if (! $orderByClause instanceof OrderByClause) {
371
+        if ( ! $orderByClause instanceof OrderByClause) {
372 372
             return $sql;
373 373
         }
374 374
 
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
             = [];
405 405
 
406 406
         // Generate DQL alias -> SQL table alias mapping
407
-        foreach(array_keys($this->rsm->aliasMap) as $dqlAlias) {
407
+        foreach (array_keys($this->rsm->aliasMap) as $dqlAlias) {
408 408
             $dqlAliasToClassMap[$dqlAlias] = $class = $this->queryComponents[$dqlAlias]['metadata'];
409 409
             $dqlAliasToSqlTableAliasMap[$dqlAlias] = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
410 410
         }
@@ -413,13 +413,13 @@  discard block
 block discarded – undo
413 413
         $fieldSearchPattern = '/(?<![a-z0-9_])%s\.%s(?![a-z0-9_])/i';
414 414
 
415 415
         // Generate search patterns for each field's path expression in the order by clause
416
-        foreach($this->rsm->fieldMappings as $fieldAlias => $fieldName) {
416
+        foreach ($this->rsm->fieldMappings as $fieldAlias => $fieldName) {
417 417
             $dqlAliasForFieldAlias = $this->rsm->columnOwnerMap[$fieldAlias];
418 418
             $class = $dqlAliasToClassMap[$dqlAliasForFieldAlias];
419 419
 
420 420
             // If the field is from a joined child table, we won't be ordering
421 421
             // on it.
422
-            if (!isset($class->fieldMappings[$fieldName])) {
422
+            if ( ! isset($class->fieldMappings[$fieldName])) {
423 423
                 continue;
424 424
             }
425 425
 
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
                 // Field was declared in a parent class, so we need to get the proper SQL table alias
439 439
                 // for the joined parent table.
440 440
                 $otherClassMetadata = $this->em->getClassMetadata($fieldMapping['declared']);
441
-                if (!$otherClassMetadata->isMappedSuperclass) {
441
+                if ( ! $otherClassMetadata->isMappedSuperclass) {
442 442
                     $sqlTableAliasForFieldAlias = $this->getSQLTableAlias($otherClassMetadata->getTableName(), $dqlAliasForFieldAlias);
443 443
                 }
444 444
             }
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
             $replacements[] = $fieldAlias;
449 449
         }
450 450
 
451
-        foreach($orderByClause->orderByItems as $orderByItem) {
451
+        foreach ($orderByClause->orderByItems as $orderByItem) {
452 452
             // Walk order by item to get string representation of it
453 453
             $orderByItemString = $this->walkOrderByItem($orderByItem);
454 454
 
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
      */
566 566
     public function walkPathExpression($pathExpr)
567 567
     {
568
-        if (!$this->inSubSelect && !$this->platformSupportsRowNumber() && !in_array($pathExpr, $this->orderByPathExpressions)) {
568
+        if ( ! $this->inSubSelect && ! $this->platformSupportsRowNumber() && ! in_array($pathExpr, $this->orderByPathExpressions)) {
569 569
             $this->orderByPathExpressions[] = $pathExpr;
570 570
         }
571 571
 
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Doctrine ORM
4
- *
5
- * LICENSE
6
- *
7
- * This source file is subject to the new BSD license that is bundled
8
- * with this package in the file LICENSE.txt.
9
- * If you did not receive a copy of the license and are unable to
10
- * obtain it through the world-wide-web, please send an email
11
- * to [email protected] so I can send you a copy immediately.
12
- */
3
+     * Doctrine ORM
4
+     *
5
+     * LICENSE
6
+     *
7
+     * This source file is subject to the new BSD license that is bundled
8
+     * with this package in the file LICENSE.txt.
9
+     * If you did not receive a copy of the license and are unable to
10
+     * obtain it through the world-wide-web, please send an email
11
+     * to [email protected] so I can send you a copy immediately.
12
+     */
13 13
 
14 14
 namespace Doctrine\ORM\Tools\Pagination;
15 15
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryWalker.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,6 @@
 block discarded – undo
20 20
 
21 21
 use Doctrine\DBAL\Types\Type;
22 22
 use Doctrine\ORM\Mapping\ClassMetadataInfo;
23
-use Doctrine\ORM\ORMException;
24 23
 use Doctrine\ORM\Query;
25 24
 use Doctrine\ORM\Query\TreeWalkerAdapter;
26 25
 use Doctrine\ORM\Query\AST\Functions\IdentityFunction;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
                 
113 113
                 $AST->selectClause->selectExpressions[] = new SelectExpression(
114 114
                     $this->createSelectExpressionItem($item->expression),
115
-                    '_dctrn_ord' . $this->_aliasCounter++
115
+                    '_dctrn_ord'.$this->_aliasCounter++
116 116
                 );
117 117
             }
118 118
         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/UnitOfWork.php 3 patches
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -26,7 +26,6 @@  discard block
 block discarded – undo
26 26
 use Exception;
27 27
 use InvalidArgumentException;
28 28
 use UnexpectedValueException;
29
-
30 29
 use Doctrine\Common\Collections\ArrayCollection;
31 30
 use Doctrine\Common\Collections\Collection;
32 31
 use Doctrine\Common\NotifyPropertyChanged;
@@ -34,14 +33,12 @@  discard block
 block discarded – undo
34 33
 use Doctrine\Common\Persistence\ObjectManagerAware;
35 34
 use Doctrine\ORM\Mapping\ClassMetadata;
36 35
 use Doctrine\ORM\Proxy\Proxy;
37
-
38 36
 use Doctrine\ORM\Event\LifecycleEventArgs;
39 37
 use Doctrine\ORM\Event\PreUpdateEventArgs;
40 38
 use Doctrine\ORM\Event\PreFlushEventArgs;
41 39
 use Doctrine\ORM\Event\OnFlushEventArgs;
42 40
 use Doctrine\ORM\Event\PostFlushEventArgs;
43 41
 use Doctrine\ORM\Event\ListenersInvoker;
44
-
45 42
 use Doctrine\ORM\Cache\Persister\CachedPersister;
46 43
 use Doctrine\ORM\Persisters\Entity\BasicEntityPersister;
47 44
 use Doctrine\ORM\Persisters\Entity\SingleTablePersister;
@@ -49,7 +46,6 @@  discard block
 block discarded – undo
49 46
 use Doctrine\ORM\Persisters\Collection\OneToManyPersister;
50 47
 use Doctrine\ORM\Persisters\Collection\ManyToManyPersister;
51 48
 use Doctrine\ORM\Utility\IdentifierFlattener;
52
-use Doctrine\ORM\Cache\AssociationCacheEntry;
53 49
 
54 50
 /**
55 51
  * The UnitOfWork is responsible for tracking changes to objects during an
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1237,7 +1237,7 @@  discard block
 block discarded – undo
1237 1237
     /**
1238 1238
      * Schedules an entity for being updated.
1239 1239
      *
1240
-     * @param object $entity The entity to schedule for being updated.
1240
+     * @param \Doctrine\Tests\Models\Forum\ForumUser $entity The entity to schedule for being updated.
1241 1241
      *
1242 1242
      * @return void
1243 1243
      *
@@ -1305,7 +1305,7 @@  discard block
 block discarded – undo
1305 1305
     /**
1306 1306
      * Checks whether an entity is registered to be checked in the unit of work.
1307 1307
      *
1308
-     * @param object $entity
1308
+     * @param \Doctrine\Tests\ORM\NotifyChangedEntity $entity
1309 1309
      *
1310 1310
      * @return boolean
1311 1311
      */
@@ -3121,7 +3121,7 @@  discard block
 block discarded – undo
3121 3121
      *
3122 3122
      * @param object $entity       The entity that owns the property.
3123 3123
      * @param string $propertyName The name of the property that changed.
3124
-     * @param mixed  $oldValue     The old value of the property.
3124
+     * @param null|integer  $oldValue     The old value of the property.
3125 3125
      * @param mixed  $newValue     The new value of the property.
3126 3126
      *
3127 3127
      * @return void
@@ -3321,7 +3321,7 @@  discard block
 block discarded – undo
3321 3321
     /**
3322 3322
      * Verifies if two given entities actually are the same based on identifier comparison
3323 3323
      *
3324
-     * @param object $entity1
3324
+     * @param Proxy $entity1
3325 3325
      * @param object $entity2
3326 3326
      *
3327 3327
      * @return bool
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
         $state = $this->getEntityState($entity);
465 465
 
466 466
         if ($state !== self::STATE_MANAGED && $state !== self::STATE_REMOVED) {
467
-            throw new \InvalidArgumentException("Entity has to be managed or scheduled for removal for single computation " . self::objToStr($entity));
467
+            throw new \InvalidArgumentException("Entity has to be managed or scheduled for removal for single computation ".self::objToStr($entity));
468 468
         }
469 469
 
470 470
         $class = $this->em->getClassMetadata(get_class($entity));
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
         $oid  = spl_object_hash($entity);
521 521
         $data = array();
522 522
 
523
-        if (!isset($this->entityChangeSets[$oid])) {
523
+        if ( ! isset($this->entityChangeSets[$oid])) {
524 524
             return $data;
525 525
         }
526 526
 
@@ -683,7 +683,7 @@  discard block
 block discarded – undo
683 683
                     if ($owner === null) { // cloned
684 684
                         $actualValue->setOwner($entity, $assoc);
685 685
                     } else if ($owner !== $entity) { // no clone, we have to fix
686
-                        if (!$actualValue->isInitialized()) {
686
+                        if ( ! $actualValue->isInitialized()) {
687 687
                             $actualValue->initialize(); // we have to do this otherwise the cols share state
688 688
                         }
689 689
                         $newValue = clone $actualValue;
@@ -829,7 +829,7 @@  discard block
 block discarded – undo
829 829
         $targetClass    = $this->em->getClassMetadata($assoc['targetEntity']);
830 830
 
831 831
         foreach ($unwrappedValue as $key => $entry) {
832
-            if (! ($entry instanceof $targetClass->name)) {
832
+            if ( ! ($entry instanceof $targetClass->name)) {
833 833
                 throw ORMInvalidArgumentException::invalidAssociation($targetClass, $assoc, $entry);
834 834
             }
835 835
 
@@ -1688,7 +1688,7 @@  discard block
 block discarded – undo
1688 1688
                 throw ORMInvalidArgumentException::detachedEntityCannot($entity, "persisted");
1689 1689
 
1690 1690
             default:
1691
-                throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity));
1691
+                throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity));
1692 1692
         }
1693 1693
 
1694 1694
         $this->cascadePersist($entity, $visited);
@@ -1758,7 +1758,7 @@  discard block
 block discarded – undo
1758 1758
             case self::STATE_DETACHED:
1759 1759
                 throw ORMInvalidArgumentException::detachedEntityCannot($entity, "removed");
1760 1760
             default:
1761
-                throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity));
1761
+                throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity));
1762 1762
         }
1763 1763
 
1764 1764
     }
@@ -1909,7 +1909,7 @@  discard block
 block discarded – undo
1909 1909
      */
1910 1910
     private function isLoaded($entity)
1911 1911
     {
1912
-        return !($entity instanceof Proxy) || $entity->__isInitialized();
1912
+        return ! ($entity instanceof Proxy) || $entity->__isInitialized();
1913 1913
     }
1914 1914
 
1915 1915
     /**
@@ -2067,7 +2067,7 @@  discard block
 block discarded – undo
2067 2067
 
2068 2068
         $associationMappings = array_filter(
2069 2069
             $class->associationMappings,
2070
-            function ($assoc) { return $assoc['isCascadeRefresh']; }
2070
+            function($assoc) { return $assoc['isCascadeRefresh']; }
2071 2071
         );
2072 2072
 
2073 2073
         foreach ($associationMappings as $assoc) {
@@ -2110,7 +2110,7 @@  discard block
 block discarded – undo
2110 2110
 
2111 2111
         $associationMappings = array_filter(
2112 2112
             $class->associationMappings,
2113
-            function ($assoc) { return $assoc['isCascadeDetach']; }
2113
+            function($assoc) { return $assoc['isCascadeDetach']; }
2114 2114
         );
2115 2115
 
2116 2116
         foreach ($associationMappings as $assoc) {
@@ -2154,7 +2154,7 @@  discard block
 block discarded – undo
2154 2154
 
2155 2155
         $associationMappings = array_filter(
2156 2156
             $class->associationMappings,
2157
-            function ($assoc) { return $assoc['isCascadeMerge']; }
2157
+            function($assoc) { return $assoc['isCascadeMerge']; }
2158 2158
         );
2159 2159
 
2160 2160
         foreach ($associationMappings as $assoc) {
@@ -2193,7 +2193,7 @@  discard block
 block discarded – undo
2193 2193
 
2194 2194
         $associationMappings = array_filter(
2195 2195
             $class->associationMappings,
2196
-            function ($assoc) { return $assoc['isCascadePersist']; }
2196
+            function($assoc) { return $assoc['isCascadePersist']; }
2197 2197
         );
2198 2198
 
2199 2199
         foreach ($associationMappings as $assoc) {
@@ -2222,7 +2222,7 @@  discard block
 block discarded – undo
2222 2222
                     break;
2223 2223
 
2224 2224
                 case ($relatedEntities !== null):
2225
-                    if (! $relatedEntities instanceof $assoc['targetEntity']) {
2225
+                    if ( ! $relatedEntities instanceof $assoc['targetEntity']) {
2226 2226
                         throw ORMInvalidArgumentException::invalidAssociation(
2227 2227
                             $this->em->getClassMetadata($assoc['targetEntity']),
2228 2228
                             $assoc,
@@ -2253,13 +2253,13 @@  discard block
 block discarded – undo
2253 2253
 
2254 2254
         $associationMappings = array_filter(
2255 2255
             $class->associationMappings,
2256
-            function ($assoc) { return $assoc['isCascadeRemove']; }
2256
+            function($assoc) { return $assoc['isCascadeRemove']; }
2257 2257
         );
2258 2258
 
2259 2259
         $entitiesToCascade = array();
2260 2260
 
2261 2261
         foreach ($associationMappings as $assoc) {
2262
-            if ($entity instanceof Proxy && !$entity->__isInitialized__) {
2262
+            if ($entity instanceof Proxy && ! $entity->__isInitialized__) {
2263 2263
                 $entity->__load();
2264 2264
             }
2265 2265
 
@@ -2323,7 +2323,7 @@  discard block
 block discarded – undo
2323 2323
                     return;
2324 2324
                 }
2325 2325
 
2326
-                if ($entity instanceof Proxy && !$entity->__isInitialized__) {
2326
+                if ($entity instanceof Proxy && ! $entity->__isInitialized__) {
2327 2327
                     $entity->__load();
2328 2328
                 }
2329 2329
 
@@ -2338,7 +2338,7 @@  discard block
 block discarded – undo
2338 2338
             case LockMode::NONE === $lockMode:
2339 2339
             case LockMode::PESSIMISTIC_READ === $lockMode:
2340 2340
             case LockMode::PESSIMISTIC_WRITE === $lockMode:
2341
-                if (!$this->em->getConnection()->isTransactionActive()) {
2341
+                if ( ! $this->em->getConnection()->isTransactionActive()) {
2342 2342
                     throw TransactionRequiredException::transactionRequired();
2343 2343
                 }
2344 2344
 
@@ -2683,7 +2683,7 @@  discard block
 block discarded – undo
2683 2683
                             // then we can append this entity for eager loading!
2684 2684
                             if ($hints['fetchMode'][$class->name][$field] == ClassMetadata::FETCH_EAGER &&
2685 2685
                                 isset($hints[self::HINT_DEFEREAGERLOAD]) &&
2686
-                                !$targetClass->isIdentifierComposite &&
2686
+                                ! $targetClass->isIdentifierComposite &&
2687 2687
                                 $newValue instanceof Proxy &&
2688 2688
                                 $newValue->__isInitialized__ === false) {
2689 2689
 
@@ -2995,7 +2995,7 @@  discard block
 block discarded – undo
2995 2995
      */
2996 2996
     public function size()
2997 2997
     {
2998
-        $countArray = array_map(function ($item) { return count($item); }, $this->identityMap);
2998
+        $countArray = array_map(function($item) { return count($item); }, $this->identityMap);
2999 2999
 
3000 3000
         return array_sum($countArray);
3001 3001
     }
@@ -3054,7 +3054,7 @@  discard block
 block discarded – undo
3054 3054
     public function getCollectionPersister(array $association)
3055 3055
     {
3056 3056
         $role = isset($association['cache'])
3057
-            ? $association['sourceEntity'] . '::' . $association['fieldName']
3057
+            ? $association['sourceEntity'].'::'.$association['fieldName']
3058 3058
             : $association['type'];
3059 3059
 
3060 3060
         if (isset($this->collectionPersisters[$role])) {
@@ -3272,7 +3272,7 @@  discard block
 block discarded – undo
3272 3272
      */
3273 3273
     private function afterTransactionComplete()
3274 3274
     {
3275
-        $this->performCallbackOnCachedPersister(function (CachedPersister $persister) {
3275
+        $this->performCallbackOnCachedPersister(function(CachedPersister $persister) {
3276 3276
             $persister->afterTransactionComplete();
3277 3277
         });
3278 3278
     }
@@ -3282,7 +3282,7 @@  discard block
 block discarded – undo
3282 3282
      */
3283 3283
     private function afterTransactionRolledBack()
3284 3284
     {
3285
-        $this->performCallbackOnCachedPersister(function (CachedPersister $persister) {
3285
+        $this->performCallbackOnCachedPersister(function(CachedPersister $persister) {
3286 3286
             $persister->afterTransactionRolledBack();
3287 3287
         });
3288 3288
     }
@@ -3381,7 +3381,7 @@  discard block
 block discarded – undo
3381 3381
                     if ($other === null) {
3382 3382
                         $prop->setValue($managedCopy, null);
3383 3383
                     } else {
3384
-                        if ($other instanceof Proxy && !$other->__isInitialized()) {
3384
+                        if ($other instanceof Proxy && ! $other->__isInitialized()) {
3385 3385
                             // do not merge fields marked lazy that have not been fetched.
3386 3386
                             continue;
3387 3387
                         }
Please login to merge, or discard this patch.
tools/sandbox/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,11 +12,11 @@
 block discarded – undo
12 12
 use Entities\Address;
13 13
 use Entities\User;
14 14
 
15
-$em = require_once __DIR__ . '/bootstrap.php';
15
+$em = require_once __DIR__.'/bootstrap.php';
16 16
 
17 17
 ## PUT YOUR TEST CODE BELOW
18 18
 
19 19
 $user = new User;
20 20
 $address = new Address;
21 21
 
22
-echo 'Hello World!' . PHP_EOL;
22
+echo 'Hello World!'.PHP_EOL;
Please login to merge, or discard this patch.
tools/sandbox/bootstrap.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@  discard block
 block discarded – undo
5 5
 
6 6
 // Path to composer autoloader. You can use different provided by your favorite framework,
7 7
 // if you want to.
8
-$loaderPath = __DIR__ . '/../../vendor/autoload.php';
9
-if(!is_readable($loaderPath)){
8
+$loaderPath = __DIR__.'/../../vendor/autoload.php';
9
+if ( ! is_readable($loaderPath)) {
10 10
     throw new LogicException('Run php composer.phar install at first');
11 11
 }
12 12
 $loader = require $loaderPath;
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 $config = new \Doctrine\ORM\Configuration();
20 20
 
21 21
 // Set up Metadata Drivers
22
-$driverImpl = $config->newDefaultAnnotationDriver(array(__DIR__ . "/Entities"));
22
+$driverImpl = $config->newDefaultAnnotationDriver(array(__DIR__."/Entities"));
23 23
 $config->setMetadataDriverImpl($driverImpl);
24 24
 
25 25
 // Set up caches, depending on $debug variable.
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 $config->setQueryCacheImpl($cache);
30 30
 
31 31
 // Proxy configuration
32
-$config->setProxyDir(__DIR__ . '/Proxies');
32
+$config->setProxyDir(__DIR__.'/Proxies');
33 33
 $config->setProxyNamespace('Proxies');
34 34
 
35 35
 // Database connection information
Please login to merge, or discard this patch.