Completed
Pull Request — master (#6496)
by Artem
14:32
created
lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -341,8 +341,8 @@  discard block
 block discarded – undo
341 341
 
342 342
         // FIXME: Order with composite keys might not be correct
343 343
         $sql = 'SELECT ' . $columnName
344
-             . ' FROM '  . $tableName
345
-             . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
344
+                . ' FROM '  . $tableName
345
+                . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
346 346
 
347 347
         $types = [];
348 348
         foreach ($id as $field => $value) {
@@ -483,8 +483,8 @@  discard block
 block discarded – undo
483 483
         }
484 484
 
485 485
         $sql = 'UPDATE ' . $quotedTableName
486
-             . ' SET ' . implode(', ', $set)
487
-             . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
486
+                . ' SET ' . implode(', ', $set)
487
+                . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
488 488
 
489 489
         $result = $this->conn->executeUpdate($sql, $params, $types);
490 490
 
@@ -1539,9 +1539,9 @@  discard block
 block discarded – undo
1539 1539
         $lock  = $this->getLockTablesSql($lockMode);
1540 1540
         $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ';
1541 1541
         $sql = 'SELECT 1 '
1542
-             . $lock
1543
-             . $where
1544
-             . $lockSql;
1542
+                . $lock
1543
+                . $where
1544
+                . $lockSql;
1545 1545
 
1546 1546
         list($params, $types) = $this->expandParameters($criteria);
1547 1547
 
@@ -1992,8 +1992,8 @@  discard block
 block discarded – undo
1992 1992
         $alias = $this->getSQLTableAlias($this->class->name);
1993 1993
 
1994 1994
         $sql = 'SELECT 1 '
1995
-             . $this->getLockTablesSql(null)
1996
-             . ' WHERE ' . $this->getSelectConditionSQL($criteria);
1995
+                . $this->getLockTablesSql(null)
1996
+                . ' WHERE ' . $this->getSelectConditionSQL($criteria);
1997 1997
 
1998 1998
         list($params, $types) = $this->expandParameters($criteria);
1999 1999
 
@@ -2023,9 +2023,9 @@  discard block
 block discarded – undo
2023 2023
     {
2024 2024
         // if one of the join columns is nullable, return left join
2025 2025
         foreach ($joinColumns as $joinColumn) {
2026
-             if ( ! isset($joinColumn['nullable']) || $joinColumn['nullable']) {
2027
-                 return 'LEFT JOIN';
2028
-             }
2026
+                if ( ! isset($joinColumn['nullable']) || $joinColumn['nullable']) {
2027
+                    return 'LEFT JOIN';
2028
+                }
2029 2029
         }
2030 2030
 
2031 2031
         return 'INNER JOIN';
Please login to merge, or discard this patch.
Spacing   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -340,9 +340,9 @@  discard block
 block discarded – undo
340 340
         $columnName   = $this->quoteStrategy->getColumnName($versionField, $versionedClass, $this->platform);
341 341
 
342 342
         // FIXME: Order with composite keys might not be correct
343
-        $sql = 'SELECT ' . $columnName
344
-             . ' FROM '  . $tableName
345
-             . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
343
+        $sql = 'SELECT '.$columnName
344
+             . ' FROM '.$tableName
345
+             . ' WHERE '.implode(' = ? AND ', $identifier).' = ?';
346 346
 
347 347
         $types = [];
348 348
         foreach ($id as $field => $value) {
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
             }
426 426
 
427 427
             $params[]   = $value;
428
-            $set[]      = $column . ' = ' . $placeholder;
428
+            $set[]      = $column.' = '.$placeholder;
429 429
             $types[]    = $this->columnTypes[$columnName];
430 430
         }
431 431
 
@@ -473,18 +473,18 @@  discard block
 block discarded – undo
473 473
                 case Type::SMALLINT:
474 474
                 case Type::INTEGER:
475 475
                 case Type::BIGINT:
476
-                    $set[] = $versionColumn . ' = ' . $versionColumn . ' + 1';
476
+                    $set[] = $versionColumn.' = '.$versionColumn.' + 1';
477 477
                     break;
478 478
 
479 479
                 case Type::DATETIME:
480
-                    $set[] = $versionColumn . ' = CURRENT_TIMESTAMP';
480
+                    $set[] = $versionColumn.' = CURRENT_TIMESTAMP';
481 481
                     break;
482 482
             }
483 483
         }
484 484
 
