Completed
Pull Request — master (#6442)
by Simone
10:17
created
lib/Doctrine/ORM/Id/UuidGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     public function generate(EntityManager $em, $entity)
36 36
     {
37 37
         $conn = $em->getConnection();
38
-        $sql = 'SELECT ' . $conn->getDatabasePlatform()->getGuidExpression();
38
+        $sql = 'SELECT '.$conn->getDatabasePlatform()->getGuidExpression();
39 39
 
40 40
         return $conn->query($sql)->fetchColumn(0);
41 41
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/SqlExpressionVisitor.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -95,15 +95,15 @@
 block discarded – undo
95 95
             $expressionList[] = $this->dispatch($child);
96 96
         }
97 97
 
98
-        switch($expr->getType()) {
98
+        switch ($expr->getType()) {
99 99
             case CompositeExpression::TYPE_AND:
100
-                return '(' . implode(' AND ', $expressionList) . ')';
100
+                return '('.implode(' AND ', $expressionList).')';
101 101
 
102 102
             case CompositeExpression::TYPE_OR:
103
-                return '(' . implode(' OR ', $expressionList) . ')';
103
+                return '('.implode(' OR ', $expressionList).')';
104 104
 
105 105
             default:
106
-                throw new \RuntimeException("Unknown composite " . $expr->getType());
106
+                throw new \RuntimeException("Unknown composite ".$expr->getType());
107 107
         }
108 108
     }
109 109
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/PersisterException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     static public function matchingAssocationFieldRequiresObject($class, $associationName)
30 30
     {
31 31
         return new self(sprintf(
32
-            "Cannot match on %s::%s with a non-object value. Matching objects by id is " .
32
+            "Cannot match on %s::%s with a non-object value. Matching objects by id is ".
33 33
             "not compatible with matching on an in-memory collection, which compares objects by reference.",
34 34
             $class, $associationName
35 35
         ));
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Collection/OneToManyPersister.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -147,9 +147,9 @@
 block discarded – undo
147 147
         return (bool) $persister->count($criteria);
148 148
     }
149 149
 
150
-     /**
151
-     * {@inheritdoc}
152
-     */
150
+        /**
151
+         * {@inheritdoc}
152
+         */
153 153
     public function contains(PersistentCollection $collection, $element)
154 154
     {
155 155
         if ( ! $this->isValidEntityState($element)) {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -217,8 +217,8 @@  discard block
 block discarded – undo
217 217
             $parameters[] = $identifier[$sourceClass->getFieldForColumn($joinColumn['referencedColumnName'])];
218 218
         }
219 219
 
220
-        $statement = 'DELETE FROM ' . $this->quoteStrategy->getTableName($targetClass, $this->platform)
221
-            . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?';
220
+        $statement = 'DELETE FROM '.$this->quoteStrategy->getTableName($targetClass, $this->platform)
221
+            . ' WHERE '.implode(' = ? AND ', $columns).' = ?';
222 222
 
223 223
         return $this->conn->executeUpdate($statement, $parameters);
224 224
     }
@@ -255,18 +255,18 @@  discard block
 block discarded – undo
255 255
             ];
256 256
         }
257 257
 
258
-        $statement = $this->platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable
259
-            . ' (' . $this->platform->getColumnDeclarationListSQL($columnDefinitions) . ')';
258
+        $statement = $this->platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable
259
+            . ' ('.$this->platform->getColumnDeclarationListSQL($columnDefinitions).')';
260 260
 
261 261
         $this->conn->executeUpdate($statement);
262 262
 
263 263
         // 2) Build insert table records into temporary table
264 264
         $query = $this->em->createQuery(
265
-            ' SELECT t0.' . implode(', t0.', $rootClass->getIdentifierFieldNames())
266
-            . ' FROM ' . $targetClass->name . ' t0 WHERE t0.' . $mapping['mappedBy'] . ' = :owner'
265
+            ' SELECT t0.'.implode(', t0.', $rootClass->getIdentifierFieldNames())
266
+            . ' FROM '.$targetClass->name.' t0 WHERE t0.'.$mapping['mappedBy'].' = :owner'
267 267
         )->setParameter('owner', $collection->getOwner());
268 268
 
269
-        $statement  = 'INSERT INTO ' . $tempTable . ' (' . $idColumnList . ') ' . $query->getSQL();
269
+        $statement  = 'INSERT INTO '.$tempTable.' ('.$idColumnList.') '.$query->getSQL();
270 270
         $parameters = array_values($sourceClass->getIdentifierValues($collection->getOwner()));
271 271
         $numDeleted = $this->conn->executeUpdate($statement, $parameters);
272 272
 
@@ -275,8 +275,8 @@  discard block
 block discarded – undo
