Completed
Pull Request — master (#5626)
by Gary
09:09
created
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.
lib/Shitty/ORM/Query/Parser.php 1 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/Shitty/ORM/Query/Expr.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
      */
269 269
     public function countDistinct($x)
270 270
     {
271
-        return 'COUNT(DISTINCT ' . implode(', ', func_get_args()) . ')';
271
+        return 'COUNT(DISTINCT '.implode(', ', func_get_args()).')';
272 272
     }
273 273
 
274 274
     /**
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
             }
451 451
         }
452 452
 
453
-        return new Expr\Func($x . ' IN', (array) $y);
453
+        return new Expr\Func($x.' IN', (array) $y);
454 454
     }
455 455
 
456 456
     /**
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
             }
472 472
         }
473 473
 
474
-        return new Expr\Func($x . ' NOT IN', (array) $y);
474
+        return new Expr\Func($x.' NOT IN', (array) $y);
475 475
     }
476 476
 
477 477
     /**
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
      */
484 484
     public function isNull($x)
485 485
     {
486
-        return $x . ' IS NULL';
486
+        return $x.' IS NULL';
487 487
     }
488 488
 
489 489
     /**
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
      */
496 496
     public function isNotNull($x)
497 497
     {
498
-        return $x . ' IS NOT NULL';
498
+        return $x.' IS NOT NULL';
499 499
     }
500 500
 
501 501
     /**
@@ -613,12 +613,12 @@  discard block
 block discarded – undo
613 613
      */
614 614
     private function _quoteLiteral($literal)
615 615
     {
616
-        if (is_numeric($literal) && !is_string($literal)) {
616
+        if (is_numeric($literal) && ! is_string($literal)) {
617 617
             return (string) $literal;
618 618
         } else if (is_bool($literal)) {
619 619
             return $literal ? "true" : "false";
620 620
         } else {
621
-            return "'" . str_replace("'", "''", $literal) . "'";
621
+            return "'".str_replace("'", "''", $literal)."'";
622 622
         }
623 623
     }
624 624
 
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
      */
634 634
     public function between($val, $x, $y)
635 635
     {
636
-        return $val . ' BETWEEN ' . $x . ' AND ' . $y;
636
+        return $val.' BETWEEN '.$x.' AND '.$y;
637 637
     }
638 638
 
639 639
     /**
Please login to merge, or discard this patch.
lib/Shitty/ORM/Query/Lexer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@
 block discarded – undo
170 170
 
171 171
             // Recognize identifiers, aliased or qualified names
172 172
             case (ctype_alpha($value[0]) || $value[0] === '_' || $value[0] === '\\'):
173
-                $name = 'Doctrine\ORM\Query\Lexer::T_' . strtoupper($value);
173
+                $name = 'Doctrine\ORM\Query\Lexer::T_'.strtoupper($value);
174 174
 
175 175
                 if (defined($name)) {
176 176
                     $type = constant($name);
Please login to merge, or discard this patch.
lib/Shitty/ORM/Query/QueryException.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public static function syntaxError($message, $previous = null)
51 51
     {
52
-        return new self('[Syntax Error] ' . $message, 0, $previous);
52
+        return new self('[Syntax Error] '.$message, 0, $previous);
53 53
     }
54 54
 
55 55
     /**
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      */
61 61
     public static function semanticalError($message, $previous = null)
62 62
     {
63
-        return new self('[Semantical Error] ' . $message, 0, $previous);
63
+        return new self('[Semantical Error] '.$message, 0, $previous);
64 64
     }
65 65
 
66 66
     /**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      */
80 80
     public static function invalidParameterType($expected, $received)
81 81
     {
82
-        return new self('Invalid parameter type, ' . $received . ' given, but ' . $expected . ' expected.');
82
+        return new self('Invalid parameter type, '.$received.' given, but '.$expected.' expected.');
83 83
     }
84 84
 
85 85
     /**
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public static function invalidParameterPosition($pos)
91 91
     {
92
-        return new self('Invalid parameter position: ' . $pos);
92
+        return new self('Invalid parameter position: '.$pos);
93 93
     }
94 94
 
95 95
     /**
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      */
101 101
     public static function tooManyParameters($expected, $received)
102 102
     {
103
-        return new self('Too many parameters: the query defines ' . $expected . ' parameters and you bound ' . $received);
103
+        return new self('Too many parameters: the query defines '.$expected.' parameters and you bound '.$received);
104 104
     }
105 105
 
106 106
     /**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      */
112 112
     public static function tooFewParameters($expected, $received)
113 113
     {
114
-        return new self('Too few parameters: the query defines ' . $expected . ' parameters but you only bound ' . $received);
114
+        return new self('Too few parameters: the query defines '.$expected.' parameters but you only bound '.$received);
115 115
     }
116 116
 
117 117
     /**
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     public static function invalidPathExpression($pathExpr)
151 151
     {
152 152
         return new self(
153
-            "Invalid PathExpression '" . $pathExpr->identificationVariable . "." . $pathExpr->field . "'."
153
+            "Invalid PathExpression '".$pathExpr->identificationVariable.".".$pathExpr->field."'."
154 154
         );
155 155
     }
156 156
 
@@ -183,8 +183,8 @@  discard block
 block discarded – undo
183 183
     public static function partialObjectsAreDangerous()
184 184
     {
185 185
         return new self(
186
-            "Loading partial objects is dangerous. Fetch full objects or consider " .
187
-            "using a different fetch mode. If you really want partial objects, " .
186
+            "Loading partial objects is dangerous. Fetch full objects or consider ".
187
+            "using a different fetch mode. If you really want partial objects, ".
188 188
             "set the doctrine.forcePartialLoad query hint to TRUE."
189 189
         );
190 190
     }
@@ -222,8 +222,8 @@  discard block
 block discarded – undo
222 222
     public static function iterateWithFetchJoinNotAllowed($assoc)
223 223
     {
224 224
         return new self(
225
-            "Iterate with fetch join in class " . $assoc['sourceEntity'] .
226
-            " using association " . $assoc['fieldName'] . " not allowed."
225
+            "Iterate with fetch join in class ".$assoc['sourceEntity'].
226
+            " using association ".$assoc['fieldName']." not allowed."
227 227
         );
228 228
     }
229 229
 
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
      */
248 248
     public static function instanceOfUnrelatedClass($className, $rootClass)
249 249
     {
250
-        return new self("Cannot check if a child of '" . $rootClass . "' is instanceof '" . $className . "', " .
250
+        return new self("Cannot check if a child of '".$rootClass."' is instanceof '".$className."', ".
251 251
             "inheritance hierarchy does not exists between these two classes.");
252 252
     }
253 253
 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     public static function invalidQueryComponent($dqlAlias)
260 260
     {
261 261
         return new self(
262
-            "Invalid query component given for DQL alias '" . $dqlAlias . "', ".
262
+            "Invalid query component given for DQL alias '".$dqlAlias."', ".
263 263
             "requires 'metadata', 'parent', 'relation', 'map', 'nestingLevel' and 'token' keys."
264 264
         );
265 265
     }
Please login to merge, or discard this patch.
lib/Shitty/ORM/Query/ResultSetMappingBuilder.php 1 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/Shitty/ORM/Query/Exec/MultiTableDeleteExecutor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
         // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause()
78 78
         $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 't0', $primaryDqlAlias);
79 79
 
80
-        $this->_insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnList . ')'
81
-                . ' SELECT t0.' . implode(', t0.', $idColumnNames);
80
+        $this->_insertSql = 'INSERT INTO '.$tempTable.' ('.$idColumnList.')'
81
+                . ' SELECT t0.'.implode(', t0.', $idColumnNames);
82 82
 
83 83
         $rangeDecl = new AST\RangeVariableDeclaration($primaryClass->name, $primaryDqlAlias);
84 84
         $fromClause = new AST\FromClause(array(new AST\IdentificationVariableDeclaration($rangeDecl, null, array())));
@@ -90,14 +90,14 @@  discard block
 block discarded – undo
90 90
         }
91 91
 
92 92
         // 2. Create ID subselect statement used in DELETE ... WHERE ... IN (subselect)
93
-        $idSubselect = 'SELECT ' . $idColumnList . ' FROM ' . $tempTable;
93
+        $idSubselect = 'SELECT '.$idColumnList.' FROM '.$tempTable;
94 94
 
95 95
         // 3. Create and store DELETE statements
96 96
         $classNames = array_merge($primaryClass->parentClasses, array($primaryClass->name), $primaryClass->subClasses);
97 97
         foreach (array_reverse($classNames) as $className) {
98 98
             $tableName = $quoteStrategy->getTableName($em->getClassMetadata($className), $platform);
99
-            $this->_sqlStatements[] = 'DELETE FROM ' . $tableName
100
-                    . ' WHERE (' . $idColumnList . ') IN (' . $idSubselect . ')';
99
+            $this->_sqlStatements[] = 'DELETE FROM '.$tableName
100
+                    . ' WHERE ('.$idColumnList.') IN ('.$idSubselect.')';
101 101
         }
102 102
 
103 103
         // 4. Store DDL for temporary identifier table.
@@ -108,8 +108,8 @@  discard block
 block discarded – undo
108 108
                 'type'    => Type::getType(PersisterHelper::getTypeOfColumn($idColumnName, $rootClass, $em)),
109 109
             );