485
-        $sql = 'UPDATE ' . $quotedTableName
486
-             . ' SET ' . implode(', ', $set)
487
-             . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
485
+        $sql = 'UPDATE '.$quotedTableName
486
+             . ' SET '.implode(', ', $set)
487
+             . ' WHERE '.implode(' = ? AND ', $where).' = ?';
488 488
 
489 489
         $result = $this->conn->executeUpdate($sql, $params, $types);
490 490
 
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
 
528 528
 
529 529
             if ($selfReferential) {
530
-                $otherColumns = (! $mapping['isOwningSide'])
530
+                $otherColumns = ( ! $mapping['isOwningSide'])
531 531
                     ? $association['joinTable']['joinColumns']
532 532
                     : $association['joinTable']['inverseJoinColumns'];
533 533
             }
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
         $tableName  = $this->quoteStrategy->getTableName($class, $this->platform);
566 566
         $idColumns  = $this->quoteStrategy->getIdentifierColumnNames($class, $this->platform);
567 567
         $id         = array_combine($idColumns, $identifier);
568
-        $types      = array_map(function ($identifier) use ($class, $self) {
568
+        $types      = array_map(function($identifier) use ($class, $self) {
569 569
             if (isset($class->fieldMappings[$identifier])) {
570 570
                 return $class->fieldMappings[$identifier]['type'];
571 571
             }
@@ -1028,7 +1028,7 @@  discard block
 block discarded – undo
1028 1028
                     );
1029 1029
             }
1030 1030
 
1031
-            $criteria[$quotedJoinTable . '.' . $quotedKeyColumn] = $value;
1031
+            $criteria[$quotedJoinTable.'.'.$quotedKeyColumn] = $value;
1032 1032
             $parameters[] = [
1033 1033
                 'value' => $value,
1034 1034
                 'field' => $field,
@@ -1071,11 +1071,11 @@  discard block
 block discarded – undo
1071 1071
 
1072 1072
         switch ($lockMode) {
1073 1073
             case LockMode::PESSIMISTIC_READ:
1074
-                $lockSql = ' ' . $this->platform->getReadLockSql();
1074
+                $lockSql = ' '.$this->platform->getReadLockSql();
1075 1075
                 break;
1076 1076
 
1077 1077
             case LockMode::PESSIMISTIC_WRITE:
1078
-                $lockSql = ' ' . $this->platform->getWriteLockSql();
1078
+                $lockSql = ' '.$this->platform->getWriteLockSql();
1079 1079
                 break;
1080 1080
         }
1081 1081
 
@@ -1086,14 +1086,14 @@  discard block
 block discarded – undo
1086 1086
 
1087 1087
         if ('' !== $filterSql) {
1088 1088
             $conditionSql = $conditionSql
1089
-                ? $conditionSql . ' AND ' . $filterSql
1089
+                ? $conditionSql.' AND '.$filterSql
1090 1090
                 : $filterSql;
1091 1091
         }
1092 1092
 
1093
-        $select = 'SELECT ' . $columnList;
1094
-        $from   = ' FROM ' . $tableName . ' '. $tableAlias;
1095
-        $join   = $this->currentPersisterContext->selectJoinSql . $joinSql;
1096
-        $where  = ($conditionSql ? ' WHERE ' . $conditionSql : '');
1093
+        $select = 'SELECT '.$columnList;
1094
+        $from   = ' FROM '.$tableName.' '.$tableAlias;
1095
+        $join   = $this->currentPersisterContext->selectJoinSql.$joinSql;
1096
+        $where  = ($conditionSql ? ' WHERE '.$conditionSql : '');
1097 1097
         $lock   = $this->platform->appendLockHint($from, $lockMode);
1098 1098
         $query  = $select
1099 1099
             . $lock
@@ -1101,7 +1101,7 @@  discard block
 block discarded – undo
1101 1101
             . $where
1102 1102
             . $orderBySql;
1103 1103
 
1104
-        return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql;
1104
+        return $this->platform->modifyLimitQuery($query, $limit, $offset).$lockSql;
1105 1105
     }
1106 1106
 
1107 1107
     /**
@@ -1120,13 +1120,13 @@  discard block
 block discarded – undo
1120 1120
 
1121 1121
         if ('' !== $filterSql) {
1122 1122
             $conditionSql = $conditionSql
1123
-                ? $conditionSql . ' AND ' . $filterSql
1123
+                ? $conditionSql.' AND '.$filterSql
1124 1124
                 : $filterSql;
1125 1125
         }
1126 1126
 
1127 1127
         $sql = 'SELECT COUNT(*) '
1128
-            . 'FROM ' . $tableName . ' ' . $tableAlias
1129
-            . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql);
1128
+            . 'FROM '.$tableName.' '.$tableAlias
1129
+            . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql);
1130 1130
 
1131 1131
         return $sql;
1132 1132
     }
@@ -1159,7 +1159,7 @@  discard block
 block discarded – undo
1159 1159
                     : $baseTableAlias;
1160 1160
 
1161 1161
                 $columnName    = $this->quoteStrategy->getColumnName($fieldName, $this->class, $this->platform);
1162
-                $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation;
1162
+                $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation;
1163 1163
 
1164 1164
                 continue;
1165 1165
             }
@@ -1176,7 +1176,7 @@  discard block
 block discarded – undo
1176 1176
 
1177 1177
                 foreach ($this->class->associationMappings[$fieldName]['joinColumns'] as $joinColumn) {
1178 1178
                     $columnName    = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1179
-                    $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation;
1179
+                    $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation;
1180 1180
                 }
1181 1181
 
1182 1182
                 continue;
@@ -1185,7 +1185,7 @@  discard block
 block discarded – undo
1185 1185
             throw ORMException::unrecognizedField($fieldName);
1186 1186
         }
1187 1187
 
1188
-        return ' ORDER BY ' . implode(', ', $orderByList);
1188
+        return ' ORDER BY '.implode(', ', $orderByList);
1189 1189
     }
1190 1190
 
1191 1191
     /**
@@ -1213,8 +1213,8 @@  discard block
 block discarded – undo
1213 1213
             $columnList[] = $this->getSelectColumnSQL($field, $this->class);
1214 1214
         }
1215 1215
 
1216
-        $this->currentPersisterContext->selectJoinSql    = '';
1217
-        $eagerAliasCounter      = 0;
1216
+        $this->currentPersisterContext->selectJoinSql = '';
1217
+        $eagerAliasCounter = 0;
1218 1218
 
1219 1219
         foreach ($this->class->associationMappings as $assocField => $assoc) {
1220 1220
             $assocColumnSQL = $this->getSelectColumnAssociationSQL($assocField, $assoc, $this->class);
@@ -1240,7 +1240,7 @@  discard block
 block discarded – undo
1240 1240
                 continue; // now this is why you shouldn't use inheritance
1241 1241
             }
1242 1242
 
1243
-            $assocAlias = 'e' . ($eagerAliasCounter++);
1243
+            $assocAlias = 'e'.($eagerAliasCounter++);
1244 1244
             $this->currentPersisterContext->rsm->addJoinedEntityResult($assoc['targetEntity'], $assocAlias, 'r', $assocField);
1245 1245
 
1246 1246
             foreach ($eagerEntity->fieldNames as $field) {
@@ -1273,14 +1273,14 @@  discard block
 block discarded – undo
1273 1273
             $joinTableName  = $this->quoteStrategy->getTableName($eagerEntity, $this->platform);
1274 1274
 
1275 1275
             if ($assoc['isOwningSide']) {
1276
-                $tableAlias           = $this->getSQLTableAlias($association['targetEntity'], $assocAlias);
1277
-                $this->currentPersisterContext->selectJoinSql .= ' ' . $this->getJoinSQLForJoinColumns($association['joinColumns']);
1276
+                $tableAlias = $this->getSQLTableAlias($association['targetEntity'], $assocAlias);
1277
+                $this->currentPersisterContext->selectJoinSql .= ' '.$this->getJoinSQLForJoinColumns($association['joinColumns']);
1278 1278
 
1279 1279
                 foreach ($association['joinColumns'] as $joinColumn) {
1280 1280
                     $sourceCol       = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1281 1281
                     $targetCol       = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform);
1282 1282
                     $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity'])
1283
-                                        . '.' . $sourceCol . ' = ' . $tableAlias . '.' . $targetCol;
1283
+                                        . '.'.$sourceCol.' = '.$tableAlias.'.'.$targetCol;
1284 1284
                 }
1285 1285
 
1286 1286
                 // Add filter SQL
@@ -1296,12 +1296,12 @@  discard block
 block discarded – undo
1296 1296
                     $sourceCol       = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1297 1297
                     $targetCol       = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform);
1298 1298
 
1299
-                    $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity'], $assocAlias) . '.' . $sourceCol . ' = '
1300
-                        . $this->getSQLTableAlias($association['targetEntity']) . '.' . $targetCol;
1299
+                    $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity'], $assocAlias).'.'.$sourceCol.' = '
1300
+                        . $this->getSQLTableAlias($association['targetEntity']).'.'.$targetCol;
1301 1301
                 }
1302 1302
             }
1303 1303
 
1304
-            $this->currentPersisterContext->selectJoinSql .= ' ' . $joinTableName . ' ' . $joinTableAlias . ' ON ';
1304
+            $this->currentPersisterContext->selectJoinSql .= ' '.$joinTableName.' '.$joinTableAlias.' ON ';
1305 1305
             $this->currentPersisterContext->selectJoinSql .= implode(' AND ', $joinCondition);
1306 1306
         }
1307 1307
 
@@ -1322,7 +1322,7 @@  discard block
 block discarded – undo
1322 1322
      */
1323 1323
     protected function getSelectColumnAssociationSQL($field, $assoc, ClassMetadata $class, $alias = 'r')
1324 1324
     {
1325
-        if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) ) {
1325
+        if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE)) {
1326 1326
             return '';
1327 1327
         }