275 275
 
276 276
         foreach (array_reverse($classNames) as $className) {
277 277
             $tableName = $this->quoteStrategy->getTableName($this->em->getClassMetadata($className), $this->platform);
278
-            $statement = 'DELETE FROM ' . $tableName . ' WHERE (' . $idColumnList . ')'
279
-                . ' IN (SELECT ' . $idColumnList . ' FROM ' . $tempTable . ')';
278
+            $statement = 'DELETE FROM '.$tableName.' WHERE ('.$idColumnList.')'
279
+                . ' IN (SELECT '.$idColumnList.' FROM '.$tempTable.')';
280 280
 
281 281
             $this->conn->executeUpdate($statement);
282 282
         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -339,8 +339,8 @@  discard block
 block discarded – undo
339 339
 
340 340
         // FIXME: Order with composite keys might not be correct
341 341
         $sql = 'SELECT ' . $columnName
342
-             . ' FROM '  . $tableName
343
-             . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
342
+                . ' FROM '  . $tableName
343
+                . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
344 344
 
345 345
         $flatId = $this->identifierFlattener->flattenIdentifier($versionedClass, $id);
346 346
 
@@ -474,8 +474,8 @@  discard block
 block discarded – undo
474 474
         }
475 475
 
476 476
         $sql = 'UPDATE ' . $quotedTableName
477
-             . ' SET ' . implode(', ', $set)
478
-             . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
477
+                . ' SET ' . implode(', ', $set)
478
+                . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
479 479
 
480 480
         $result = $this->conn->executeUpdate($sql, $params, $types);
481 481
 
@@ -1528,9 +1528,9 @@  discard block
 block discarded – undo
1528 1528
         $lock  = $this->getLockTablesSql($lockMode);
1529 1529
         $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ';
1530 1530
         $sql = 'SELECT 1 '
1531
-             . $lock
1532
-             . $where
1533
-             . $lockSql;
1531
+                . $lock
1532
+                . $where
1533
+                . $lockSql;
1534 1534
 
1535 1535
         list($params, $types) = $this->expandParameters($criteria);
1536 1536
 
@@ -1981,8 +1981,8 @@  discard block
 block discarded – undo
1981 1981
         $alias = $this->getSQLTableAlias($this->class->name);
1982 1982
 
1983 1983
         $sql = 'SELECT 1 '
1984
-             . $this->getLockTablesSql(null)
1985
-             . ' WHERE ' . $this->getSelectConditionSQL($criteria);
1984
+                . $this->getLockTablesSql(null)
1985
+                . ' WHERE ' . $this->getSelectConditionSQL($criteria);
1986 1986
 
1987 1987
         list($params, $types) = $this->expandParameters($criteria);
1988 1988
 
@@ -2012,9 +2012,9 @@  discard block
 block discarded – undo
2012 2012
     {
2013 2013
         // if one of the join columns is nullable, return left join
2014 2014
         foreach ($joinColumns as $joinColumn) {
2015
-             if ( ! isset($joinColumn['nullable']) || $joinColumn['nullable']) {
2016
-                 return 'LEFT JOIN';
2017
-             }
2015
+                if ( ! isset($joinColumn['nullable']) || $joinColumn['nullable']) {
2016
+                    return 'LEFT JOIN';
2017
+                }
2018 2018
         }
2019 2019
 
2020 2020
         return 'INNER JOIN';
Please login to merge, or discard this patch.
Spacing   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -338,9 +338,9 @@  discard block
 block discarded – undo
338 338
         $columnName   = $this->quoteStrategy->getColumnName($versionField, $versionedClass, $this->platform);
339 339
 
340 340
         // FIXME: Order with composite keys might not be correct
341
-        $sql = 'SELECT ' . $columnName
342
-             . ' FROM '  . $tableName
343
-             . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
341
+        $sql = 'SELECT '.$columnName
342
+             . ' FROM '.$tableName
343
+             . ' WHERE '.implode(' = ? AND ', $identifier).' = ?';
344 344
 
345 345
         $flatId = $this->identifierFlattener->flattenIdentifier($versionedClass, $id);
346 346
 
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
             }
417 417
 
418 418
             $params[]   = $value;
419
-            $set[]      = $column . ' = ' . $placeholder;
419
+            $set[]      = $column.' = '.$placeholder;
420 420
             $types[]    = $this->columnTypes[$columnName];
421 421
         }
422 422
 
@@ -464,18 +464,18 @@  discard block
 block discarded – undo
464 464
                 case Type::SMALLINT:
465 465
                 case Type::INTEGER:
466 466
                 case Type::BIGINT:
467
-                    $set[] = $versionColumn . ' = ' . $versionColumn . ' + 1';
467
+                    $set[] = $versionColumn.' = '.$versionColumn.' + 1';
468 468
                     break;
