Completed
Pull Request — master (#5800)
by Herberto
10:37
created
lib/Doctrine/ORM/Id/TableGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
                         $this->_tableName, $this->_sequenceName, $this->_allocationSize
93 93
                     );
94 94
 
95
-                    if ($conn->executeUpdate($updateSql, array(1 => $currentLevel, 2 => $currentLevel+1)) !== 1) {
95
+                    if ($conn->executeUpdate($updateSql, array(1 => $currentLevel, 2 => $currentLevel + 1)) !== 1) {
96 96
                         // no affected rows, concurrency issue, throw exception
97 97
                     }
98 98
                 } else {
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/SqlValueVisitor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     /**
40 40
      * @var array
41 41
      */
42
-    private $types  = array();
42
+    private $types = array();
43 43
 
44 44
     /**
45 45
      * Converts a comparison expression into the target query language output.
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   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -348,9 +348,9 @@  discard block
 block discarded – undo
348 348
         $columnName   = $this->quoteStrategy->getColumnName($versionField, $versionedClass, $this->platform);
349 349
 
350 350
         // FIXME: Order with composite keys might not be correct
351
-        $sql = 'SELECT ' . $columnName
352
-             . ' FROM '  . $tableName
353
-             . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
351
+        $sql = 'SELECT '.$columnName
352
+             . ' FROM '.$tableName
353
+             . ' WHERE '.implode(' = ? AND ', $identifier).' = ?';
354 354
 
355 355
         $flatId = $this->identifierFlattener->flattenIdentifier($versionedClass, $id);
356 356
 
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
             }
427 427
 
428 428
             $params[]   = $value;
429
-            $set[]      = $column . ' = ' . $placeholder;
429
+            $set[]      = $column.' = '.$placeholder;
430 430
             $types[]    = $this->columnTypes[$columnName];
431 431
         }
432 432
 
@@ -474,18 +474,18 @@  discard block
 block discarded – undo
474 474
                 case Type::SMALLINT:
475 475
                 case Type::INTEGER:
476 476
                 case Type::BIGINT:
477
-                    $set[] = $versionColumn . ' = ' . $versionColumn . ' + 1';
477
+                    $set[] = $versionColumn.' = '.$versionColumn.' + 1';
478 478
                     break;
479 479
 
480 480
                 case Type::DATETIME:
481
-                    $set[] = $versionColumn . ' = CURRENT_TIMESTAMP';
481
+                    $set[] = $versionColumn.' = CURRENT_TIMESTAMP';
482 482
                     break;
483 483
             }
484 484
         }
485 485
 
486
-        $sql = 'UPDATE ' . $quotedTableName
487
-             . ' SET ' . implode(', ', $set)
488
-             . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
486
+        $sql = 'UPDATE '.$quotedTableName
487
+             . ' SET '.implode(', ', $set)
488
+             . ' WHERE '.implode(' = ? AND ', $where).' = ?';
489 489
 
490 490
         $result = $this->conn->executeUpdate($sql, $params, $types);
491 491
 
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
 
529 529
 
530 530
             if ($selfReferential) {
531
-                $otherColumns = (! $mapping['isOwningSide'])
531
+                $otherColumns = ( ! $mapping['isOwningSide'])
532 532
                     ? $association['joinTable']['joinColumns']
533 533
                     : $association['joinTable']['inverseJoinColumns'];
534 534
             }
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
         $tableName  = $this->quoteStrategy->getTableName($class, $this->platform);
567 567
         $idColumns  = $this->quoteStrategy->getIdentifierColumnNames($class, $this->platform);
568 568
         $id         = array_combine($idColumns, $identifier);
569
-        $types      = array_map(function ($identifier) use ($class, $self) {
569
+        $types      = array_map(function($identifier) use ($class, $self) {
570 570
             if (isset($class->fieldMappings[$identifier])) {
571 571
                 return $class->fieldMappings[$identifier]['type'];
572 572
             }
@@ -793,7 +793,7 @@  discard block
 block discarded – undo
793 793
 
794 794
             // unset the old value and set the new sql aliased value here. By definition
795 795
             // unset($identifier[$targetKeyColumn] works here with how UnitOfWork::createEntity() calls this method.
796
-            $identifier[$this->getSQLTableAlias($targetClass->name) . "." . $targetKeyColumn] =
796
+            $identifier[$this->getSQLTableAlias($targetClass->name).".".$targetKeyColumn] =
797 797
                 $sourceClass->reflFields[$sourceClass->fieldNames[$sourceKeyColumn]]->getValue($sourceEntity);
798 798
 
799 799
             unset($identifier[$targetKeyColumn]);
@@ -918,7 +918,7 @@  discard block
 block discarded – undo
918 918
             return false;
919 919
         }
920 920
         
921
-        if (! isset($classMetadata->customCollectionClassName)) {
921
+        if ( ! isset($classMetadata->customCollectionClassName)) {
922 922
             throw new ORMInvalidArgumentException(
923 923
                 'Doctrine is configured to return a collection, '
924 924
                 . 'but there is no collection class specified for entity '
@@ -1056,7 +1056,7 @@  discard block
 block discarded – undo
1056 1056
                     );
1057 1057
             }
1058 1058
 
1059
-            $criteria[$quotedJoinTable . '.' . $quotedKeyColumn] = $value;
1059
+            $criteria[$quotedJoinTable.'.'.$quotedKeyColumn] = $value;
1060 1060
             $parameters[] = array(
1061 1061
                 'value' => $value,
1062 1062
                 'field' => $field,
@@ -1099,11 +1099,11 @@  discard block
 block discarded – undo
1099 1099
 
1100 1100
         switch ($lockMode) {
1101 1101
             case LockMode::PESSIMISTIC_READ:
1102
-                $lockSql = ' ' . $this->platform->getReadLockSql();
1102
+                $lockSql = ' '.$this->platform->getReadLockSql();
1103 1103
                 break;
1104 1104
 
1105 1105
             case LockMode::PESSIMISTIC_WRITE:
1106
-                $lockSql = ' ' . $this->platform->getWriteLockSql();
1106
+                $lockSql = ' '.$this->platform->getWriteLockSql();
1107 1107
                 break;
1108 1108
         }
1109 1109
 
@@ -1114,14 +1114,14 @@  discard block
 block discarded – undo
1114 1114
 
1115 1115
         if ('' !== $filterSql) {
1116 1116
             $conditionSql = $conditionSql
1117
-                ? $conditionSql . ' AND ' . $filterSql
1117
+                ? $conditionSql.' AND '.$filterSql
1118 1118
                 : $filterSql;
1119 1119
         }
1120 1120
 
1121
-        $select = 'SELECT ' . $columnList;
1122
-        $from   = ' FROM ' . $tableName . ' '. $tableAlias;
1123
-        $join   = $this->currentPersisterContext->selectJoinSql . $joinSql;
1124
-        $where  = ($conditionSql ? ' WHERE ' . $conditionSql : '');
1121
+        $select = 'SELECT '.$columnList;
1122
+        $from   = ' FROM '.$tableName.' '.$tableAlias;
1123
+        $join   = $this->currentPersisterContext->selectJoinSql.$joinSql;
1124
+        $where  = ($conditionSql ? ' WHERE '.$conditionSql : '');
1125 1125
         $lock   = $this->platform->appendLockHint($from, $lockMode);
1126 1126
         $query  = $select
1127 1127
             . $lock
@@ -1129,7 +1129,7 @@  discard block
 block discarded – undo
1129 1129
             . $where
1130 1130
             . $orderBySql;
1131 1131
 
1132
-        return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql;
1132
+        return $this->platform->modifyLimitQuery($query, $limit, $offset).$lockSql;
1133 1133
     }
1134 1134
 
1135 1135
     /**
@@ -1148,13 +1148,13 @@  discard block
 block discarded – undo
1148 1148
 
1149 1149
         if ('' !== $filterSql) {
1150 1150
             $conditionSql = $conditionSql
1151
-                ? $conditionSql . ' AND ' . $filterSql
1151
+                ? $conditionSql.' AND '.$filterSql
1152 1152
                 : $filterSql;
1153 1153
         }
1154 1154
 
1155 1155
         $sql = 'SELECT COUNT(*) '
1156
-            . 'FROM ' . $tableName . ' ' . $tableAlias
1157
-            . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql);
1156
+            . 'FROM '.$tableName.' '.$tableAlias
1157
+            . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql);
1158 1158
 
1159 1159
         return $sql;
1160 1160
     }
@@ -1187,7 +1187,7 @@  discard block
 block discarded – undo
1187 1187
                     : $baseTableAlias;
1188 1188
 
1189 1189
                 $columnName    = $this->quoteStrategy->getColumnName($fieldName, $this->class, $this->platform);
1190
-                $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation;
1190
+                $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation;
1191 1191
 
1192 1192
                 continue;
1193 1193
             }
@@ -1204,7 +1204,7 @@  discard block
 block discarded – undo
1204 1204
 
1205 1205
                 foreach ($this->class->associationMappings[$fieldName]['joinColumns'] as $joinColumn) {
1206 1206
                     $columnName    = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1207
-                    $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation;
1207
+                    $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation;
1208 1208
                 }
1209 1209
 
1210 1210
                 continue;
@@ -1213,7 +1213,7 @@  discard block
 block discarded – undo
1213 1213
             throw ORMException::unrecognizedField($fieldName);
1214 1214
         }
1215 1215
 
1216
-        return ' ORDER BY ' . implode(', ', $orderByList);
1216
+        return ' ORDER BY '.implode(', ', $orderByList);
1217 1217
     }
1218 1218
 
1219 1219
     /**
@@ -1241,8 +1241,8 @@  discard block
 block discarded – undo
1241 1241
             $columnList[] = $this->getSelectColumnSQL($field, $this->class);
1242 1242
         }
1243 1243
 
1244
-        $this->currentPersisterContext->selectJoinSql    = '';
1245
-        $eagerAliasCounter      = 0;
1244
+        $this->currentPersisterContext->selectJoinSql = '';
1245
+        $eagerAliasCounter = 0;
1246 1246
 
1247 1247
         foreach ($this->class->associationMappings as $assocField => $assoc) {
1248 1248
             $assocColumnSQL = $this->getSelectColumnAssociationSQL($assocField, $assoc, $this->class);
@@ -1268,7 +1268,7 @@  discard block
 block discarded – undo
1268 1268
                 continue; // now this is why you shouldn't use inheritance
1269 1269
             }
1270 1270
 
1271
-            $assocAlias = 'e' . ($eagerAliasCounter++);
1271
+            $assocAlias = 'e'.($eagerAliasCounter++);
1272 1272
             $this->currentPersisterContext->rsm->addJoinedEntityResult($assoc['targetEntity'], $assocAlias, 'r', $assocField);
1273 1273
 
1274 1274
             foreach ($eagerEntity->fieldNames as $field) {
@@ -1301,14 +1301,14 @@  discard block
 block discarded – undo
1301 1301
             $joinTableName  = $this->quoteStrategy->getTableName($eagerEntity, $this->platform);
1302 1302
 
1303 1303
             if ($assoc['isOwningSide']) {
1304
-                $tableAlias           = $this->getSQLTableAlias($association['targetEntity'], $assocAlias);
1305
-                $this->currentPersisterContext->selectJoinSql .= ' ' . $this->getJoinSQLForJoinColumns($association['joinColumns']);
1304
+                $tableAlias = $this->getSQLTableAlias($association['targetEntity'], $assocAlias);
1305
+                $this->currentPersisterContext->selectJoinSql .= ' '.$this->getJoinSQLForJoinColumns($association['joinColumns']);
1306 1306
 
1307 1307
                 foreach ($association['joinColumns'] as $joinColumn) {
1308 1308
                     $sourceCol       = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1309 1309
                     $targetCol       = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform);
1310 1310
                     $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity'])
1311
-                                        . '.' . $sourceCol . ' = ' . $tableAlias . '.' . $targetCol;
1311
+                                        . '.'.$sourceCol.' = '.$tableAlias.'.'.$targetCol;
1312 1312
                 }
1313 1313
 
1314 1314
                 // Add filter SQL
@@ -1324,12 +1324,12 @@  discard block
 block discarded – undo
1324 1324
                     $sourceCol       = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1325 1325
                     $targetCol       = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform);
1326 1326
 
1327
-                    $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity'], $assocAlias) . '.' . $sourceCol . ' = '
1328
-                        . $this->getSQLTableAlias($association['targetEntity']) . '.' . $targetCol;
1327
+                    $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity'], $assocAlias).'.'.$sourceCol.' = '
1328
+                        . $this->getSQLTableAlias($association['targetEntity']).'.'.$targetCol;
1329 1329
                 }
1330 1330
             }
1331 1331
 
1332
-            $this->currentPersisterContext->selectJoinSql .= ' ' . $joinTableName . ' ' . $joinTableAlias . ' ON ';
1332
+            $this->currentPersisterContext->selectJoinSql .= ' '.$joinTableName.' '.$joinTableAlias.' ON ';
1333 1333
             $this->currentPersisterContext->selectJoinSql .= implode(' AND ', $joinCondition);
1334 1334
         }
1335 1335
 
@@ -1350,7 +1350,7 @@  discard block
 block discarded – undo
1350 1350
      */
1351 1351
     protected function getSelectColumnAssociationSQL($field, $assoc, ClassMetadata $class, $alias = 'r')
1352 1352
     {
1353
-        if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) ) {
1353
+        if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE)) {
1354 1354
             return '';
1355 1355
         }