1328 1328
 
@@ -1371,10 +1371,10 @@  discard block
 block discarded – undo
1371 1371
         foreach ($joinColumns as $joinColumn) {
1372 1372
             $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1373 1373
             $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform);
1374
-            $conditions[]       = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableName . '.' . $quotedSourceColumn;
1374
+            $conditions[]       = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableName.'.'.$quotedSourceColumn;
1375 1375
         }
1376 1376
 
1377
-        return ' INNER JOIN ' . $joinTableName . ' ON ' . implode(' AND ', $conditions);
1377
+        return ' INNER JOIN '.$joinTableName.' ON '.implode(' AND ', $conditions);
1378 1378
     }
1379 1379
 
1380 1380
     /**
@@ -1453,7 +1453,7 @@  discard block
 block discarded – undo
1453 1453
                 continue;
1454 1454
             }
1455 1455
 
1456
-            if (! $this->class->isIdGeneratorIdentity() || $this->class->identifier[0] != $name) {
1456
+            if ( ! $this->class->isIdGeneratorIdentity() || $this->class->identifier[0] != $name) {
1457 1457
                 $columns[]                = $this->quoteStrategy->getColumnName($name, $this->class, $this->platform);
1458 1458
                 $this->columnTypes[$name] = $this->class->fieldMappings[$name]['type'];
1459 1459
             }
@@ -1474,7 +1474,7 @@  discard block
 block discarded – undo
1474 1474
      */
