Completed
Branch develop (d0d4c6)
by Marco
16:40
created
lib/Doctrine/ORM/Cache/Persister/Entity/AbstractEntityPersister.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@
 block discarded – undo
282 282
     /**
283 283
      * Generates a string of currently query
284 284
      *
285
-     * @param array   $query
285
+     * @param string   $query
286 286
      * @param string  $criteria
287 287
      * @param array   $orderBy
288 288
      * @param integer $limit
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
  */
42 42
 abstract class AbstractEntityPersister implements CachedEntityPersister
43 43
 {
44
-     /**
45
-     * @var \Doctrine\ORM\UnitOfWork
46
-     */
44
+        /**
45
+         * @var \Doctrine\ORM\UnitOfWork
46
+         */
47 47
     protected $uow;
48 48
 
49 49
     /**
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
      */
62 62
     protected $class;
63 63
 
64
-     /**
65
-     * @var array
66
-     */
64
+        /**
65
+         * @var array
66
+         */
67 67
     protected $queuedCache = array();
68 68
 
69 69
     /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -297,7 +297,7 @@
 block discarded – undo
297 297
             ? $this->persister->expandCriteriaParameters($criteria)
298 298
             : $this->persister->expandParameters($criteria);
299 299
 
300
-        return sha1($query . serialize($params) . serialize($orderBy) . $limit . $offset . $timestamp);
300
+        return sha1($query.serialize($params).serialize($orderBy).$limit.$offset.$timestamp);
301 301
     }
302 302
 
303 303
     /**
Please login to merge, or discard this patch.
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.
lib/Doctrine/ORM/Mapping/NamingStrategy.php 1 patch
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -70,8 +70,6 @@
 block discarded – undo
70 70
      * Returns a join column name for a property.
71 71
      *
72 72
      * @param string $propertyName A property name.
73
-     * @param string|null $className    The fully-qualified class name.
74
-     *                                  This parameter is omitted from the signature due to BC
75 73
      *
76 74
      * @return string A join column name.
77 75
      */
Please login to merge, or discard this patch.
lib/Doctrine/ORM/NativeQuery.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     /**
50 50
      * Gets the SQL query.
51 51
      *
52
-     * @return mixed The built SQL query or an array of all SQL queries.
52
+     * @return string The built SQL query or an array of all SQL queries.
53 53
      *
54 54
      * @override
55 55
      */
Please login to merge, or discard this patch.
lib/Doctrine/ORM/PersistentCollection.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -579,7 +579,7 @@
 block discarded – undo
579 579
      * Internal note: Tried to implement Serializable first but that did not work well
580 580
      *                with circular references. This solution seems simpler and works well.
581 581
      *
582
-     * @return array
582
+     * @return string[]
583 583
      */
584 584
     public function __sleep()
585 585
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
      */
404 404
     public function containsKey($key)
405 405
     {
406
-        if (! $this->initialized && $this->association['fetch'] === ClassMetadata::FETCH_EXTRA_LAZY
406
+        if ( ! $this->initialized && $this->association['fetch'] === ClassMetadata::FETCH_EXTRA_LAZY
407 407
             && isset($this->association['indexBy'])) {
408 408
             $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association);
409 409
 
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
             && $this->association['fetch'] === ClassMetadata::FETCH_EXTRA_LAZY
437 437
             && isset($this->association['indexBy'])
438 438
         ) {
439
-            if (!$this->typeClass->isIdentifierComposite && $this->typeClass->isIdentifier($this->association['indexBy'])) {
439
+            if ( ! $this->typeClass->isIdentifierComposite && $this->typeClass->isIdentifier($this->association['indexBy'])) {
440 440
                 return $this->em->find($this->typeClass->name, $key);
441 441
             }
442 442
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Parser.php 2 patches
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
      * declarations (from ... x join ... y join ... z ...) appear in the query
413 413
      * as the hydration process relies on that order for proper operation.
414 414
      *
415
-     * @param AST\SelectStatement|AST\DeleteStatement|AST\UpdateStatement $AST
415
+     * @param AST\SelectStatement $AST
416 416
      *
417 417
      * @return void
418 418
      */
@@ -748,7 +748,7 @@  discard block
 block discarded – undo
748 748
      * SingleValuedAssociationPathExpression ::= IdentificationVariable "." SingleValuedAssociationField
749 749
      * CollectionValuedPathExpression        ::= IdentificationVariable "." CollectionValuedAssociationField
750 750
      *
751
-     * @param mixed $AST
751
+     * @param AST\SelectStatement $AST
752 752
      *
753 753
      * @return void
754 754
      */
@@ -1622,7 +1622,7 @@  discard block
 block discarded – undo
1622 1622
      * accessible is "FROM", prohibiting an easy implementation without larger
1623 1623
      * changes.}
1624 1624
      *
1625
-     * @return \Doctrine\ORM\Query\AST\SubselectIdentificationVariableDeclaration |
1625
+     * @return AST\IdentificationVariableDeclaration |
1626 1626
      *         \Doctrine\ORM\Query\AST\IdentificationVariableDeclaration
1627 1627
      */
1628 1628
     public function SubselectIdentificationVariableDeclaration()
@@ -1760,7 +1760,7 @@  discard block
 block discarded – undo
1760 1760
     /**
1761 1761
      * JoinAssociationDeclaration ::= JoinAssociationPathExpression ["AS"] AliasIdentificationVariable [IndexBy]
1762 1762
      *
1763
-     * @return \Doctrine\ORM\Query\AST\JoinAssociationPathExpression
1763
+     * @return AST\JoinAssociationDeclaration
1764 1764
      */
1765 1765
     public function JoinAssociationDeclaration()
1766 1766
     {
@@ -1798,7 +1798,7 @@  discard block
 block discarded – undo
1798 1798
      * PartialObjectExpression ::= "PARTIAL" IdentificationVariable "." PartialFieldSet
1799 1799
      * PartialFieldSet ::= "{" SimpleStateField {"," SimpleStateField}* "}"
1800 1800
      *
1801
-     * @return array
1801
+     * @return AST\PartialObjectExpression
1802 1802
      */
1803 1803
     public function PartialObjectExpression()
1804 1804
     {
@@ -2877,7 +2877,7 @@  discard block
 block discarded – undo
2877 2877
     /**
2878 2878
      * StringExpression ::= StringPrimary | ResultVariable | "(" Subselect ")"
2879 2879
      *
2880
-     * @return \Doctrine\ORM\Query\AST\StringPrimary |
2880
+     * @return null|AST\Node |
2881 2881
      *         \Doctrine\ORM\Query\AST\Subselect |
2882 2882
      *         string
2883 2883
      */
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
             $this->queryComponents = $treeWalkerChain->getQueryComponents();
397 397
         }
398 398
 
399
-        $outputWalkerClass = $this->customOutputWalker ?: __NAMESPACE__ . '\SqlWalker';
399
+        $outputWalkerClass = $this->customOutputWalker ?: __NAMESPACE__.'\SqlWalker';
400 400
         $outputWalker      = new $outputWalkerClass($this->query, $this->parserResult, $this->queryComponents);
401 401
 
402 402
         // Assign an SQL executor to the parser result
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
         $tokenStr = substr($dql, $token['position'], $length);
492 492
 
493 493
         // Building informative message
494
-        $message = 'line 0, col ' . $tokenPos . " near '" . $tokenStr . "': Error: " . $message;
494
+        $message = 'line 0, col '.$tokenPos." near '".$tokenStr."': Error: ".$message;
495 495
 
496 496
         throw QueryException::semanticalError($message, QueryException::dqlError($this->query->getDQL()));
497 497
     }
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
             // If the namespace is not given then assumes the first FROM entity namespace
639 639
             if (strpos($className, '\\') === false && ! class_exists($className) && strpos($fromClassName, '\\') !== false) {
640 640
                 $namespace  = substr($fromClassName, 0, strrpos($fromClassName, '\\'));
641
-                $fqcn       = $namespace . '\\' . $className;
641
+                $fqcn       = $namespace.'\\'.$className;
642 642
 
643 643
                 if (class_exists($fqcn)) {
644 644
                     $expression->className  = $fqcn;
@@ -690,13 +690,13 @@  discard block
 block discarded – undo
690 690
                 }
691 691
 
692 692
                 $this->semanticalError(
693
-                    "There is no mapped field named '$field' on class " . $class->name . ".", $deferredItem['token']
693
+                    "There is no mapped field named '$field' on class ".$class->name.".", $deferredItem['token']
694 694
                 );
695 695
             }
696 696
 
697 697
             if (array_intersect($class->identifier, $expr->partialFieldSet) != $class->identifier) {
698 698
                 $this->semanticalError(
699
-                    "The partial field selection of class " . $class->name . " must contain the identifier.",
699
+                    "The partial field selection of class ".$class->name." must contain the identifier.",
700 700
                     $deferredItem['token']
701 701
                 );
702 702
             }
@@ -767,7 +767,7 @@  discard block
 block discarded – undo
767 767
             // Check if field or association exists
768 768
             if ( ! isset($class->associationMappings[$field]) && ! isset($class->fieldMappings[$field])) {
769 769
                 $this->semanticalError(
770
-                    'Class ' . $class->name . ' has no field or association named ' . $field,
770
+                    'Class '.$class->name.' has no field or association named '.$field,
771 771
                     $deferredItem['token']
772 772
                 );
773 773
             }
@@ -807,8 +807,8 @@  discard block
 block discarded – undo
807 807
                 // Build the error message
808 808
                 $semanticalError  = 'Invalid PathExpression. ';
809 809
                 $semanticalError .= (count($expectedStringTypes) == 1)
810
-                    ? 'Must be a ' . $expectedStringTypes[0] . '.'
811
-                    : implode(' or ', $expectedStringTypes) . ' expected.';
810
+                    ? 'Must be a '.$expectedStringTypes[0].'.'
811
+                    : implode(' or ', $expectedStringTypes).' expected.';
812 812
 
813 813
                 $this->semanticalError($semanticalError, $deferredItem['token']);
814 814
             }
@@ -981,7 +981,7 @@  discard block
 block discarded – undo
981 981
 
982 982
             list($namespaceAlias, $simpleClassName) = explode(':', $this->lexer->token['value']);
983 983
 
984
-            $schemaName = $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;
984
+            $schemaName = $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName;
985 985
         }