469 469
 
470 470
                 case Type::DATETIME:
471
-                    $set[] = $versionColumn . ' = CURRENT_TIMESTAMP';
471
+                    $set[] = $versionColumn.' = CURRENT_TIMESTAMP';
472 472
                     break;
473 473
             }
474 474
         }
475 475
 
476
-        $sql = 'UPDATE ' . $quotedTableName
477
-             . ' SET ' . implode(', ', $set)
478
-             . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
476
+        $sql = 'UPDATE '.$quotedTableName
477
+             . ' SET '.implode(', ', $set)
478
+             . ' WHERE '.implode(' = ? AND ', $where).' = ?';
479 479
 
480 480
         $result = $this->conn->executeUpdate($sql, $params, $types);
481 481
 
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
 
519 519
 
520 520
             if ($selfReferential) {
521
-                $otherColumns = (! $mapping['isOwningSide'])
521
+                $otherColumns = ( ! $mapping['isOwningSide'])
522 522
                     ? $association['joinTable']['joinColumns']
523 523
                     : $association['joinTable']['inverseJoinColumns'];
524 524
             }
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
         $tableName  = $this->quoteStrategy->getTableName($class, $this->platform);
557 557
         $idColumns  = $this->quoteStrategy->getIdentifierColumnNames($class, $this->platform);
558 558
         $id         = array_combine($idColumns, $identifier);