110 110
         }
111
-        $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' ('
112
-                . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')';
111
+        $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable.' ('
112
+                . $platform->getColumnDeclarationListSQL($columnDefinitions).')';
113 113
         $this->_dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable);
114 114
     }
115 115
 
Please login to merge, or discard this patch.
lib/Shitty/ORM/Query/Exec/MultiTableUpdateExecutor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
         // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause()
89 89
         $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 't0', $updateClause->aliasIdentificationVariable);
90 90
 
91
-        $this->_insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnList . ')'
92
-                . ' SELECT t0.' . implode(', t0.', $idColumnNames);
91
+        $this->_insertSql = 'INSERT INTO '.$tempTable.' ('.$idColumnList.')'
92
+                . ' SELECT t0.'.implode(', t0.', $idColumnNames);
93 93
 
94 94
         $rangeDecl = new AST\RangeVariableDeclaration($primaryClass->name, $updateClause->aliasIdentificationVariable);
95 95
         $fromClause = new AST\FromClause(array(new AST\IdentificationVariableDeclaration($rangeDecl, null, array())));
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $this->_insertSql .= $sqlWalker->walkFromClause($fromClause);
98 98
 
99 99
         // 2. Create ID subselect statement used in UPDATE ... WHERE ... IN (subselect)