986 986
 
987 987
         return $schemaName;
@@ -996,7 +996,7 @@  discard block
 block discarded – undo
996 996
      */
997 997
     private function validateAbstractSchemaName($schemaName)
998 998
     {
999
-        if (! (class_exists($schemaName, true) || interface_exists($schemaName, true))) {
999
+        if ( ! (class_exists($schemaName, true) || interface_exists($schemaName, true))) {
1000 1000
             $this->semanticalError("Class '$schemaName' is not defined.", $this->lexer->token);
1001 1001
         }
1002 1002
     }
@@ -1052,7 +1052,7 @@  discard block
 block discarded – undo
1052 1052
 
1053 1053
         if ( ! isset($this->queryComponents[$identVariable])) {
1054 1054
             $this->semanticalError(
1055
-                'Identification Variable ' . $identVariable .' used in join path expression but was not defined before.'
1055
+                'Identification Variable '.$identVariable.' used in join path expression but was not defined before.'
1056 1056
             );
1057 1057
         }
1058 1058
 
@@ -1066,7 +1066,7 @@  discard block
 block discarded – undo
1066 1066
         $class = $qComp['metadata'];
1067 1067
 
1068 1068
         if ( ! $class->hasAssociation($field)) {
1069
-            $this->semanticalError('Class ' . $class->name . ' has no association named ' . $field);
1069
+            $this->semanticalError('Class '.$class->name.' has no association named '.$field);
1070 1070
         }
1071 1071
 
1072 1072
         return new AST\JoinAssociationPathExpression($identVariable, $field);
@@ -2488,7 +2488,7 @@  discard block
 block discarded – undo
2488 2488
         // Peek beyond the matching closing parenthesis ')'
2489 2489
         $peek = $this->peekBeyondClosingParenthesis();
2490 2490
 
2491
-        if (in_array($peek['value'], array("=",  "<", "<=", "<>", ">", ">=", "!=")) ||
2491
+        if (in_array($peek['value'], array("=", "<", "<=", "<>", ">", ">=", "!=")) ||
2492 2492
             in_array($peek['type'], array(Lexer::T_NOT, Lexer::T_BETWEEN, Lexer::T_LIKE, Lexer::T_IN, Lexer::T_IS, Lexer::T_EXISTS)) ||
2493 2493
             $this->isMathOperator($peek)) {
2494 2494
             $condPrimary->simpleConditionalExpression = $this->SimpleConditionalExpression();
@@ -2593,7 +2593,7 @@  discard block
 block discarded – undo
2593 2593
             return $this->NullComparisonExpression();
2594 2594
         }
2595 2595
 
2596
-        if ($token['type'] === Lexer::T_IS  && $lookahead['type'] === Lexer::T_EMPTY) {
2596
+        if ($token['type'] === Lexer::T_IS && $lookahead['type'] === Lexer::T_EMPTY) {
2597 2597
             return $this->EmptyCollectionComparisonExpression();
2598 2598
         }
2599 2599
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/ResultSetMapping.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -389,7 +389,7 @@
 block discarded – undo
389 389
     /**
390 390
      * Adds a metadata parameter mappings.
391 391
      *
392
-     * @param mixed  $parameter The parameter name in the SQL result set.
392
+     * @param string  $parameter The parameter name in the SQL result set.
393 393
      * @param string $attribute The metadata attribute.
394 394
      */
395 395
     public function addMetadataParameterMapping($parameter, $attribute)
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -227,7 +227,9 @@
 block discarded – undo
227 227
         $found = false;
228 228
 
229 229
         foreach (array_merge($this->metaMappings, $this->fieldMappings) as $columnName => $columnFieldName) {
230
-            if ( ! ($columnFieldName === $fieldName && $this->columnOwnerMap[$columnName] === $alias)) continue;
230
+            if ( ! ($columnFieldName === $fieldName && $this->columnOwnerMap[$columnName] === $alias)) {
231
+                continue;
232
+            }
231 233
 
232 234
             $this->addIndexByColumn($alias, $columnName);
233 235
             $found = true;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/SqlWalker.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -1529,6 +1529,7 @@
 block discarded – undo
1529 1529
 
1530 1530
     /**
1531 1531
      * @param AST\NewObjectExpression $newObjectExpression
1532
+     * @param string $newObjectResultAlias
1532 1533
      *
1533 1534
      * @return string The SQL.
1534 1535
      */
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -444,7 +444,9 @@  discard block
 block discarded – undo
444 444
         foreach ($dqlAliases as $dqlAlias) {
445 445
             $class = $this->queryComponents[$dqlAlias]['metadata'];
446 446
 
447
-            if ( ! $class->isInheritanceTypeSingleTable()) continue;
447
+            if ( ! $class->isInheritanceTypeSingleTable()) {
448
+                continue;
449
+            }
448 450
 
449 451
             $conn   = $this->em->getConnection();
450 452
             $values = 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.
Spacing   +113 added lines, -113 removed lines patch added patch discarded remove patch
@@ -288,12 +288,12 @@  discard block
 block discarded – undo
288 288
      */
289 289
     public function getSQLTableAlias($tableName, $dqlAlias = '')
290 290
     {
291
-        $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : '';
291
+        $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : '';
292 292
 
293 293
         if ( ! isset($this->tableAliasMap[$tableName])) {
294 294
             $char = preg_match('/[a-z]/i', $tableName[0]) ? strtolower($tableName[0]) : 't';
295 295
 
296
-            $this->tableAliasMap[$tableName] = $char . $this->tableAliasCounter++ . '_';
296
+            $this->tableAliasMap[$tableName] = $char.$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);
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
                 $property      = $qComp['metadata']->getProperty($fieldName);
412 412
                 $tableName     = $property->getTableName();
413 413
                 $columnName    = $this->platform->quoteIdentifier($property->getColumnName());
414
-                $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias) . '.' . $columnName;
414
+                $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias).'.'.$columnName;
415 415
 
416 416
                 // OrderByClause should replace an ordered relation. see - DDC-2475
417 417
                 if (isset($this->orderedColumnsMap[$orderedColumn])) {
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
                 }
420 420
 
421 421
                 $this->orderedColumnsMap[$orderedColumn] = $orientation;
422
-                $orderedColumns[] = $orderedColumn . ' ' . $orientation;
422
+                $orderedColumns[] = $orderedColumn.' '.$orientation;
423 423
             }
424 424
         }
425 425
 
@@ -457,19 +457,19 @@  discard block
 block discarded – undo
457 457
             $discrColumnType  = $discrColumn->getType();
458 458
             $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName());
459 459
             $sqlTableAlias    = ($this->useSqlTableAliases)
460
-                ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.'
460
+                ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.'
461 461
                 : '';
462 462
 
463 463
             $sqlParts[] = sprintf(
464 464
                 '%s IN (%s)',
465
-                $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform),
465
+                $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform),
466 466
                 implode(', ', $values)