559
-        $types      = array_map(function ($identifier) use ($class, $self) {
559
+        $types      = array_map(function($identifier) use ($class, $self) {
560 560
             if (isset($class->fieldMappings[$identifier])) {
561 561
                 return $class->fieldMappings[$identifier]['type'];
562 562
             }
@@ -1019,7 +1019,7 @@  discard block
 block discarded – undo
1019 1019
                     );
1020 1020
             }
1021 1021
 
1022
-            $criteria[$quotedJoinTable . '.' . $quotedKeyColumn] = $value;
1022
+            $criteria[$quotedJoinTable.'.'.$quotedKeyColumn] = $value;
1023 1023
             $parameters[] = [
1024 1024
                 'value' => $value,
1025 1025
                 'field' => $field,
@@ -1062,11 +1062,11 @@  discard block
 block discarded – undo
1062 1062
 
1063 1063
         switch ($lockMode) {
1064 1064
             case LockMode::PESSIMISTIC_READ:
1065
-                $lockSql = ' ' . $this->platform->getReadLockSql();
1065
+                $lockSql = ' '.$this->platform->getReadLockSql();
1066 1066
                 break;
1067 1067
 
1068 1068
             case LockMode::PESSIMISTIC_WRITE:
1069
-                $lockSql = ' ' . $this->platform->getWriteLockSql();
1069
+                $lockSql = ' '.$this->platform->getWriteLockSql();
1070 1070
                 break;
1071 1071
         }
1072 1072
 
@@ -1077,14 +1077,14 @@  discard block
 block discarded – undo
1077 1077
 
1078 1078
         if ('' !== $filterSql) {
1079 1079
             $conditionSql = $conditionSql
1080
-                ? $conditionSql . ' AND ' . $filterSql
1080
+                ? $conditionSql.' AND '.$filterSql
1081 1081
                 : $filterSql;
1082 1082
         }
1083 1083
 
1084
-        $select = 'SELECT ' . $columnList;
1085
-        $from   = ' FROM ' . $tableName . ' '. $tableAlias;
1086
-        $join   = $this->currentPersisterContext->selectJoinSql . $joinSql;
1087
-        $where  = ($conditionSql ? ' WHERE ' . $conditionSql : '');
1084
+        $select = 'SELECT '.$columnList;
1085
+        $from   = ' FROM '.$tableName.' '.$tableAlias;
1086
+        $join   = $this->currentPersisterContext->selectJoinSql.$joinSql;
1087
+        $where  = ($conditionSql ? ' WHERE '.$conditionSql : '');
1088 1088
         $lock   = $this->platform->appendLockHint($from, $lockMode);
1089 1089
         $query  = $select
1090 1090
             . $lock
@@ -1092,7 +1092,7 @@  discard block
 block discarded – undo
1092 1092
             . $where
1093 1093
             . $orderBySql;
1094 1094
 
1095
-        return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql;
1095
+        return $this->platform->modifyLimitQuery($query, $limit, $offset).$lockSql;
1096 1096
     }
1097 1097
 
1098 1098
     /**
@@ -1111,13 +1111,13 @@  discard block
 block discarded – undo
1111 1111
 
1112 1112
         if ('' !== $filterSql) {
1113 1113
             $conditionSql = $conditionSql
1114
-                ? $conditionSql . ' AND ' . $filterSql
1114
+                ? $conditionSql.' AND '.$filterSql
1115 1115
                 : $filterSql;
1116 1116
         }
1117 1117
 
1118 1118
         $sql = 'SELECT COUNT(*) '
1119
-            . 'FROM ' . $tableName . ' ' . $tableAlias
1120
-            . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql);
1119
+            . 'FROM '.$tableName.' '.$tableAlias
1120
+            . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql);
1121 1121
 
1122 1122
         return $sql;
1123 1123
     }
@@ -1150,7 +1150,7 @@  discard block
 block discarded – undo
1150 1150
                     : $baseTableAlias;
1151 1151
 
1152 1152
                 $columnName    = $this->quoteStrategy->getColumnName($fieldName, $this->class, $this->platform);
1153
-                $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation;
1153
+                $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation;
1154 1154
 
1155 1155
                 continue;
1156 1156
             }
@@ -1167,7 +1167,7 @@  discard block
 block discarded – undo
1167 1167
 
1168 1168
                 foreach ($this->class->associationMappings[$fieldName]['joinColumns'] as $joinColumn) {
1169 1169
                     $columnName    = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1170
-                    $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation;
1170
+                    $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation;
1171 1171
                 }
1172 1172
 
1173 1173
                 continue;
@@ -1176,7 +1176,7 @@  discard block
 block discarded – undo
1176 1176
             throw ORMException::unrecognizedField($fieldName);
1177 1177
         }
1178 1178
 
1179
-        return ' ORDER BY ' . implode(', ', $orderByList);
1179
+        return ' ORDER BY '.implode(', ', $orderByList);
1180 1180
     }
1181 1181
 
1182 1182
     /**
@@ -1204,8 +1204,8 @@  discard block
 block discarded – undo
1204 1204
             $columnList[] = $this->getSelectColumnSQL($field, $this->class);
1205 1205
         }
1206 1206
 
1207
-        $this->currentPersisterContext->selectJoinSql    = '';
1208
-        $eagerAliasCounter      = 0;
1207
+        $this->currentPersisterContext->selectJoinSql = '';
1208
+        $eagerAliasCounter = 0;
1209 1209
 
1210 1210
         foreach ($this->class->associationMappings as $assocField => $assoc) {
1211 1211
             $assocColumnSQL = $this->getSelectColumnAssociationSQL($assocField, $assoc, $this->class);
@@ -1231,7 +1231,7 @@  discard block
 block discarded – undo
1231 1231
                 continue; // now this is why you shouldn't use inheritance
1232 1232
             }
1233 1233
 
1234
-            $assocAlias = 'e' . ($eagerAliasCounter++);
1234
+            $assocAlias = 'e'.($eagerAliasCounter++);
1235 1235
             $this->currentPersisterContext->rsm->addJoinedEntityResult($assoc['targetEntity'], $assocAlias, 'r', $assocField);
1236 1236
 
1237 1237
             foreach ($eagerEntity->fieldNames as $field) {
@@ -1264,14 +1264,14 @@  discard block
 block discarded – undo
1264 1264
             $joinTableName  = $this->quoteStrategy->getTableName($eagerEntity, $this->platform);
1265 1265
 
1266 1266
             if ($assoc['isOwningSide']) {
1267
-                $tableAlias           = $this->getSQLTableAlias($association['targetEntity'], $assocAlias);
1268
-                $this->currentPersisterContext->selectJoinSql .= ' ' . $this->getJoinSQLForJoinColumns($association['joinColumns']);
1267
+                $tableAlias = $this->getSQLTableAlias($association['targetEntity'], $assocAlias);
1268
+                $this->currentPersisterContext->selectJoinSql .= ' '.$this->getJoinSQLForJoinColumns($association['joinColumns']);
1269 1269
 
1270 1270
                 foreach ($association['joinColumns'] as $joinColumn) {
1271 1271
                     $sourceCol       = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1272 1272
                     $targetCol       = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform);
1273 1273
                     $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity'])
1274
-                                        . '.' . $sourceCol . ' = ' . $tableAlias . '.' . $targetCol;
1274
+                                        . '.'.$sourceCol.' = '.$tableAlias.'.'.$targetCol;
1275 1275
                 }
1276 1276
 
1277 1277
                 // Add filter SQL
@@ -1287,12 +1287,12 @@  discard block
 block discarded – undo
1287 1287
                     $sourceCol       = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1288 1288
                     $targetCol       = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform);
1289 1289
 
1290
-                    $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity'], $assocAlias) . '.' . $sourceCol . ' = '
1291
-                        . $this->getSQLTableAlias($association['targetEntity']) . '.' . $targetCol;
1290
+                    $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity'], $assocAlias).'.'.$sourceCol.' = '
1291
+                        . $this->getSQLTableAlias($association['targetEntity']).'.'.$targetCol;
1292 1292
                 }
1293 1293
             }
1294 1294
 
1295
-            $this->currentPersisterContext->selectJoinSql .= ' ' . $joinTableName . ' ' . $joinTableAlias . ' ON ';
1295
+            $this->currentPersisterContext->selectJoinSql .= ' '.$joinTableName.' '.$joinTableAlias.' ON ';
1296 1296
             $this->currentPersisterContext->selectJoinSql .= implode(' AND ', $joinCondition);
1297 1297
         }
1298 1298
 
@@ -1313,7 +1313,7 @@  discard block
 block discarded – undo
1313 1313
      */
1314 1314
     protected function getSelectColumnAssociationSQL($field, $assoc, ClassMetadata $class, $alias = 'r')
1315 1315
     {
1316
-        if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) ) {
1316
+        if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE)) {
1317 1317
             return '';
1318 1318
         }