1475 1475
     protected function getSelectColumnSQL($field, ClassMetadata $class, $alias = 'r')
1476 1476
     {
1477
-        $root         = $alias == 'r' ? '' : $alias ;
1477
+        $root         = $alias == 'r' ? '' : $alias;
1478 1478
         $tableAlias   = $this->getSQLTableAlias($class->name, $root);
1479 1479
         $fieldMapping = $class->fieldMappings[$field];
1480 1480
         $sql          = sprintf('%s.%s', $tableAlias, $this->quoteStrategy->getColumnName($field, $class, $this->platform));
@@ -1487,7 +1487,7 @@  discard block
 block discarded – undo
1487 1487
             $sql  = $type->convertToPHPValueSQL($sql, $this->platform);
1488 1488
         }
1489 1489
 
1490
-        return $sql . ' AS ' . $columnAlias;
1490
+        return $sql.' AS '.$columnAlias;
1491 1491
     }
1492 1492
 
1493 1493
     /**
@@ -1503,14 +1503,14 @@  discard block
 block discarded – undo
1503 1503
     protected function getSQLTableAlias($className, $assocName = '')
1504 1504
     {
1505 1505
         if ($assocName) {
1506
-            $className .= '#' . $assocName;
1506
+            $className .= '#'.$assocName;
1507 1507
         }
1508 1508
 
1509 1509
         if (isset($this->currentPersisterContext->sqlTableAliases[$className])) {
1510 1510
             return $this->currentPersisterContext->sqlTableAliases[$className];
1511 1511
         }
1512 1512
 
1513
-        $tableAlias = 't' . $this->currentPersisterContext->sqlAliasCounter++;
1513
+        $tableAlias = 't'.$this->currentPersisterContext->sqlAliasCounter++;
1514 1514
 
1515 1515
         $this->currentPersisterContext->sqlTableAliases[$className] = $tableAlias;
1516 1516
 
@@ -1537,7 +1537,7 @@  discard block
 block discarded – undo
1537 1537
         }
1538 1538
 
1539 1539
         $lock  = $this->getLockTablesSql($lockMode);
1540
-        $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ';
1540
+        $where = ($conditionSql ? ' WHERE '.$conditionSql : '').' ';
1541 1541
         $sql = 'SELECT 1 '
1542 1542
              . $lock
1543 1543
              . $where
@@ -1559,7 +1559,7 @@  discard block
 block discarded – undo
1559 1559
     {
1560 1560
         return $this->platform->appendLockHint(
1561 1561
             'FROM '
1562
-            . $this->quoteStrategy->getTableName($this->class, $this->platform) . ' '
1562
+            . $this->quoteStrategy->getTableName($this->class, $this->platform).' '
1563 1563
             . $this->getSQLTableAlias($this->class->name),
1564 1564
             $lockMode
1565 1565
         );
@@ -1611,19 +1611,19 @@  discard block
 block discarded – undo
1611 1611
 
1612 1612
             if (null !== $comparison) {
1613 1613
                 // special case null value handling
1614
-                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null ===$value) {
1615
-                    $selectedColumns[] = $column . ' IS NULL';
1614
+                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null === $value) {
1615
+                    $selectedColumns[] = $column.' IS NULL';
1616 1616
 
1617 1617
                     continue;
1618 1618
                 }
1619 1619
 
1620 1620
                 if ($comparison === Comparison::NEQ && null === $value) {
1621
-                    $selectedColumns[] = $column . ' IS NOT NULL';
1621
+                    $selectedColumns[] = $column.' IS NOT NULL';
1622 1622
 
1623 1623
                     continue;
1624 1624
                 }
1625 1625
 
1626
-                $selectedColumns[] = $column . ' ' . sprintf(self::$comparisonMap[$comparison], $placeholder);
1626
+                $selectedColumns[] = $column.' '.sprintf(self::$comparisonMap[$comparison], $placeholder);
1627 1627
 
1628 1628
                 continue;
1629 1629
             }
@@ -1671,7 +1671,7 @@  discard block
 block discarded – undo
1671 1671
                 ? $this->class->fieldMappings[$field]['inherited']
1672 1672
                 : $this->class->name;
1673 1673
 
1674
-            return [$this->getSQLTableAlias($className) . '.' . $this->quoteStrategy->getColumnName($field, $this->class, $this->platform)];
1674
+            return [$this->getSQLTableAlias($className).'.'.$this->quoteStrategy->getColumnName($field, $this->class, $this->platform)];
1675 1675
         }
1676 1676
 
1677 1677
         if (isset($this->class->associationMappings[$field])) {
@@ -1692,7 +1692,7 @@  discard block
 block discarded – undo
1692 1692
 
1693 1693
 
1694 1694
                 foreach ($joinColumns as $joinColumn) {
1695
-                    $columns[] = $joinTableName . '.' . $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform);
1695
+                    $columns[] = $joinTableName.'.'.$this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform);
1696 1696
                 }
1697 1697
 
1698 1698
             } else {
@@ -1700,12 +1700,12 @@  discard block
 block discarded – undo
1700 1700
                     throw ORMException::invalidFindByInverseAssociation($this->class->name, $field);
1701 1701
                 }
1702 1702
 
1703
-                $className  = (isset($association['inherited']))
1703
+                $className = (isset($association['inherited']))
1704 1704
                     ? $association['inherited']
1705 1705
                     : $this->class->name;
1706 1706
 
1707 1707
                 foreach ($association['joinColumns'] as $joinColumn) {
1708
-                    $columns[] = $this->getSQLTableAlias($className) . '.' . $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1708
+                    $columns[] = $this->getSQLTableAlias($className).'.'.$this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1709 1709
                 }
1710 1710
             }
1711 1711
             return $columns;
@@ -1797,7 +1797,7 @@  discard block
 block discarded – undo
1797 1797
                     $value = $value[$this->em->getClassMetadata($sourceClass->associationMappings[$field]['targetEntity'])->identifier[0]];
1798 1798
                 }
1799 1799
 
1800
-                $criteria[$tableAlias . "." . $targetKeyColumn] = $value;
1800
+                $criteria[$tableAlias.".".$targetKeyColumn] = $value;
1801 1801
                 $parameters[]                                   = [
1802 1802
                     'value' => $value,
1803 1803
                     'field' => $field,
@@ -1810,7 +1810,7 @@  discard block
 block discarded – undo
1810 1810
             $field = $sourceClass->fieldNames[$sourceKeyColumn];
1811 1811
             $value = $sourceClass->reflFields[$field]->getValue($sourceEntity);
1812 1812
 
1813
-            $criteria[$tableAlias . "." . $targetKeyColumn] = $value;
1813
+            $criteria[$tableAlias.".".$targetKeyColumn] = $value;
1814 1814
             $parameters[] = [
1815 1815
                 'value' => $value,
1816 1816
                 'field' => $field,
@@ -1897,7 +1897,7 @@  discard block
 block discarded – undo
1897 1897
                 $assoc = $class->associationMappings[$field];
1898 1898
                 $class = $this->em->getClassMetadata($assoc['targetEntity']);
1899 1899
 
1900
-                if (! $assoc['isOwningSide']) {
1900
+                if ( ! $assoc['isOwningSide']) {
1901 1901
                     $assoc = $class->associationMappings[$assoc['mappedBy']];
1902 1902
                     $class = $this->em->getClassMetadata($assoc['targetEntity']);
1903 1903
                 }
@@ -1906,7 +1906,7 @@  discard block
 block discarded – undo
1906 1906
                     ? $assoc['relationToTargetKeyColumns']
1907 1907
                     : $assoc['sourceToTargetKeyColumns'];
1908 1908
 
1909
-                foreach ($columns as $column){
1909
+                foreach ($columns as $column) {
1910 1910
                     $types[] = PersisterHelper::getTypeOfColumn($column, $class, $this->em);
1911 1911
                 }
1912 1912
                 break;
@@ -1917,7 +1917,7 @@  discard block
 block discarded – undo
1917 1917
         }
1918 1918
 
1919 1919
         if (is_array($value)) {
1920
-            return array_map(function ($type) {
1920
+            return array_map(function($type) {
1921 1921
                 $type = Type::getType($type);
1922 1922
 
1923 1923
                 return $type->getBindingType() + Connection::ARRAY_PARAM_OFFSET;
@@ -1993,12 +1993,12 @@  discard block
 block discarded – undo
1993 1993
 
1994 1994
         $sql = 'SELECT 1 '
1995 1995
              . $this->getLockTablesSql(null)
1996
-             . ' WHERE ' . $this->getSelectConditionSQL($criteria);
1996
+             . ' WHERE '.$this->getSelectConditionSQL($criteria);
1997 1997
 
1998 1998
         list($params, $types) = $this->expandParameters($criteria);
1999 1999
 
2000 2000
         if (null !== $extraConditions) {
2001
-            $sql                                 .= ' AND ' . $this->getSelectConditionCriteriaSQL($extraConditions);
2001
+            $sql                                 .= ' AND '.$this->getSelectConditionCriteriaSQL($extraConditions);
2002 2002
             list($criteriaParams, $criteriaTypes) = $this->expandCriteriaParameters($extraConditions);
2003 2003
 
2004 2004
             $params = array_merge($params, $criteriaParams);
@@ -2006,7 +2006,7 @@  discard block
 block discarded – undo
2006 2006
         }
2007 2007
 
2008 2008
         if ($filterSql = $this->generateFilterConditionSQL($this->class, $alias)) {
2009
-            $sql .= ' AND ' . $filterSql;
2009
+            $sql .= ' AND '.$filterSql;
2010 2010
         }
2011 2011
 
2012 2012
         return (bool) $this->conn->fetchColumn($sql, $params, 0, $types);
@@ -2053,13 +2053,13 @@  discard block
 block discarded – undo
2053 2053
 
2054 2054
         foreach ($this->em->getFilters()->getEnabledFilters() as $filter) {
2055 2055
             if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
2056
-                $filterClauses[] = '(' . $filterExpr . ')';
2056
+                $filterClauses[] = '('.$filterExpr.')';
2057 2057
             }
2058 2058
         }
2059 2059
 
2060 2060
         $sql = implode(' AND ', $filterClauses);
2061 2061
 
2062
-        return $sql ? "(" . $sql . ")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
2062
+        return $sql ? "(".$sql.")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
2063 2063
     }
2064 2064
 
2065 2065
     /**
Please login to merge, or discard this patch.