467 467
             );
468 468
         }
469 469
 
470 470
         $sql = implode(' AND ', $sqlParts);
471 471
 
472
-        return (count($sqlParts) > 1) ? '(' . $sql . ')' : $sql;
472
+        return (count($sqlParts) > 1) ? '('.$sql.')' : $sql;
473 473
     }
474 474
 
475 475
     /**
@@ -482,11 +482,11 @@  discard block
 block discarded – undo
482 482
      */
483 483
     private function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias)
484 484
     {
485
-        if (!$this->em->hasFilters()) {
485
+        if ( ! $this->em->hasFilters()) {
486 486
             return '';
487 487
         }
488 488
 
489
-        switch($targetEntity->inheritanceType) {
489
+        switch ($targetEntity->inheritanceType) {
490 490
             case ClassMetadata::INHERITANCE_TYPE_NONE:
491 491
                 break;
492 492
             case ClassMetadata::INHERITANCE_TYPE_JOINED:
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
 
512 512
         foreach ($this->em->getFilters()->getEnabledFilters() as $filter) {
513 513
             if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
514
-                $filterClauses[] = '(' . $filterExpr . ')';
514
+                $filterClauses[] = '('.$filterExpr.')';
515 515
             }
516 516
         }
517 517
 
@@ -543,7 +543,7 @@  discard block
 block discarded – undo
543 543
         }
544 544
 
545 545
         if ( ! $AST->orderByClause && ($orderBySql = $this->_generateOrderedCollectionOrderByItems())) {
546
-            $sql .= ' ORDER BY ' . $orderBySql;
546
+            $sql .= ' ORDER BY '.$orderBySql;
547 547
         }
548 548
 
549 549
         if ($limit !== null || $offset !== null) {
@@ -555,11 +555,11 @@  discard block
 block discarded – undo
555 555
         }
556 556
 
557 557
         if ($lockMode === LockMode::PESSIMISTIC_READ) {
558
-            return $sql . ' ' . $this->platform->getReadLockSQL();
558
+            return $sql.' '.$this->platform->getReadLockSQL();
559 559
         }
560 560
 
561 561
         if ($lockMode === LockMode::PESSIMISTIC_WRITE) {
562
-            return $sql . ' ' . $this->platform->getWriteLockSQL();
562
+            return $sql.' '.$this->platform->getWriteLockSQL();
563 563
         }
564 564
 
565 565
         if ($lockMode !== LockMode::OPTIMISTIC) {
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
         $sqlParts   = array();
615 615
 
616 616
         foreach ($this->quoteStrategy->getIdentifierColumnNames($class, $this->platform) as $columnName) {
617
-            $sqlParts[] = $tableAlias . '.' . $columnName;
617
+            $sqlParts[] = $tableAlias.'.'.$columnName;
618 618
         }
619 619
 
620 620
         return implode(', ', $sqlParts);
@@ -632,7 +632,7 @@  discard block
 block discarded – undo
632 632
     {
633 633
         $class = $this->queryComponents[$identificationVariable]['metadata'];
634 634
 
635
-        if (!$fieldName) {
635
+        if ( ! $fieldName) {
636 636
             return $this->getSQLTableAlias($class->getTableName(), $identificationVariable);
637 637
         }
638 638
 
@@ -660,7 +660,7 @@  discard block
 block discarded – undo
660 660
                 $property  = $class->getProperty($fieldName);
661 661
 
662 662
                 if ($this->useSqlTableAliases) {
663
-                    $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName) . '.';
663
+                    $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName).'.';
664 664
                 }
665 665
 
666 666
                 $sql .= $this->platform->quoteIdentifier($property->getColumnName());
@@ -686,7 +686,7 @@  discard block
 block discarded – undo
686 686
                 $joinColumn = $mapping['joinColumns'][0];
687 687
 
688 688
                 if ($this->useSqlTableAliases) {
689
-                    $sql .= $this->getSQLTableAlias($joinColumn['tableName'], $dqlAlias) . '.';
689
+                    $sql .= $this->getSQLTableAlias($joinColumn['tableName'], $dqlAlias).'.';
690 690
                 }
691 691
 
692 692
                 $sql .= $this->platform->quoteIdentifier($joinColumn['name']);
@@ -704,7 +704,7 @@  discard block
 block discarded – undo
704 704
      */
705 705
     public function walkSelectClause($selectClause)
706 706
     {
707
-        $sql = 'SELECT ' . (($selectClause->isDistinct) ? 'DISTINCT ' : '');
707
+        $sql = 'SELECT '.(($selectClause->isDistinct) ? 'DISTINCT ' : '');
708 708
         $sqlSelectExpressions = array_filter(array_map(array($this, 'walkSelectExpression'), $selectClause->selectExpressions));
709 709
 
710 710
         if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && $selectClause->isDistinct) {
@@ -745,7 +745,7 @@  discard block
 block discarded – undo
745 745
 
746 746
                 $sqlSelectExpressions[] = sprintf(
747 747
                     '%s AS %s',
748
-                    $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . '.' . $quotedColumnName, $this->platform),
748
+                    $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.'.'.$quotedColumnName, $this->platform),
749 749
                     $sqlColumnAlias
750 750
                 );
751 751
 
@@ -762,7 +762,7 @@  discard block
 block discarded – undo
762 762
             foreach ($class->associationMappings as $assoc) {
763 763
                 if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE)) {
764 764
                     continue;
765
-                } else if ( !$addMetaColumns && !isset($assoc['id'])) {
765
+                } else if ( ! $addMetaColumns && ! isset($assoc['id'])) {
766 766
                     continue;
767 767
                 }
768 768
 
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
                     $columnAlias   = $this->getSQLColumnAlias($joinColumn['name']);
776 776
                     $columnType    = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em);