1319 1319
 
@@ -1362,10 +1362,10 @@  discard block
 block discarded – undo
1362 1362
         foreach ($joinColumns as $joinColumn) {
1363 1363
             $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1364 1364
             $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform);
1365
-            $conditions[]       = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableName . '.' . $quotedSourceColumn;
1365
+            $conditions[]       = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableName.'.'.$quotedSourceColumn;
1366 1366
         }
1367 1367
 
1368
-        return ' INNER JOIN ' . $joinTableName . ' ON ' . implode(' AND ', $conditions);
1368
+        return ' INNER JOIN '.$joinTableName.' ON '.implode(' AND ', $conditions);
1369 1369
     }
1370 1370
 
1371 1371
     /**
@@ -1444,7 +1444,7 @@  discard block
 block discarded – undo
1444 1444
                 continue;
1445 1445
             }
1446 1446
 
1447
-            if (! $this->class->isIdGeneratorIdentity() || $this->class->identifier[0] != $name) {
1447
+            if ( ! $this->class->isIdGeneratorIdentity() || $this->class->identifier[0] != $name) {
1448 1448
                 $columns[]                = $this->quoteStrategy->getColumnName($name, $this->class, $this->platform);
1449 1449
                 $this->columnTypes[$name] = $this->class->fieldMappings[$name]['type'];
1450 1450
             }
@@ -1465,7 +1465,7 @@  discard block
 block discarded – undo
1465 1465
      */
1466 1466
     protected function getSelectColumnSQL($field, ClassMetadata $class, $alias = 'r')
1467 1467
     {
1468
-        $root         = $alias == 'r' ? '' : $alias ;
1468
+        $root         = $alias == 'r' ? '' : $alias;
1469 1469
         $tableAlias   = $this->getSQLTableAlias($class->name, $root);
1470 1470
         $fieldMapping = $class->fieldMappings[$field];
1471 1471
         $sql          = sprintf('%s.%s', $tableAlias, $this->quoteStrategy->getColumnName($field, $class, $this->platform));
@@ -1478,7 +1478,7 @@  discard block
 block discarded – undo
1478 1478
             $sql  = $type->convertToPHPValueSQL($sql, $this->platform);
1479 1479
         }
1480 1480
 
1481
-        return $sql . ' AS ' . $columnAlias;
1481
+        return $sql.' AS '.$columnAlias;
1482 1482
     }
1483 1483
 