100
-        $idSubselect = 'SELECT ' . $idColumnList . ' FROM ' . $tempTable;
100
+        $idSubselect = 'SELECT '.$idColumnList.' FROM '.$tempTable;
101 101
 
102 102
         // 3. Create and store UPDATE statements
103 103
         $classNames = array_merge($primaryClass->parentClasses, array($primaryClass->name), $primaryClass->subClasses);
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         foreach (array_reverse($classNames) as $className) {
107 107
             $affected = false;
108 108
             $class = $em->getClassMetadata($className);
109
-            $updateSql = 'UPDATE ' . $quoteStrategy->getTableName($class, $platform) . ' SET ';
109
+            $updateSql = 'UPDATE '.$quoteStrategy->getTableName($class, $platform).' SET ';
110 110
 
111 111
             foreach ($updateItems as $updateItem) {
112 112
                 $field = $updateItem->pathExpression->field;
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             }
134 134
 
135 135
             if ($affected) {
136
-                $this->_sqlStatements[$i] = $updateSql . ' WHERE (' . $idColumnList . ') IN (' . $idSubselect . ')';
136
+                $this->_sqlStatements[$i] = $updateSql.' WHERE ('.$idColumnList.') IN ('.$idSubselect.')';
137 137
             }
138 138
         }
139 139
 
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
             );
153 153
         }
154 154
 
155
-        $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' ('
156
-                . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')';
155
+        $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable.' ('
156
+                . $platform->getColumnDeclarationListSQL($columnDefinitions).')';
157 157
 
158 158
         $this->_dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable);
159 159
     }
Please login to merge, or discard this patch.