777 777
 
778
-                    $sqlSelectExpressions[] = $sqlTableAlias . '.' . $columnName . ' AS ' . $columnAlias;
778
+                    $sqlSelectExpressions[] = $sqlTableAlias.'.'.$columnName.' AS '.$columnAlias;
779 779
 
780 780
                     $this->rsm->addMetaResult($dqlAlias, $columnAlias, $joinColumn['name'], $isIdentifier, $columnType);
781 781
                 }
@@ -803,7 +803,7 @@  discard block
 block discarded – undo
803 803
                             $columnAlias = $this->getSQLColumnAlias($joinColumn['name']);
804 804
                             $columnType  = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em);
805 805
 
806
-                            $sqlSelectExpressions[] = $sqlTableAlias . '.' . $columnName . ' AS ' . $columnAlias;
806
+                            $sqlSelectExpressions[] = $sqlTableAlias.'.'.$columnName.' AS '.$columnAlias;
807 807
 
808 808
                             $this->rsm->addMetaResult($dqlAlias, $columnAlias, $joinColumn['name'], $subClass->isIdentifier($joinColumn['name']), $columnType);
809 809
                         }
@@ -829,7 +829,7 @@  discard block
 block discarded – undo
829 829
             $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl);
830 830
         }
831 831
 
832
-        return ' FROM ' . implode(', ', $sqlParts);
832
+        return ' FROM '.implode(', ', $sqlParts);
833 833
     }
834 834
 
835 835
     /**
@@ -893,7 +893,7 @@  discard block
 block discarded – undo
893 893
         }
894 894
 
895 895
         $sql = $this->platform->appendLockHint(
896
-            $this->quoteStrategy->getTableName($class, $this->platform) . ' ' .
896
+            $this->quoteStrategy->getTableName($class, $this->platform).' '.
897 897
             $this->getSQLTableAlias($class->getTableName(), $dqlAlias),
898 898
             $this->query->getHint(Query::HINT_LOCK_MODE)
899 899
         );
@@ -935,7 +935,7 @@  discard block
 block discarded – undo
935 935
         // Ensure we got the owning side, since it has all mapping info
936 936
         $assoc = ( ! $relation['isOwningSide']) ? $targetClass->associationMappings[$relation['mappedBy']] : $relation;
937 937
 
938
-        if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && (!$this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) {
938
+        if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) {
939 939
             if ($relation['type'] == ClassMetadata::ONE_TO_MANY || $relation['type'] == ClassMetadata::MANY_TO_MANY) {
940 940
                 throw QueryException::iterateWithFetchJoinNotAllowed($assoc);
941 941
             }
@@ -955,12 +955,12 @@  discard block
 block discarded – undo
955 955
                     $quotedTargetColumn = $this->platform->quoteIdentifier($joinColumn['referencedColumnName']);
956 956
 
957 957
                     if ($relation['isOwningSide']) {
958
-                        $conditions[] = $sourceTableAlias . '.' . $quotedSourceColumn . ' = ' . $targetTableAlias . '.' . $quotedTargetColumn;
958
+                        $conditions[] = $sourceTableAlias.'.'.$quotedSourceColumn.' = '.$targetTableAlias.'.'.$quotedTargetColumn;
959 959
 
960 960
                         continue;
961 961
                     }
962 962
 
963
-                    $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $targetTableAlias . '.' . $quotedSourceColumn;
963
+                    $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$targetTableAlias.'.'.$quotedSourceColumn;
964 964
                 }
965 965
 
966 966
                 // Apply remaining inheritance restrictions
@@ -978,7 +978,7 @@  discard block
 block discarded – undo
978 978
                 }
979 979
 
980 980
                 $targetTableJoin = array(
981
-                    'table' => $targetTableName . ' ' . $targetTableAlias,
981
+                    'table' => $targetTableName.' '.$targetTableAlias,
982 982
                     'condition' => implode(' AND ', $conditions),
983 983
                 );
984 984
                 break;
@@ -998,10 +998,10 @@  discard block
 block discarded – undo
998 998
                     $quotedSourceColumn = $this->platform->quoteIdentifier($joinColumn['name']);
999 999
                     $quotedTargetColumn = $this->platform->quoteIdentifier($joinColumn['referencedColumnName']);
1000 1000
 
1001
-                    $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn;
1001
+                    $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableAlias.'.'.$quotedSourceColumn;
1002 1002
                 }
1003 1003
 
1004
-                $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions);
1004
+                $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions);
1005 1005
 
1006 1006
                 // Join target table
1007 1007
                 $sql .= ($joinType == AST\Join::JOIN_TYPE_LEFT || $joinType == AST\Join::JOIN_TYPE_LEFTOUTER) ? ' LEFT JOIN ' : ' INNER JOIN ';
@@ -1015,7 +1015,7 @@  discard block
 block discarded – undo
1015 1015
                     $quotedSourceColumn = $this->platform->quoteIdentifier($joinColumn['name']);
1016 1016
                     $quotedTargetColumn = $this->platform->quoteIdentifier($joinColumn['referencedColumnName']);
1017 1017
 
1018
-                    $conditions[] = $targetTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn;
1018
+                    $conditions[] = $targetTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableAlias.'.'.$quotedSourceColumn;
1019 1019
                 }
1020 1020
 
1021 1021
                 // Apply remaining inheritance restrictions
@@ -1033,7 +1033,7 @@  discard block
 block discarded – undo
1033 1033
                 }
1034 1034
 
1035 1035
                 $targetTableJoin = array(
1036
-                    'table' => $targetTableName . ' ' . $targetTableAlias,
1036
+                    'table' => $targetTableName.' '.$targetTableAlias,
1037 1037
                     'condition' => implode(' AND ', $conditions),
1038 1038
                 );
1039 1039
                 break;
@@ -1043,22 +1043,22 @@  discard block
 block discarded – undo
1043 1043
         }
1044 1044
 
1045 1045
         // Handle WITH clause
1046
-        $withCondition = (null === $condExpr) ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')');
1046
+        $withCondition = (null === $condExpr) ? '' : ('('.$this->walkConditionalExpression($condExpr).')');
1047 1047
 
1048 1048
         if ($targetClass->isInheritanceTypeJoined()) {
1049 1049
             $ctiJoins = $this->_generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias);
1050 1050
             // If we have WITH condition, we need to build nested joins for target class table and cti joins
1051 1051
             if ($withCondition) {
1052
-                $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition'];
1052
+                $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition'];
1053 1053
             } else {
1054
-                $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins;
1054
+                $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins;
1055 1055
             }
1056 1056
         } else {
1057
-            $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'];
1057
+            $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'];
1058 1058
         }
1059 1059
 
1060 1060
         if ($withCondition) {
1061
-            $sql .= ' AND ' . $withCondition;
1061
+            $sql .= ' AND '.$withCondition;
1062 1062
         }
1063 1063
 
1064 1064
         // Apply the indexes
@@ -1091,7 +1091,7 @@  discard block
 block discarded – undo
1091 1091
             $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems);
1092 1092
         }
1093 1093
 
1094
-        return ' ORDER BY ' . implode(', ', $orderByItems);
1094
+        return ' ORDER BY '.implode(', ', $orderByItems);
1095 1095
     }
1096 1096
 
1097 1097
     /**
@@ -1108,10 +1108,10 @@  discard block
 block discarded – undo
1108 1108
         $this->orderedColumnsMap[$sql] = $type;
1109 1109
 
1110 1110
         if ($expr instanceof AST\Subselect) {
1111
-            return '(' . $sql . ') ' . $type;
1111
+            return '('.$sql.') '.$type;
1112 1112
         }
1113 1113
 
1114
-        return $sql . ' ' . $type;
1114
+        return $sql.' '.$type;
1115 1115
     }
1116 1116
 
1117 1117
     /**
@@ -1119,7 +1119,7 @@  discard block
 block discarded – undo
1119 1119
      */