1484 1484
     /**
@@ -1494,14 +1494,14 @@  discard block
 block discarded – undo
1494 1494
     protected function getSQLTableAlias($className, $assocName = '')
1495 1495
     {
1496 1496
         if ($assocName) {
1497
-            $className .= '#' . $assocName;
1497
+            $className .= '#'.$assocName;
1498 1498
         }
1499 1499
 
1500 1500
         if (isset($this->currentPersisterContext->sqlTableAliases[$className])) {
1501 1501
             return $this->currentPersisterContext->sqlTableAliases[$className];
1502 1502
         }
1503 1503
 
1504
-        $tableAlias = 't' . $this->currentPersisterContext->sqlAliasCounter++;
1504
+        $tableAlias = 't'.$this->currentPersisterContext->sqlAliasCounter++;
1505 1505
 
1506 1506
         $this->currentPersisterContext->sqlTableAliases[$className] = $tableAlias;
1507 1507
 
@@ -1528,7 +1528,7 @@  discard block
 block discarded – undo
1528 1528
         }
1529 1529
 
1530 1530
         $lock  = $this->getLockTablesSql($lockMode);
1531
-        $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ';
1531
+        $where = ($conditionSql ? ' WHERE '.$conditionSql : '').' ';
1532 1532
         $sql = 'SELECT 1 '
1533 1533
              . $lock
1534 1534
              . $where
@@ -1550,7 +1550,7 @@  discard block
 block discarded – undo
1550 1550
     {
1551 1551
         return $this->platform->appendLockHint(
1552 1552
             'FROM '
1553
-            . $this->quoteStrategy->getTableName($this->class, $this->platform) . ' '
1553
+            . $this->quoteStrategy->getTableName($this->class, $this->platform).' '
1554 1554
             . $this->getSQLTableAlias($this->class->name),
1555 1555
             $lockMode
1556 1556
         );
@@ -1602,19 +1602,19 @@  discard block
 block discarded – undo
1602 1602
 
1603 1603
             if (null !== $comparison) {
1604 1604
                 // special case null value handling
1605
-                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null ===$value) {
1606
-                    $selectedColumns[] = $column . ' IS NULL';
1605
+                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null === $value) {
1606
+                    $selectedColumns[] = $column.' IS NULL';
1607 1607
 
1608 1608
                     continue;
1609 1609
                 }
1610 1610
 
1611 1611
                 if ($comparison === Comparison::NEQ && null === $value) {
1612
-                    $selectedColumns[] = $column . ' IS NOT NULL';
1612
+                    $selectedColumns[] = $column.' IS NOT NULL';
1613 1613
 
1614 1614
                     continue;
1615 1615
                 }
1616 1616
 
1617
-                $selectedColumns[] = $column . ' ' . sprintf(self::$comparisonMap[$comparison], $placeholder);
1617
+                $selectedColumns[] = $column.' '.sprintf(self::$comparisonMap[$comparison], $placeholder);
1618 1618
 
1619 1619
                 continue;
1620 1620
             }
@@ -1662,7 +1662,7 @@  discard block
 block discarded – undo
1662 1662
                 ? $this->class->fieldMappings[$field]['inherited']
1663 1663
                 : $this->class->name;
1664 1664
 
1665
-            return [$this->getSQLTableAlias($className) . '.' . $this->quoteStrategy->getColumnName($field, $this->class, $this->platform)];
1665
+            return [$this->getSQLTableAlias($className).'.'.$this->quoteStrategy->getColumnName($field, $this->class, $this->platform)];
1666 1666
         }
1667 1667
 
1668 1668
         if (isset($this->class->associationMappings[$field])) {
@@ -1683,7 +1683,7 @@  discard block
 block discarded – undo
1683 1683
 
1684 1684
 
1685 1685
                 foreach ($joinColumns as $joinColumn) {
1686
-                    $columns[] = $joinTableName . '.' . $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform);
1686
+                    $columns[] = $joinTableName.'.'.$this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform);
1687 1687
                 }
1688 1688
 
1689 1689
             } else {
@@ -1691,12 +1691,12 @@  discard block
 block discarded – undo
1691 1691
                     throw ORMException::invalidFindByInverseAssociation($this->class->name, $field);
1692 1692
                 }
1693 1693
 
1694
-                $className  = (isset($association['inherited']))
1694
+                $className = (isset($association['inherited']))
1695 1695
                     ? $association['inherited']
1696 1696
                     : $this->class->name;
1697 1697
 
1698 1698
                 foreach ($association['joinColumns'] as $joinColumn) {
1699
-                    $columns[] = $this->getSQLTableAlias($className) . '.' . $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1699
+                    $columns[] = $this->getSQLTableAlias($className).'.'.$this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1700 1700
                 }
1701 1701
             }
1702 1702
             return $columns;
@@ -1788,7 +1788,7 @@  discard block
 block discarded – undo
1788 1788
                     $value = $value[$this->em->getClassMetadata($sourceClass->associationMappings[$field]['targetEntity'])->identifier[0]];
1789 1789
                 }
1790 1790
 
1791
-                $criteria[$tableAlias . "." . $targetKeyColumn] = $value;
1791
+                $criteria[$tableAlias.".".$targetKeyColumn] = $value;
1792 1792
                 $parameters[]                                   = [
1793 1793
                     'value' => $value,
1794 1794
                     'field' => $field,
@@ -1801,7 +1801,7 @@  discard block
 block discarded – undo
1801 1801
             $field = $sourceClass->fieldNames[$sourceKeyColumn];
1802 1802
             $value = $sourceClass->reflFields[$field]->getValue($sourceEntity);
1803 1803
 
1804
-            $criteria[$tableAlias . "." . $targetKeyColumn] = $value;
1804
+            $criteria[$tableAlias.".".$targetKeyColumn] = $value;
1805 1805
             $parameters[] = [
1806 1806
                 'value' => $value,
1807 1807
                 'field' => $field,
@@ -1888,7 +1888,7 @@  discard block
 block discarded – undo
1888 1888
                 $assoc = $class->associationMappings[$field];
1889 1889
                 $class = $this->em->getClassMetadata($assoc['targetEntity']);
1890 1890
 
1891
-                if (! $assoc['isOwningSide']) {
1891
+                if ( ! $assoc['isOwningSide']) {
1892 1892
                     $assoc = $class->associationMappings[$assoc['mappedBy']];
1893 1893
                     $class = $this->em->getClassMetadata($assoc['targetEntity']);
1894 1894
                 }
@@ -1897,7 +1897,7 @@  discard block
 block discarded – undo
1897 1897
                     ? $assoc['relationToTargetKeyColumns']
1898 1898
                     : $assoc['sourceToTargetKeyColumns'];
1899 1899
 
1900
-                foreach ($columns as $column){
1900
+                foreach ($columns as $column) {
1901 1901
                     $types[] = PersisterHelper::getTypeOfColumn($column, $class, $this->em);
1902 1902
                 }
1903 1903
                 break;
@@ -1908,7 +1908,7 @@  discard block
 block discarded – undo
1908 1908
         }
1909 1909
 
1910 1910
         if (is_array($value)) {
1911
-            return array_map(function ($type) {
1911
+            return array_map(function($type) {
1912 1912
                 $type = Type::getType($type);
1913 1913
 
1914 1914
                 return $type->getBindingType() + Connection::ARRAY_PARAM_OFFSET;
@@ -1984,12 +1984,12 @@  discard block
 block discarded – undo
1984 1984
 
1985 1985
         $sql = 'SELECT 1 '
1986 1986
              . $this->getLockTablesSql(null)
1987
-             . ' WHERE ' . $this->getSelectConditionSQL($criteria);
1987
+             . ' WHERE '.$this->getSelectConditionSQL($criteria);
1988 1988
 
1989 1989
         list($params, $types) = $this->expandParameters($criteria);
1990 1990
 
1991 1991
         if (null !== $extraConditions) {
1992
-            $sql                                 .= ' AND ' . $this->getSelectConditionCriteriaSQL($extraConditions);
1992
+            $sql                                 .= ' AND '.$this->getSelectConditionCriteriaSQL($extraConditions);
1993 1993
             list($criteriaParams, $criteriaTypes) = $this->expandCriteriaParameters($extraConditions);
1994 1994
 
1995 1995
             $params = array_merge($params, $criteriaParams);
@@ -1997,7 +1997,7 @@  discard block
 block discarded – undo
1997 1997
         }
1998 1998
 
1999 1999
         if ($filterSql = $this->generateFilterConditionSQL($this->class, $alias)) {
2000
-            $sql .= ' AND ' . $filterSql;
2000
+            $sql .= ' AND '.$filterSql;
2001 2001
         }
2002 2002
 
2003 2003
         return (bool) $this->conn->fetchColumn($sql, $params, 0, $types);
@@ -2044,13 +2044,13 @@  discard block
 block discarded – undo
2044 2044
 
2045 2045
         foreach ($this->em->getFilters()->getEnabledFilters() as $filter) {
2046 2046
             if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
2047
-                $filterClauses[] = '(' . $filterExpr . ')';
2047
+                $filterClauses[] = '('.$filterExpr.')';
2048 2048
             }
2049 2049
         }
2050 2050
 
2051 2051
         $sql = implode(' AND ', $filterClauses);
2052 2052
 
2053
-        return $sql ? "(" . $sql . ")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
2053
+        return $sql ? "(".$sql.")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
2054 2054
     }
2055 2055
 
2056 2056
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/EntityPersister.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -47,17 +47,17 @@
 block discarded – undo
47 47
      * Get all queued inserts.
48 48
      *
49 49
      * @return array
50
-    */
50
+     */
51 51
     public function getInserts();