1356 1356
 
@@ -1399,10 +1399,10 @@  discard block
 block discarded – undo
1399 1399
         foreach ($joinColumns as $joinColumn) {
1400 1400
             $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1401 1401
             $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform);
1402
-            $conditions[]       = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableName . '.' . $quotedSourceColumn;
1402
+            $conditions[]       = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableName.'.'.$quotedSourceColumn;
1403 1403
         }
1404 1404
 
1405
-        return ' INNER JOIN ' . $joinTableName . ' ON ' . implode(' AND ', $conditions);
1405
+        return ' INNER JOIN '.$joinTableName.' ON '.implode(' AND ', $conditions);
1406 1406
     }
1407 1407
 
1408 1408
     /**
@@ -1502,7 +1502,7 @@  discard block
 block discarded – undo
1502 1502
      */
1503 1503
     protected function getSelectColumnSQL($field, ClassMetadata $class, $alias = 'r')
1504 1504
     {
1505
-        $root         = $alias == 'r' ? '' : $alias ;
1505
+        $root         = $alias == 'r' ? '' : $alias;
1506 1506
         $tableAlias   = $this->getSQLTableAlias($class->name, $root);
1507 1507
         $fieldMapping = $class->fieldMappings[$field];
1508 1508
         $sql          = sprintf('%s.%s', $tableAlias, $this->quoteStrategy->getColumnName($field, $class, $this->platform));
@@ -1515,7 +1515,7 @@  discard block
 block discarded – undo
1515 1515
             $sql  = $type->convertToPHPValueSQL($sql, $this->platform);
1516 1516
         }