1120 1120
     public function walkHavingClause($havingClause)
1121 1121
     {
1122
-        return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression);
1122
+        return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression);
1123 1123
     }
1124 1124
 
1125 1125
     /**
@@ -1142,7 +1142,7 @@  discard block
 block discarded – undo
1142 1142
                 $conditions = [];
1143 1143
 
1144 1144
                 if ($join->conditionalExpression) {
1145
-                    $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')';
1145
+                    $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')';
1146 1146
                 }
1147 1147
 
1148 1148
                 $condExprConjunction = ($class->isInheritanceTypeJoined() && $joinType != AST\Join::JOIN_TYPE_LEFT && $joinType != AST\Join::JOIN_TYPE_LEFTOUTER)
@@ -1166,7 +1166,7 @@  discard block
 block discarded – undo
1166 1166
                 }
1167 1167
 
1168 1168
                 if ($conditions) {
1169
-                    $sql .= $condExprConjunction . implode(' AND ', $conditions);
1169
+                    $sql .= $condExprConjunction.implode(' AND ', $conditions);
1170 1170
                 }
1171 1171
 
1172 1172
                 break;
@@ -1223,7 +1223,7 @@  discard block
 block discarded – undo
1223 1223
             $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression);
1224 1224
         }
1225 1225
 
1226
-        $sql .= implode(', ', $scalarExpressions) . ')';
1226
+        $sql .= implode(', ', $scalarExpressions).')';
1227 1227
 
1228 1228
         return $sql;
1229 1229
     }
@@ -1245,7 +1245,7 @@  discard block
 block discarded – undo
1245 1245
             ? $this->conn->quote($nullIfExpression->secondExpression)
1246 1246
             : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression);
1247 1247
 
1248
-        return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')';
1248
+        return 'NULLIF('.$firstExpression.', '.$secondExpression.')';
1249 1249
     }
1250 1250
 
1251 1251
     /**
@@ -1260,11 +1260,11 @@  discard block
 block discarded – undo
1260 1260
         $sql = 'CASE';
1261 1261
 
1262 1262
         foreach ($generalCaseExpression->whenClauses as $whenClause) {
1263
-            $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression);
1264
-            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
1263
+            $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression);
1264
+            $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
1265 1265
         }
1266 1266
 
1267
-        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END';
1267
+        $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END';
1268 1268
 
1269 1269
         return $sql;
1270 1270
     }
@@ -1278,14 +1278,14 @@  discard block
 block discarded – undo
1278 1278
      */
1279 1279
     public function walkSimpleCaseExpression($simpleCaseExpression)
1280 1280
     {
1281
-        $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
1281
+        $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
1282 1282
 
1283 1283
         foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) {
1284
-            $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
1285
-            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
1284
+            $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
1285
+            $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
1286 1286
         }
1287 1287
 
1288
-        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END';
1288
+        $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END';
1289 1289
 
1290 1290
         return $sql;
1291 1291
     }
@@ -1347,7 +1347,7 @@  discard block
 block discarded – undo
1347 1347
                 $columnAlias = $this->getSQLColumnAlias('sclr');
1348 1348
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1349 1349
 
1350
-                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
1350
+                $sql .= $expr->dispatch($this).' AS '.$columnAlias;
1351 1351
 
1352 1352
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1353 1353
 
@@ -1361,7 +1361,7 @@  discard block
 block discarded – undo
1361 1361
                 $columnAlias = $this->getSQLColumnAlias('sclr');
1362 1362
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1363 1363
 
1364
-                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1364
+                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias;
1365 1365
 
1366 1366
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1367 1367
 
@@ -1373,7 +1373,7 @@  discard block
 block discarded – undo
1373 1373
                 break;
1374 1374
 
1375 1375
             case ($expr instanceof AST\NewObjectExpression):
1376
-                $sql .= $this->walkNewObject($expr,$selectExpression->fieldIdentificationVariable);
1376
+                $sql .= $this->walkNewObject($expr, $selectExpression->fieldIdentificationVariable);
1377 1377
                 break;
1378 1378
 
1379 1379
             default:
@@ -1433,7 +1433,7 @@  discard block
 block discarded – undo
1433 1433
                         $subClass = $this->em->getClassMetadata($subClassName);
1434 1434
 
1435 1435
                         foreach ($subClass->getProperties() as $fieldName => $property) {
1436
-                            if ($subClass->isInheritedProperty($fieldName) || ($partialFieldSet && !in_array($fieldName, $partialFieldSet))) {
1436
+                            if ($subClass->isInheritedProperty($fieldName) || ($partialFieldSet && ! in_array($fieldName, $partialFieldSet))) {
1437 1437
                                 continue;
1438 1438
                             }
1439 1439
 
@@ -1468,7 +1468,7 @@  discard block
 block discarded – undo
1468 1468
      */
1469 1469
     public function walkQuantifiedExpression($qExpr)
1470 1470
     {
1471
-        return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')';
1471
+        return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')';
1472 1472
     }
1473 1473
 
1474 1474
     /**
@@ -1502,13 +1502,13 @@  discard block
 block discarded – undo
1502 1502
     public function walkSubselectFromClause($subselectFromClause)
1503 1503
     {
1504 1504
         $identificationVarDecls = $subselectFromClause->identificationVariableDeclarations;
1505
-        $sqlParts               = array ();
1505
+        $sqlParts               = array();
1506 1506
 
1507 1507
         foreach ($identificationVarDecls as $subselectIdVarDecl) {
1508 1508
             $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl);
1509 1509
         }
1510 1510
 
1511
-        return ' FROM ' . implode(', ', $sqlParts);
1511
+        return ' FROM '.implode(', ', $sqlParts);
1512 1512
     }
1513 1513
 
1514 1514
     /**
@@ -1516,7 +1516,7 @@  discard block
 block discarded – undo
1516 1516
      */
1517 1517
     public function walkSimpleSelectClause($simpleSelectClause)
1518 1518
     {
1519
-        return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '')
1519
+        return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '')
1520 1520
             . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression);
1521 1521
     }
1522 1522
 
@@ -1535,10 +1535,10 @@  discard block
 block discarded – undo
1535 1535
      *
1536 1536
      * @return string The SQL.
1537 1537
      */