52 52
 
53
-     /**
54
-     * @TODO - It should not be here.
55
-     * But its necessary since JoinedSubclassPersister#executeInserts invoke the root persister.
56
-     *
57
-     * Gets the INSERT SQL used by the persister to persist a new entity.
58
-     *
59
-     * @return string
60
-     */
53
+        /**
54
+         * @TODO - It should not be here.
55
+         * But its necessary since JoinedSubclassPersister#executeInserts invoke the root persister.
56
+         *
57
+         * Gets the INSERT SQL used by the persister to persist a new entity.
58
+         *
59
+         * @return string
60
+         */
61 61
     public function getInsertSQL();
62 62
 
63 63
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/SingleTablePersister.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
         $rootClass  = $this->em->getClassMetadata($this->class->rootEntityName);
58 58
         $tableAlias = $this->getSQLTableAlias($rootClass->name);
59 59
 
60
-         // Append discriminator column
60
+            // Append discriminator column
61 61
         $discrColumn     = $this->class->discriminatorColumn['name'];
62 62
         $discrColumnType = $this->class->discriminatorColumn['type'];
63 63
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $discrColumn     = $this->class->discriminatorColumn['name'];
62 62
         $discrColumnType = $this->class->discriminatorColumn['type'];
63 63
 
64
-        $columnList[]   = $tableAlias . '.' . $discrColumn;
64
+        $columnList[] = $tableAlias.'.'.$discrColumn;
65 65
 