1517 1517
 
1518
-        return $sql . ' AS ' . $columnAlias;
1518
+        return $sql.' AS '.$columnAlias;
1519 1519
     }
1520 1520
 
1521 1521
     /**
@@ -1531,14 +1531,14 @@  discard block
 block discarded – undo
1531 1531
     protected function getSQLTableAlias($className, $assocName = '')
1532 1532
     {
1533 1533
         if ($assocName) {
1534
-            $className .= '#' . $assocName;
1534
+            $className .= '#'.$assocName;
1535 1535
         }
1536 1536
 
1537 1537
         if (isset($this->currentPersisterContext->sqlTableAliases[$className])) {
1538 1538
             return $this->currentPersisterContext->sqlTableAliases[$className];
1539 1539
         }
1540 1540
 
1541
-        $tableAlias = 't' . $this->currentPersisterContext->sqlAliasCounter++;
1541
+        $tableAlias = 't'.$this->currentPersisterContext->sqlAliasCounter++;
1542 1542
 
1543 1543
         $this->currentPersisterContext->sqlTableAliases[$className] = $tableAlias;
1544 1544
 
@@ -1565,7 +1565,7 @@  discard block
 block discarded – undo
1565 1565
         }
1566 1566
 
1567 1567
         $lock  = $this->getLockTablesSql($lockMode);
1568
-        $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ';
1568
+        $where = ($conditionSql ? ' WHERE '.$conditionSql : '').' ';
1569 1569
         $sql = 'SELECT 1 '
1570 1570
              . $lock
1571 1571
              . $where
@@ -1587,7 +1587,7 @@  discard block
 block discarded – undo
1587 1587
     {
1588 1588
         return $this->platform->appendLockHint(
1589 1589
             'FROM '
1590
-            . $this->quoteStrategy->getTableName($this->class, $this->platform) . ' '
1590
+            . $this->quoteStrategy->getTableName($this->class, $this->platform).' '
1591 1591
             . $this->getSQLTableAlias($this->class->name),
1592 1592
             $lockMode
1593 1593
         );
@@ -1639,19 +1639,19 @@  discard block
 block discarded – undo
1639 1639
 
1640 1640
             if (null !== $comparison) {
1641 1641
                 // special case null value handling
1642
-                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null ===$value) {
1643
-                    $selectedColumns[] = $column . ' IS NULL';
1642
+                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null === $value) {
1643
+                    $selectedColumns[] = $column.' IS NULL';
1644 1644
 
1645 1645
                     continue;
1646 1646
                 }
1647 1647
 
1648 1648
                 if ($comparison === Comparison::NEQ && null === $value) {
1649
-                    $selectedColumns[] = $column . ' IS NOT NULL';
1649
+                    $selectedColumns[] = $column.' IS NOT NULL';
1650 1650
 
1651 1651
                     continue;
1652 1652
                 }
1653 1653
 
1654
-                $selectedColumns[] = $column . ' ' . sprintf(self::$comparisonMap[$comparison], $placeholder);
1654
+                $selectedColumns[] = $column.' '.sprintf(self::$comparisonMap[$comparison], $placeholder);
1655 1655
 
1656 1656
                 continue;
1657 1657
             }
@@ -1699,7 +1699,7 @@  discard block
 block discarded – undo
1699 1699
                 ? $this->class->fieldMappings[$field]['inherited']
1700 1700
                 : $this->class->name;
1701 1701
 
1702
-            return array($this->getSQLTableAlias($className) . '.' . $this->quoteStrategy->getColumnName($field, $this->class, $this->platform));
1702
+            return array($this->getSQLTableAlias($className).'.'.$this->quoteStrategy->getColumnName($field, $this->class, $this->platform));
1703 1703
         }
1704 1704
 
1705 1705
         if (isset($this->class->associationMappings[$field])) {
@@ -1720,7 +1720,7 @@  discard block
 block discarded – undo
1720 1720
 
1721 1721
 
1722 1722
                 foreach ($joinColumns as $joinColumn) {
1723
-                    $columns[] = $joinTableName . '.' . $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform);
1723
+                    $columns[] = $joinTableName.'.'.$this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform);
1724 1724
                 }
1725 1725
 
1726 1726
             } else {
@@ -1728,12 +1728,12 @@  discard block
 block discarded – undo
1728 1728
                     throw ORMException::invalidFindByInverseAssociation($this->class->name, $field);
1729 1729
                 }
1730 1730
 
1731
-                $className  = (isset($association['inherited']))
1731
+                $className = (isset($association['inherited']))
1732 1732
                     ? $association['inherited']
1733 1733
                     : $this->class->name;
1734 1734
 
1735 1735
                 foreach ($association['joinColumns'] as $joinColumn) {
1736
-                    $columns[] = $this->getSQLTableAlias($className) . '.' . $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1736
+                    $columns[] = $this->getSQLTableAlias($className).'.'.$this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1737 1737
                 }
1738 1738
             }
1739 1739
             return $columns;
@@ -1825,7 +1825,7 @@  discard block
 block discarded – undo
1825 1825
                     $value = $value[$this->em->getClassMetadata($sourceClass->associationMappings[$field]['targetEntity'])->identifier[0]];
1826 1826
                 }
1827 1827
 
1828
-                $criteria[$tableAlias . "." . $targetKeyColumn] = $value;
1828
+                $criteria[$tableAlias.".".$targetKeyColumn] = $value;
1829 1829
                 $parameters[]                                   = array(
1830 1830
                     'value' => $value,
1831 1831
                     'field' => $field,
@@ -1838,7 +1838,7 @@  discard block
 block discarded – undo
1838 1838
             $field = $sourceClass->fieldNames[$sourceKeyColumn];
1839 1839
             $value = $sourceClass->reflFields[$field]->getValue($sourceEntity);
1840 1840
 
1841
-            $criteria[$tableAlias . "." . $targetKeyColumn] = $value;
1841
+            $criteria[$tableAlias.".".$targetKeyColumn] = $value;
1842 1842
             $parameters[] = array(
1843 1843
                 'value' => $value,
1844 1844
                 'field' => $field,
@@ -1925,7 +1925,7 @@  discard block
 block discarded – undo
1925 1925
                 $assoc = $class->associationMappings[$field];
1926 1926
                 $class = $this->em->getClassMetadata($assoc['targetEntity']);
1927 1927
 
1928
-                if (! $assoc['isOwningSide']) {
1928
+                if ( ! $assoc['isOwningSide']) {
1929 1929
                     $assoc = $class->associationMappings[$assoc['mappedBy']];
1930 1930
                     $class = $this->em->getClassMetadata($assoc['targetEntity']);
1931 1931
                 }
@@ -1934,7 +1934,7 @@  discard block
 block discarded – undo
1934 1934
                     ? $assoc['relationToTargetKeyColumns']
1935 1935
                     : $assoc['sourceToTargetKeyColumns'];
1936 1936
 
1937
-                foreach ($columns as $column){
1937
+                foreach ($columns as $column) {
1938 1938
                     $types[] = PersisterHelper::getTypeOfColumn($column, $class, $this->em);
1939 1939
                 }
1940 1940
                 break;
@@ -1945,7 +1945,7 @@  discard block
 block discarded – undo
1945 1945
         }
1946 1946
 
1947 1947
         if (is_array($value)) {
1948
-            return array_map(function ($type) {
1948
+            return array_map(function($type) {
1949 1949
                 $type = Type::getType($type);
1950 1950
 
1951 1951
                 return $type->getBindingType() + Connection::ARRAY_PARAM_OFFSET;
@@ -2021,12 +2021,12 @@  discard block
 block discarded – undo
2021 2021
 
2022 2022
         $sql = 'SELECT 1 '
2023 2023
              . $this->getLockTablesSql(null)
2024
-             . ' WHERE ' . $this->getSelectConditionSQL($criteria);
2024
+             . ' WHERE '.$this->getSelectConditionSQL($criteria);
2025 2025
 
2026 2026
         list($params, $types) = $this->expandParameters($criteria);
2027 2027
 
2028 2028
         if (null !== $extraConditions) {
2029
-            $sql                                 .= ' AND ' . $this->getSelectConditionCriteriaSQL($extraConditions);
2029
+            $sql                                 .= ' AND '.$this->getSelectConditionCriteriaSQL($extraConditions);
2030 2030
             list($criteriaParams, $criteriaTypes) = $this->expandCriteriaParameters($extraConditions);
2031 2031
 
2032 2032
             $params = array_merge($params, $criteriaParams);
@@ -2034,7 +2034,7 @@  discard block
 block discarded – undo
2034 2034
         }
2035 2035
 
2036 2036
         if ($filterSql = $this->generateFilterConditionSQL($this->class, $alias)) {
2037
-            $sql .= ' AND ' . $filterSql;
2037
+            $sql .= ' AND '.$filterSql;
2038 2038
         }
2039 2039
 
2040 2040
         return (bool) $this->conn->fetchColumn($sql, $params, 0, $types);
@@ -2081,13 +2081,13 @@  discard block
 block discarded – undo
2081 2081
 
2082 2082
         foreach ($this->em->getFilters()->getEnabledFilters() as $filter) {
2083 2083
             if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
2084
-                $filterClauses[] = '(' . $filterExpr . ')';
2084
+                $filterClauses[] = '('.$filterExpr.')';
2085 2085
             }
2086 2086
         }
2087 2087
 
2088 2088
         $sql = implode(' AND ', $filterClauses);
2089 2089
 
2090
-        return $sql ? "(" . $sql . ")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
2090
+        return $sql ? "(".$sql.")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
2091 2091
     }
2092 2092
 
2093 2093
     /**
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/Persisters/Entity/AbstractEntityInheritancePersister.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             $sql    = $type->convertToPHPValueSQL($sql, $this->platform);
77 77
         }
78 78
 
79
-        return $sql . ' AS ' . $columnAlias;
79
+        return $sql.' AS '.$columnAlias;
80 80
     }
81 81
 
82 82
     /**
@@ -93,6 +93,6 @@  discard block
 block discarded – undo
93 93
 
94 94
         $this->currentPersisterContext->rsm->addMetaResult('r', $columnAlias, $joinColumnName, false, $type);
95 95
 
96
-        return $tableAlias . '.' . $joinColumnName . ' AS ' . $columnAlias;
96
+        return $tableAlias.'.'.$joinColumnName.' AS '.$columnAlias;
97 97
     }
98 98
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Configuration.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@
 block discarded – undo
151 151
      */
152 152
     public function newDefaultAnnotationDriver($paths = array(), $useSimpleAnnotationReader = true)
153 153
     {
154
-        AnnotationRegistry::registerFile(__DIR__ . '/Mapping/Driver/DoctrineAnnotations.php');
154
+        AnnotationRegistry::registerFile(__DIR__.'/Mapping/Driver/DoctrineAnnotations.php');
155 155
 
156 156
         if ($useSimpleAnnotationReader) {
157 157
             // Register the ORM Annotations in the AnnotationRegistry
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -918,7 +918,7 @@
 block discarded – undo
918 918
      * @since 2.5
919 919
      *
920 920
      * @param string $name  The name of the hint.
921
-     * @param mixed  $value The value of the hint.
921
+     * @param string  $value The value of the hint.
922 922
      */
923 923
     public function setDefaultQueryHint($name, $value)
924 924
     {
Please login to merge, or discard this patch.