1538
-    public function walkNewObject($newObjectExpression, $newObjectResultAlias=null)
1538
+    public function walkNewObject($newObjectExpression, $newObjectResultAlias = null)
1539 1539
     {
1540 1540
         $sqlSelectExpressions = array();
1541
-        $objIndex             = $newObjectResultAlias?:$this->newObjectCounter++;
1541
+        $objIndex             = $newObjectResultAlias ?: $this->newObjectCounter++;
1542 1542
 
1543 1543
         foreach ($newObjectExpression->args as $argIndex => $e) {
1544 1544
             $resultAlias = $this->scalarResultCounter++;
@@ -1551,7 +1551,7 @@  discard block
 block discarded – undo
1551 1551
                     break;
1552 1552
 
1553 1553
                 case ($e instanceof AST\Subselect):
1554
-                    $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias;
1554
+                    $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias;
1555 1555
                     break;
1556 1556
 
1557 1557
                 case ($e instanceof AST\PathExpression):
@@ -1560,7 +1560,7 @@  discard block
 block discarded – undo
1560 1560
                     $class     = $qComp['metadata'];
1561 1561
                     $fieldType = $class->getProperty($e->field)->getType();
1562 1562
 
1563
-                    $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias;
1563
+                    $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias;
1564 1564
                     break;
1565 1565
 
1566 1566
                 case ($e instanceof AST\Literal):
@@ -1574,11 +1574,11 @@  discard block
 block discarded – undo
1574 1574
                             break;
1575 1575
                     }
1576 1576
 
1577
-                    $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias;
1577
+                    $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias;
1578 1578
                     break;
1579 1579
 
1580 1580
                 default:
1581
-                    $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias;
1581
+                    $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias;
1582 1582
                     break;
1583 1583
             }
1584 1584
 
@@ -1611,16 +1611,16 @@  discard block
 block discarded – undo
1611 1611
             case ($expr instanceof AST\AggregateExpression):
1612 1612
                 $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1613 1613
 
1614
-                $sql .= $this->walkAggregateExpression($expr) . ' AS dctrn__' . $alias;
1614
+                $sql .= $this->walkAggregateExpression($expr).' AS dctrn__'.$alias;
1615 1615
                 break;
1616 1616
 
1617 1617
             case ($expr instanceof AST\Subselect):
1618 1618
                 $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1619 1619
 
1620
-                $columnAlias = 'sclr' . $this->aliasCounter++;
1620
+                $columnAlias = 'sclr'.$this->aliasCounter++;
1621 1621
                 $this->scalarResultAliasMap[$alias] = $columnAlias;
1622 1622
 
1623
-                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1623
+                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias;
1624 1624
                 break;
1625 1625
 
1626 1626
             case ($expr instanceof AST\Functions\FunctionNode):
@@ -1637,7 +1637,7 @@  discard block
 block discarded – undo
1637 1637
                 $columnAlias = $this->getSQLColumnAlias('sclr');
1638 1638
                 $this->scalarResultAliasMap[$alias] = $columnAlias;
1639 1639
 
1640
-                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
1640
+                $sql .= $expr->dispatch($this).' AS '.$columnAlias;
1641 1641
                 break;
1642 1642
 
1643 1643
             case ($expr instanceof AST\ParenthesisExpression):
@@ -1657,8 +1657,8 @@  discard block
 block discarded – undo
1657 1657
      */
1658 1658
     public function walkAggregateExpression($aggExpression)
1659 1659
     {
1660
-        return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '')
1661
-            . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')';
1660
+        return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '')
1661
+            . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')';
1662 1662
     }
1663 1663
 