66 66
         $resultColumnName = $this->platform->getSQLResultCasing($discrColumn);
67 67
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
             $conditionSql .= ' AND ';
143 143
         }
144 144
 
145
-        return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL();
145
+        return $conditionSql.$this->getSelectConditionDiscriminatorValueSQL();
146 146
     }
147 147
 
148 148
     /**
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
             $conditionSql .= ' AND ';
157 157
         }
158 158
 
159
-        return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL();
159
+        return $conditionSql.$this->getSelectConditionDiscriminatorValueSQL();
160 160
     }
161 161
 
162 162
     /**
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         $discColumn = $this->class->discriminatorColumn['name'];
181 181
         $tableAlias = $this->getSQLTableAlias($this->class->name);
182 182
 
183
-        return $tableAlias . '.' . $discColumn . ' IN (' . $values . ')';
183
+        return $tableAlias.'.'.$discColumn.' IN ('.$values.')';
184 184
     }
185 185
 
186 186
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/AST/ASTException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,6 +33,6 @@
 block discarded – undo
33 33
      */
34 34
     public static function noDispatchForNode($node)
35 35
     {
36
-        return new self("Double-dispatch for node " . get_class($node) . " is not supported.");
36
+        return new self("Double-dispatch for node ".get_class($node)." is not supported.");
37 37
     }
38 38
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/AST/Node.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             foreach ($props as $name => $prop) {
75 75
                 $ident += 4;
76 76
                 $str .= str_repeat(' ', $ident) . '"' . $name . '": '
77
-                      . $this->dump($prop) . ',' . PHP_EOL;
77
+                        . $this->dump($prop) . ',' . PHP_EOL;
78 78
                 $ident -= 4;
79 79
             }
80 80
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
             foreach ($obj as $k => $v) {
88 88
                 $str .= PHP_EOL . str_repeat(' ', $ident) . '"'
89
-                      . $k . '" => ' . $this->dump($v) . ',';
89
+                        . $k . '" => ' . $this->dump($v) . ',';
90 90
                 $some = true;
91 91
             }
92 92
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -68,32 +68,32 @@
 block discarded – undo
68 68
         $str = '';
69 69
 
70 70
         if ($obj instanceof Node) {
71
-            $str .= get_class($obj) . '(' . PHP_EOL;
71
+            $str .= get_class($obj).'('.PHP_EOL;
72 72
             $props = get_object_vars($obj);
73 73
 
74 74
             foreach ($props as $name => $prop) {
75 75
                 $ident += 4;
76
-                $str .= str_repeat(' ', $ident) . '"' . $name . '": '
77
-                      . $this->dump($prop) . ',' . PHP_EOL;
76
+                $str .= str_repeat(' ', $ident).'"'.$name.'": '
77
+                      . $this->dump($prop).','.PHP_EOL;
78 78
                 $ident -= 4;
79 79
             }
80 80
 
81
-            $str .= str_repeat(' ', $ident) . ')';
81
+            $str .= str_repeat(' ', $ident).')';
82 82
         } else if (is_array($obj)) {
83 83
             $ident += 4;
84 84
             $str .= 'array(';
85 85
             $some = false;
86 86
 
87 87
             foreach ($obj as $k => $v) {
88
-                $str .= PHP_EOL . str_repeat(' ', $ident) . '"'
89
-                      . $k . '" => ' . $this->dump($v) . ',';
88
+                $str .= PHP_EOL.str_repeat(' ', $ident).'"'
89
+                      . $k.'" => '.$this->dump($v).',';
90 90
                 $some = true;
91 91
             }
92 92
 
93 93
             $ident -= 4;
94
-            $str .= ($some ? PHP_EOL . str_repeat(' ', $ident) : '') . ')';
94
+            $str .= ($some ? PHP_EOL.str_repeat(' ', $ident) : '').')';
95 95
         } else if (is_object($obj)) {
96
-            $str .= 'instanceof(' . get_class($obj) . ')';
96
+            $str .= 'instanceof('.get_class($obj).')';
97 97
         } else {
98 98
             $str .= var_export($obj, true);
99 99
         }
Please login to merge, or discard this patch.