1664 1664
     /**
@@ -1672,7 +1672,7 @@  discard block
 block discarded – undo
1672 1672
             $sqlParts[] = $this->walkGroupByItem($groupByItem);
1673 1673
         }
1674 1674
 
1675
-        return ' GROUP BY ' . implode(', ', $sqlParts);
1675
+        return ' GROUP BY '.implode(', ', $sqlParts);
1676 1676
     }
1677 1677
 
1678 1678
     /**
@@ -1729,7 +1729,7 @@  discard block
 block discarded – undo
1729 1729
     {
1730 1730
         $class     = $this->em->getClassMetadata($deleteClause->abstractSchemaName);
1731 1731
         $tableName = $class->getTableName();
1732
-        $sql       = 'DELETE FROM ' . $this->quoteStrategy->getTableName($class, $this->platform);
1732
+        $sql       = 'DELETE FROM '.$this->quoteStrategy->getTableName($class, $this->platform);
1733 1733
 
1734 1734
         $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable);
1735 1735
         $this->rootAliases[] = $deleteClause->aliasIdentificationVariable;
@@ -1744,12 +1744,12 @@  discard block
 block discarded – undo
1744 1744
     {
1745 1745
         $class     = $this->em->getClassMetadata($updateClause->abstractSchemaName);
1746 1746
         $tableName = $class->getTableName();
1747
-        $sql       = 'UPDATE ' . $this->quoteStrategy->getTableName($class, $this->platform);
1747
+        $sql       = 'UPDATE '.$this->quoteStrategy->getTableName($class, $this->platform);
1748 1748
 
1749 1749
         $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable);
1750 1750
         $this->rootAliases[] = $updateClause->aliasIdentificationVariable;
1751 1751
 
1752
-        $sql .= ' SET ' . implode(', ', array_map(array($this, 'walkUpdateItem'), $updateClause->updateItems));
1752
+        $sql .= ' SET '.implode(', ', array_map(array($this, 'walkUpdateItem'), $updateClause->updateItems));
1753 1753
 
1754 1754
         return $sql;
1755 1755
     }
@@ -1762,7 +1762,7 @@  discard block
 block discarded – undo
1762 1762
         $useTableAliasesBefore = $this->useSqlTableAliases;
1763 1763
         $this->useSqlTableAliases = false;
1764 1764
 
1765
-        $sql      = $this->walkPathExpression($updateItem->pathExpression) . ' = ';
1765
+        $sql      = $this->walkPathExpression($updateItem->pathExpression).' = ';
1766 1766
         $newValue = $updateItem->newValue;
1767 1767
 
1768 1768
         switch (true) {
@@ -1805,7 +1805,7 @@  discard block
 block discarded – undo
1805 1805
 
1806 1806
             if (count($filterClauses)) {
1807 1807
                 if ($condSql) {
1808
-                    $condSql = '(' . $condSql . ') AND ';
1808
+                    $condSql = '('.$condSql.') AND ';
1809 1809
                 }
1810 1810
 
1811 1811
                 $condSql .= implode(' AND ', $filterClauses);
@@ -1813,11 +1813,11 @@  discard block
 block discarded – undo
1813 1813
         }
1814 1814
 
1815 1815
         if ($condSql) {
1816
-            return ' WHERE ' . (( ! $discrSql) ? $condSql : '(' . $condSql . ') AND ' . $discrSql);
1816
+            return ' WHERE '.(( ! $discrSql) ? $condSql : '('.$condSql.') AND '.$discrSql);
1817 1817
         }
1818 1818
 
1819 1819
         if ($discrSql) {
1820
-            return ' WHERE ' . $discrSql;
1820
+            return ' WHERE '.$discrSql;
1821 1821
         }
1822 1822
 
1823 1823
         return '';
@@ -1860,7 +1860,7 @@  discard block
 block discarded – undo
1860 1860
         // if only one ConditionalPrimary is defined
1861 1861
         return ( ! ($factor instanceof AST\ConditionalFactor))
1862 1862
             ? $this->walkConditionalPrimary($factor)
1863
-            : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary);
1863
+            : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary);
1864 1864
     }
1865 1865
 
1866 1866
     /**
@@ -1875,7 +1875,7 @@  discard block
 block discarded – undo
1875 1875
         if ($primary->isConditionalExpression()) {
1876 1876
             $condExpr = $primary->conditionalExpression;
1877 1877
 
1878
-            return '(' . $this->walkConditionalExpression($condExpr) . ')';
1878
+            return '('.$this->walkConditionalExpression($condExpr).')';
1879 1879
         }
1880 1880
     }
1881 1881
 
@@ -1886,7 +1886,7 @@  discard block
 block discarded – undo
1886 1886
     {
1887 1887
         $sql = ($existsExpr->not) ? 'NOT ' : '';
1888 1888
 
1889
-        $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')';
1889
+        $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')';
1890 1890
 
1891 1891
         return $sql;
1892 1892
     }
@@ -1930,7 +1930,7 @@  discard block
 block discarded – undo
1930 1930
             $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName());
1931 1931
             $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
1932 1932
 
1933
-            $sql .= $this->quoteStrategy->getTableName($targetClass, $this->platform) . ' ' . $targetTableAlias . ' WHERE ';
1933
+            $sql .= $this->quoteStrategy->getTableName($targetClass, $this->platform).' '.$targetTableAlias.' WHERE ';
1934 1934
 
1935 1935
             $owningAssoc = $targetClass->associationMappings[$assoc['mappedBy']];
1936 1936
             $sqlParts    = array();
@@ -1939,7 +1939,7 @@  discard block
 block discarded – undo
1939 1939
                 $property     = $class->getProperty($class->fieldNames[$targetColumn]);
1940 1940
                 $targetColumn = $this->platform->quoteIdentifier($property->getColumnName());
1941 1941
 
1942
-                $sqlParts[] = $sourceTableAlias . '.' . $targetColumn . ' = ' . $targetTableAlias . '.' . $sourceColumn;
1942
+                $sqlParts[] = $sourceTableAlias.'.'.$targetColumn.' = '.$targetTableAlias.'.'.$sourceColumn;
1943 1943
             }
1944 1944
 
1945 1945
             foreach ($this->quoteStrategy->getIdentifierColumnNames($targetClass, $this->platform) as $targetColumnName) {
@@ -1947,7 +1947,7 @@  discard block
 block discarded – undo
1947 1947
                     $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++);
1948 1948
                 }
1949 1949
 
1950
-                $sqlParts[] = $targetTableAlias . '.'  . $targetColumnName . ' = ' . $entitySql;
1950
+                $sqlParts[] = $targetTableAlias.'.'.$targetColumnName.' = '.$entitySql;
1951 1951
             }
1952 1952
 
1953 1953
             $sql .= implode(' AND ', $sqlParts);
@@ -1963,8 +1963,8 @@  discard block
 block discarded – undo
1963 1963
             $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
1964 1964
 
1965 1965
             // join to target table
1966
-            $sql .= $this->quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $this->platform) . ' ' . $joinTableAlias
1967
-                . ' INNER JOIN ' . $this->quoteStrategy->getTableName($targetClass, $this->platform) . ' ' . $targetTableAlias . ' ON ';
1966
+            $sql .= $this->quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $this->platform).' '.$joinTableAlias
1967
+                . ' INNER JOIN '.$this->quoteStrategy->getTableName($targetClass, $this->platform).' '.$targetTableAlias.' ON ';
1968 1968
 
1969 1969
             // join conditions
1970 1970
             $joinColumns  = $assoc['isOwningSide'] ? $joinTable['inverseJoinColumns'] : $joinTable['joinColumns'];
@@ -1975,7 +1975,7 @@  discard block
 block discarded – undo
1975 1975
                 $sourceColumn = $this->platform->quoteIdentifier($joinColumn['name']);
1976 1976
                 $targetColumn = $this->platform->quoteIdentifier($property->getColumnName());
1977 1977
 
1978
-                $joinSqlParts[] = $joinTableAlias . '.' . $sourceColumn . ' = ' . $targetTableAlias . '.' . $targetColumn;
1978
+                $joinSqlParts[] = $joinTableAlias.'.'.$sourceColumn.' = '.$targetTableAlias.'.'.$targetColumn;
1979 1979
             }
1980 1980
 
1981 1981
             $sql .= implode(' AND ', $joinSqlParts);
@@ -1989,7 +1989,7 @@  discard block
 block discarded – undo
1989 1989
                 $sourceColumn = $this->platform->quoteIdentifier($joinColumn['name']);
1990 1990
                 $targetColumn = $this->platform->quoteIdentifier($property->getColumnName());
1991 1991
 
1992
-                $sqlParts[] = $joinTableAlias . '.' . $sourceColumn . ' = ' . $sourceTableAlias . '.' . $targetColumn;
1992
+                $sqlParts[] = $joinTableAlias.'.'.$sourceColumn.' = '.$sourceTableAlias.'.'.$targetColumn;
1993 1993
             }
1994 1994
 
1995 1995
             foreach ($this->quoteStrategy->getIdentifierColumnNames($targetClass, $this->platform) as $targetColumnName) {
@@ -1997,13 +1997,13 @@  discard block
 block discarded – undo
1997 1997
                     $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++);
1998 1998
                 }
1999 1999
 
2000
-                $sqlParts[] = $targetTableAlias . '.' . $targetColumnName . ' = ' . $entitySql;
2000
+                $sqlParts[] = $targetTableAlias.'.'.$targetColumnName.' = '.$entitySql;
2001 2001
             }
2002 2002
 
2003 2003
             $sql .= implode(' AND ', $sqlParts);
2004 2004
         }
2005 2005
 
2006
-        return $sql . ')';
2006
+        return $sql.')';
2007 2007
     }
2008 2008
 
2009 2009
     /**
@@ -2014,7 +2014,7 @@  discard block
 block discarded – undo
2014 2014
         $sizeFunc = new AST\Functions\SizeFunction('size');
2015 2015
         $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression;
2016 2016
 
2017
-        return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0');
2017
+        return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0');
2018 2018
     }
2019 2019
 
2020 2020
     /**
@@ -2023,19 +2023,19 @@  discard block
 block discarded – undo
2023 2023
     public function walkNullComparisonExpression($nullCompExpr)
2024 2024
     {
2025 2025
         $expression = $nullCompExpr->expression;
2026
-        $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL';
2026
+        $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL';
2027 2027
 
2028 2028
         // Handle ResultVariable
2029 2029
         if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) {
2030
-            return $this->walkResultVariable($expression) . $comparison;
2030
+            return $this->walkResultVariable($expression).$comparison;
2031 2031
         }
2032 2032
 
2033 2033
         // Handle InputParameter mapping inclusion to ParserResult
2034 2034
         if ($expression instanceof AST\InputParameter) {
2035
-            return $this->walkInputParameter($expression) . $comparison;
2035
+            return $this->walkInputParameter($expression).$comparison;
2036 2036
         }
2037 2037
 
2038
-        return $expression->dispatch($this) . $comparison;
2038
+        return $expression->dispatch($this).$comparison;
2039 2039
     }
2040 2040
 
2041 2041
     /**
@@ -2043,7 +2043,7 @@  discard block
 block discarded – undo
2043 2043
      */
2044 2044
     public function walkInExpression($inExpr)
2045 2045
     {
2046
-        $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN (';
2046
+        $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN (';
2047 2047
 
2048 2048
         $sql .= ($inExpr->subselect)
2049 2049
             ? $this->walkSubselect($inExpr->subselect)
@@ -2066,7 +2066,7 @@  discard block
 block discarded – undo
2066 2066
         $discrColumnType  = $discrColumn->getType();
2067 2067
         $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName());
2068 2068
         $sqlTableAlias    = $this->useSqlTableAliases
2069
-            ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.'
2069
+            ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.'
2070 2070
             : '';
2071 2071
 
2072 2072
         $sqlParameterList = array();
@@ -2098,7 +2098,7 @@  discard block
 block discarded – undo
2098 2098
 
2099 2099
         return sprintf(
2100 2100
             '%s %sIN (%s)',
2101
-            $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform),
2101
+            $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform),
2102 2102
             ($instanceOfExpr->not ? 'NOT ' : ''),
2103 2103
             implode(', ', $sqlParameterList)
2104 2104
         );
@@ -2148,8 +2148,8 @@  discard block
 block discarded – undo
2148 2148
             $sql .= ' NOT';
2149 2149
         }
2150 2150
 
2151
-        $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression)
2152
-            . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression);
2151
+        $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression)
2152
+            . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression);
2153 2153
 
2154 2154
         return $sql;
2155 2155
     }
@@ -2164,7 +2164,7 @@  discard block
 block discarded – undo
2164 2164
             ? $this->walkResultVariable($stringExpr)
2165 2165
             : $stringExpr->dispatch($this);
2166 2166
 
2167
-        $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE ';
2167
+        $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE ';
2168 2168
 
2169 2169
         if ($likeExpr->stringPattern instanceof AST\InputParameter) {
2170 2170
             $sql .= $this->walkInputParameter($likeExpr->stringPattern);
@@ -2177,7 +2177,7 @@  discard block
 block discarded – undo
2177 2177
         }
2178 2178
 
2179 2179
         if ($likeExpr->escapeChar) {
2180
-            $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar);
2180
+            $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar);
2181 2181
         }
2182 2182
 
2183 2183
         return $sql;
@@ -2204,7 +2204,7 @@  discard block
 block discarded – undo
2204 2204
             ? $leftExpr->dispatch($this)
2205 2205
             : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr));
2206 2206
 
2207
-        $sql .= ' ' . $compExpr->operator . ' ';
2207
+        $sql .= ' '.$compExpr->operator.' ';
2208 2208
 
2209 2209
         $sql .= ($rightExpr instanceof AST\Node)
2210 2210
             ? $rightExpr->dispatch($this)
@@ -2236,7 +2236,7 @@  discard block
 block discarded – undo
2236 2236
     {
2237 2237
         return ($arithmeticExpr->isSimpleArithmeticExpression())
2238 2238
             ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression)
2239
-            : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')';
2239
+            : '('.$this->walkSubselect($arithmeticExpr->subselect).')';
2240 2240
     }
2241 2241
 
2242 2242
     /**
@@ -2290,7 +2290,7 @@  discard block
 block discarded – undo
2290 2290
 
2291 2291
         $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : '');
2292 2292
 
2293
-        return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary);
2293
+        return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary);
2294 2294
     }
2295 2295
 
2296 2296
     /**
@@ -2303,7 +2303,7 @@  discard block
 block discarded – undo
2303 2303
     public function walkArithmeticPrimary($primary)
2304 2304
     {
2305 2305
         if ($primary instanceof AST\SimpleArithmeticExpression) {
2306
-            return '(' . $this->walkSimpleArithmeticExpression($primary) . ')';
2306
+            return '('.$this->walkSimpleArithmeticExpression($primary).')';
2307 2307
         }
2308 2308
 
2309 2309
         if ($primary instanceof AST\Node) {
Please login to merge, or discard this patch.
lib/Doctrine/ORM/QueryBuilder.php 4 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,6 @@
 block discarded – undo
21 21
 
22 22
 use Doctrine\Common\Collections\ArrayCollection;
23 23
 use Doctrine\Common\Collections\Criteria;
24
-
25 24
 use Doctrine\ORM\Query\Expr;
26 25
 use Doctrine\ORM\Query\QueryExpressionVisitor;
27 26
 
Please login to merge, or discard this patch.
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.
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.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
     public function setParameter($key, $value, $type = null)
534 534
     {
535 535
         $filteredParameters = $this->parameters->filter(
536
-            function ($parameter) use ($key)
536
+            function($parameter) use ($key)
537 537
             {
538 538
                 /* @var Query\Parameter $parameter */
539 539
                 // Must not be identical because of string to integer conversion
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
     public function getParameter($key)
615 615
     {
616 616
         $filteredParameters = $this->parameters->filter(
617
-            function ($parameter) use ($key)
617
+            function($parameter) use ($key)
618 618
             {
619 619
                 /* @var Query\Parameter $parameter */
620 620
                 // Must not be identical because of string to integer conversion
@@ -697,7 +697,7 @@  discard block
 block discarded – undo
697 697
         }
698 698
 
699 699
         $isMultiple = is_array($this->_dqlParts[$dqlPartName])
700
-            && !($dqlPartName == 'join' && !$append);
700
+            && ! ($dqlPartName == 'join' && ! $append);
701 701
 
702 702
         // Allow adding any part retrieved from self::getDQLParts().
703 703
         if (is_array($dqlPart) && $dqlPartName != 'join') {
@@ -914,7 +914,7 @@  discard block
 block discarded – undo
914 914
     {
915 915
         $rootAliases = $this->getRootAliases();
916 916
 
917
-        if (!in_array($alias, $rootAliases)) {
917
+        if ( ! in_array($alias, $rootAliases)) {
918 918
             throw new Query\QueryException(
919 919
                 sprintf('Specified root alias %s must be set before invoking indexBy().', $alias)
920 920
             );
@@ -1316,15 +1316,15 @@  discard block
 block discarded – undo
1316 1316
             foreach ($criteria->getOrderings() as $sort => $order) {
1317 1317
 
1318 1318
                 $hasValidAlias = false;
1319
-                foreach($allAliases as $alias) {
1320
-                    if(strpos($sort . '.', $alias . '.') === 0) {
1319
+                foreach ($allAliases as $alias) {
1320
+                    if (strpos($sort.'.', $alias.'.') === 0) {
1321 1321
                         $hasValidAlias = true;
1322 1322
                         break;
1323 1323
                     }
1324 1324
                 }
1325 1325
 
1326
-                if(!$hasValidAlias) {
1327
-                    $sort = $allAliases[0] . '.' . $sort;
1326
+                if ( ! $hasValidAlias) {
1327
+                    $sort = $allAliases[0].'.'.$sort;
1328 1328
                 }
1329 1329
 
1330 1330
                 $this->addOrderBy($sort, $order);
@@ -1397,7 +1397,7 @@  discard block
 block discarded – undo
1397 1397
     private function _getDQLForSelect()
1398 1398
     {
1399 1399
         $dql = 'SELECT'
1400
-             . ($this->_dqlParts['distinct']===true ? ' DISTINCT' : '')
1400
+             . ($this->_dqlParts['distinct'] === true ? ' DISTINCT' : '')
1401 1401
              . $this->_getReducedDQLQueryPart('select', array('pre' => ' ', 'separator' => ', '));
1402 1402
 
1403 1403
         $fromParts   = $this->getDQLPart('from');
@@ -1413,7 +1413,7 @@  discard block
 block discarded – undo
1413 1413
 
1414 1414
                 if ($from instanceof Expr\From && isset($joinParts[$from->getAlias()])) {
1415 1415
                     foreach ($joinParts[$from->getAlias()] as $join) {
1416
-                        $fromClause .= ' ' . ((string) $join);
1416
+                        $fromClause .= ' '.((string) $join);
1417 1417
                     }
1418 1418
                 }
1419 1419
 
Please login to merge, or discard this patch.
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.