Passed
Pull Request — 2.6 (#7882)
by
unknown
07:39
created
lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php 1 patch
Spacing   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -346,9 +346,9 @@  discard block
 block discarded – undo
346 346
         $columnName   = $this->quoteStrategy->getColumnName($versionField, $versionedClass, $this->platform);
347 347
 
348 348
         // FIXME: Order with composite keys might not be correct
349
-        $sql = 'SELECT ' . $columnName
350
-             . ' FROM '  . $tableName
351
-             . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
349
+        $sql = 'SELECT '.$columnName
350
+             . ' FROM '.$tableName
351
+             . ' WHERE '.implode(' = ? AND ', $identifier).' = ?';
352 352
 
353 353
 
354 354
         $flatId = $this->identifierFlattener->flattenIdentifier($versionedClass, $id);
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
             }
442 442
 
443 443
             $params[]   = $value;
444
-            $set[]      = $column . ' = ' . $placeholder;
444
+            $set[]      = $column.' = '.$placeholder;
445 445
             $types[]    = $this->columnTypes[$columnName];
446 446
         }
447 447
 
@@ -487,18 +487,18 @@  discard block
 block discarded – undo
487 487
                 case Type::SMALLINT:
488 488
                 case Type::INTEGER:
489 489
                 case Type::BIGINT:
490
-                    $set[] = $versionColumn . ' = ' . $versionColumn . ' + 1';
490
+                    $set[] = $versionColumn.' = '.$versionColumn.' + 1';
491 491
                     break;
492 492
 
493 493
                 case Type::DATETIME:
494
-                    $set[] = $versionColumn . ' = CURRENT_TIMESTAMP';
494
+                    $set[] = $versionColumn.' = CURRENT_TIMESTAMP';
495 495
                     break;
496 496
             }
497 497
         }
498 498
 
499
-        $sql = 'UPDATE ' . $quotedTableName
500
-             . ' SET ' . implode(', ', $set)
501
-             . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
499
+        $sql = 'UPDATE '.$quotedTableName
500
+             . ' SET '.implode(', ', $set)
501
+             . ' WHERE '.implode(' = ? AND ', $where).' = ?';
502 502
 
503 503
         $result = $this->conn->executeUpdate($sql, $params, $types);
504 504
 
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
 
542 542
 
543 543
             if ($selfReferential) {
544
-                $otherColumns = (! $mapping['isOwningSide'])
544
+                $otherColumns = ( ! $mapping['isOwningSide'])
545 545
                     ? $association['joinTable']['joinColumns']
546 546
                     : $association['joinTable']['inverseJoinColumns'];
547 547
             }
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
         }
696 696
         $oid = spl_object_hash($newVal);
697 697
         $uow = $this->em->getUnitOfWork();
698
-        if (! (isset($this->queuedInserts[$oid]) || $uow->isScheduledForInsert($newVal))) {
698
+        if ( ! (isset($this->queuedInserts[$oid]) || $uow->isScheduledForInsert($newVal))) {
699 699
             return false;
700 700
         }
701 701
         if ($newVal !== $entity) {
@@ -1051,7 +1051,7 @@  discard block
 block discarded – undo
1051 1051
                     );
1052 1052
             }
1053 1053
 
1054
-            $criteria[$quotedJoinTable . '.' . $quotedKeyColumn] = $value;
1054
+            $criteria[$quotedJoinTable.'.'.$quotedKeyColumn] = $value;
1055 1055
             $parameters[] = [
1056 1056
                 'value' => $value,
1057 1057
                 'field' => $field,
@@ -1094,11 +1094,11 @@  discard block
 block discarded – undo
1094 1094
 
1095 1095
         switch ($lockMode) {
1096 1096
             case LockMode::PESSIMISTIC_READ:
1097
-                $lockSql = ' ' . $this->platform->getReadLockSQL();
1097
+                $lockSql = ' '.$this->platform->getReadLockSQL();
1098 1098
                 break;
1099 1099
 
1100 1100
             case LockMode::PESSIMISTIC_WRITE:
1101
-                $lockSql = ' ' . $this->platform->getWriteLockSQL();
1101
+                $lockSql = ' '.$this->platform->getWriteLockSQL();
1102 1102
                 break;
1103 1103
         }
1104 1104
 
@@ -1109,14 +1109,14 @@  discard block
 block discarded – undo
1109 1109
 
1110 1110
         if ('' !== $filterSql) {
1111 1111
             $conditionSql = $conditionSql
1112
-                ? $conditionSql . ' AND ' . $filterSql
1112
+                ? $conditionSql.' AND '.$filterSql
1113 1113
                 : $filterSql;
1114 1114
         }
1115 1115
 
1116
-        $select = 'SELECT ' . $columnList;
1117
-        $from   = ' FROM ' . $tableName . ' '. $tableAlias;
1118
-        $join   = $this->currentPersisterContext->selectJoinSql . $joinSql;
1119
-        $where  = ($conditionSql ? ' WHERE ' . $conditionSql : '');
1116
+        $select = 'SELECT '.$columnList;
1117
+        $from   = ' FROM '.$tableName.' '.$tableAlias;
1118
+        $join   = $this->currentPersisterContext->selectJoinSql.$joinSql;
1119
+        $where  = ($conditionSql ? ' WHERE '.$conditionSql : '');
1120 1120
         $lock   = $this->platform->appendLockHint($from, $lockMode);
1121 1121
         $query  = $select
1122 1122
             . $lock
@@ -1124,7 +1124,7 @@  discard block
 block discarded – undo
1124 1124
             . $where
1125 1125
             . $orderBySql;
1126 1126
 
1127
-        return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql;
1127
+        return $this->platform->modifyLimitQuery($query, $limit, $offset).$lockSql;
1128 1128
     }
1129 1129
 
1130 1130
     /**
@@ -1143,13 +1143,13 @@  discard block
 block discarded – undo
1143 1143
 
1144 1144
         if ('' !== $filterSql) {
1145 1145
             $conditionSql = $conditionSql
1146
-                ? $conditionSql . ' AND ' . $filterSql
1146
+                ? $conditionSql.' AND '.$filterSql
1147 1147
                 : $filterSql;
1148 1148
         }
1149 1149
 
1150 1150
         $sql = 'SELECT COUNT(*) '
1151
-            . 'FROM ' . $tableName . ' ' . $tableAlias
1152
-            . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql);
1151
+            . 'FROM '.$tableName.' '.$tableAlias
1152
+            . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql);
1153 1153
 
1154 1154
         return $sql;
1155 1155
     }
@@ -1182,7 +1182,7 @@  discard block
 block discarded – undo
1182 1182
                     : $baseTableAlias;
1183 1183
 
1184 1184
                 $columnName    = $this->quoteStrategy->getColumnName($fieldName, $this->class, $this->platform);
1185
-                $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation;
1185
+                $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation;
1186 1186
 
1187 1187
                 continue;
1188 1188
             }
@@ -1199,7 +1199,7 @@  discard block
 block discarded – undo
1199 1199
 
1200 1200
                 foreach ($this->class->associationMappings[$fieldName]['joinColumns'] as $joinColumn) {
1201 1201
                     $columnName    = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1202
-                    $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation;
1202
+                    $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation;
1203 1203
                 }
1204 1204
 
1205 1205
                 continue;
@@ -1208,7 +1208,7 @@  discard block
 block discarded – undo
1208 1208
             throw ORMException::unrecognizedField($fieldName);
1209 1209
         }
1210 1210
 
1211
-        return ' ORDER BY ' . implode(', ', $orderByList);
1211
+        return ' ORDER BY '.implode(', ', $orderByList);
1212 1212
     }
1213 1213
 
1214 1214
     /**
@@ -1236,8 +1236,8 @@  discard block
 block discarded – undo
1236 1236
             $columnList[] = $this->getSelectColumnSQL($field, $this->class);
1237 1237
         }
1238 1238
 
1239
-        $this->currentPersisterContext->selectJoinSql    = '';
1240
-        $eagerAliasCounter      = 0;
1239
+        $this->currentPersisterContext->selectJoinSql = '';
1240
+        $eagerAliasCounter = 0;
1241 1241
 
1242 1242
         foreach ($this->class->associationMappings as $assocField => $assoc) {
1243 1243
             $assocColumnSQL = $this->getSelectColumnAssociationSQL($assocField, $assoc, $this->class);
@@ -1263,7 +1263,7 @@  discard block
 block discarded – undo
1263 1263
                 continue; // now this is why you shouldn't use inheritance
1264 1264
             }
1265 1265
 
1266
-            $assocAlias = 'e' . ($eagerAliasCounter++);
1266
+            $assocAlias = 'e'.($eagerAliasCounter++);
1267 1267
             $this->currentPersisterContext->rsm->addJoinedEntityResult($assoc['targetEntity'], $assocAlias, 'r', $assocField);
1268 1268
 
1269 1269
             foreach ($eagerEntity->fieldNames as $field) {
@@ -1296,14 +1296,14 @@  discard block
 block discarded – undo
1296 1296
             $joinTableName  = $this->quoteStrategy->getTableName($eagerEntity, $this->platform);
1297 1297
 
1298 1298
             if ($assoc['isOwningSide']) {
1299
-                $tableAlias           = $this->getSQLTableAlias($association['targetEntity'], $assocAlias);
1300
-                $this->currentPersisterContext->selectJoinSql .= ' ' . $this->getJoinSQLForJoinColumns($association['joinColumns']);
1299
+                $tableAlias = $this->getSQLTableAlias($association['targetEntity'], $assocAlias);
1300
+                $this->currentPersisterContext->selectJoinSql .= ' '.$this->getJoinSQLForJoinColumns($association['joinColumns']);
1301 1301
 
1302 1302
                 foreach ($association['joinColumns'] as $joinColumn) {
1303 1303
                     $sourceCol       = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1304 1304
                     $targetCol       = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform);
1305 1305
                     $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity'])
1306
-                                        . '.' . $sourceCol . ' = ' . $tableAlias . '.' . $targetCol;
1306
+                                        . '.'.$sourceCol.' = '.$tableAlias.'.'.$targetCol;
1307 1307
                 }
1308 1308
 
1309 1309
                 // Add filter SQL
@@ -1319,12 +1319,12 @@  discard block
 block discarded – undo
1319 1319
                     $sourceCol       = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1320 1320
                     $targetCol       = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform);
1321 1321
 
1322
-                    $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity'], $assocAlias) . '.' . $sourceCol . ' = '
1323
-                        . $this->getSQLTableAlias($association['targetEntity']) . '.' . $targetCol;
1322
+                    $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity'], $assocAlias).'.'.$sourceCol.' = '
1323
+                        . $this->getSQLTableAlias($association['targetEntity']).'.'.$targetCol;
1324 1324
                 }
1325 1325
             }
1326 1326
 
1327
-            $this->currentPersisterContext->selectJoinSql .= ' ' . $joinTableName . ' ' . $joinTableAlias . ' ON ';
1327
+            $this->currentPersisterContext->selectJoinSql .= ' '.$joinTableName.' '.$joinTableAlias.' ON ';
1328 1328
             $this->currentPersisterContext->selectJoinSql .= implode(' AND ', $joinCondition);
1329 1329
         }
1330 1330
 
@@ -1345,7 +1345,7 @@  discard block
 block discarded – undo
1345 1345
      */
1346 1346
     protected function getSelectColumnAssociationSQL($field, $assoc, ClassMetadata $class, $alias = 'r')
1347 1347
     {
1348
-        if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) ) {
1348
+        if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE)) {
1349 1349
             return '';
1350 1350
         }
1351 1351
 
@@ -1394,10 +1394,10 @@  discard block
 block discarded – undo
1394 1394
         foreach ($joinColumns as $joinColumn) {
1395 1395
             $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1396 1396
             $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform);
1397
-            $conditions[]       = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableName . '.' . $quotedSourceColumn;
1397
+            $conditions[]       = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableName.'.'.$quotedSourceColumn;
1398 1398
         }
1399 1399
 
1400
-        return ' INNER JOIN ' . $joinTableName . ' ON ' . implode(' AND ', $conditions);
1400
+        return ' INNER JOIN '.$joinTableName.' ON '.implode(' AND ', $conditions);
1401 1401
     }
1402 1402
 
1403 1403
     /**
@@ -1476,7 +1476,7 @@  discard block
 block discarded – undo
1476 1476
                 continue;
1477 1477
             }
1478 1478
 
1479
-            if (! $this->class->isIdGeneratorIdentity() || $this->class->identifier[0] != $name) {
1479
+            if ( ! $this->class->isIdGeneratorIdentity() || $this->class->identifier[0] != $name) {
1480 1480
                 $columns[]                = $this->quoteStrategy->getColumnName($name, $this->class, $this->platform);
1481 1481
                 $this->columnTypes[$name] = $this->class->fieldMappings[$name]['type'];
1482 1482
             }
@@ -1497,7 +1497,7 @@  discard block
 block discarded – undo
1497 1497
      */
1498 1498
     protected function getSelectColumnSQL($field, ClassMetadata $class, $alias = 'r')
1499 1499
     {
1500
-        $root         = $alias == 'r' ? '' : $alias ;
1500
+        $root         = $alias == 'r' ? '' : $alias;
1501 1501
         $tableAlias   = $this->getSQLTableAlias($class->name, $root);
1502 1502
         $fieldMapping = $class->fieldMappings[$field];
1503 1503
         $sql          = sprintf('%s.%s', $tableAlias, $this->quoteStrategy->getColumnName($field, $class, $this->platform));
@@ -1510,7 +1510,7 @@  discard block
 block discarded – undo
1510 1510
             $sql  = $type->convertToPHPValueSQL($sql, $this->platform);
1511 1511
         }
1512 1512
 
1513
-        return $sql . ' AS ' . $columnAlias;
1513
+        return $sql.' AS '.$columnAlias;
1514 1514
     }
1515 1515
 
1516 1516
     /**
@@ -1526,14 +1526,14 @@  discard block
 block discarded – undo
1526 1526
     protected function getSQLTableAlias($className, $assocName = '')
1527 1527
     {
1528 1528
         if ($assocName) {
1529
-            $className .= '#' . $assocName;
1529
+            $className .= '#'.$assocName;
1530 1530
         }
1531 1531
 
1532 1532
         if (isset($this->currentPersisterContext->sqlTableAliases[$className])) {
1533 1533
             return $this->currentPersisterContext->sqlTableAliases[$className];
1534 1534
         }
1535 1535
 
1536
-        $tableAlias = 't' . $this->currentPersisterContext->sqlAliasCounter++;
1536
+        $tableAlias = 't'.$this->currentPersisterContext->sqlAliasCounter++;
1537 1537
 
1538 1538
         $this->currentPersisterContext->sqlTableAliases[$className] = $tableAlias;
1539 1539
 
@@ -1560,7 +1560,7 @@  discard block
 block discarded – undo
1560 1560
         }
1561 1561
 
1562 1562
         $lock  = $this->getLockTablesSql($lockMode);
1563
-        $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ';
1563
+        $where = ($conditionSql ? ' WHERE '.$conditionSql : '').' ';
1564 1564
         $sql = 'SELECT 1 '
1565 1565
              . $lock
1566 1566
              . $where
@@ -1582,7 +1582,7 @@  discard block
 block discarded – undo
1582 1582
     {
1583 1583
         return $this->platform->appendLockHint(
1584 1584
             'FROM '
1585
-            . $this->quoteStrategy->getTableName($this->class, $this->platform) . ' '
1585
+            . $this->quoteStrategy->getTableName($this->class, $this->platform).' '
1586 1586
             . $this->getSQLTableAlias($this->class->name),
1587 1587
             $lockMode
1588 1588
         );
@@ -1634,19 +1634,19 @@  discard block
 block discarded – undo
1634 1634
 
1635 1635
             if (null !== $comparison) {
1636 1636
                 // special case null value handling
1637
-                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null ===$value) {
1638
-                    $selectedColumns[] = $column . ' IS NULL';
1637
+                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null === $value) {
1638
+                    $selectedColumns[] = $column.' IS NULL';
1639 1639
 
1640 1640
                     continue;
1641 1641
                 }
1642 1642
 
1643 1643
                 if ($comparison === Comparison::NEQ && null === $value) {
1644
-                    $selectedColumns[] = $column . ' IS NOT NULL';
1644
+                    $selectedColumns[] = $column.' IS NOT NULL';
1645 1645
 
1646 1646
                     continue;
1647 1647
                 }
1648 1648
 
1649
-                $selectedColumns[] = $column . ' ' . sprintf(self::$comparisonMap[$comparison], $placeholder);
1649
+                $selectedColumns[] = $column.' '.sprintf(self::$comparisonMap[$comparison], $placeholder);
1650 1650
 
1651 1651
                 continue;
1652 1652
             }
@@ -1694,7 +1694,7 @@  discard block
 block discarded – undo
1694 1694
                 ? $this->class->fieldMappings[$field]['inherited']
1695 1695
                 : $this->class->name;
1696 1696
 
1697
-            return [$this->getSQLTableAlias($className) . '.' . $this->quoteStrategy->getColumnName($field, $this->class, $this->platform)];
1697
+            return [$this->getSQLTableAlias($className).'.'.$this->quoteStrategy->getColumnName($field, $this->class, $this->platform)];
1698 1698
         }
1699 1699
 
1700 1700
         if (isset($this->class->associationMappings[$field])) {
@@ -1715,7 +1715,7 @@  discard block
 block discarded – undo
1715 1715
 
1716 1716
 
1717 1717
                 foreach ($joinColumns as $joinColumn) {
1718
-                    $columns[] = $joinTableName . '.' . $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform);
1718
+                    $columns[] = $joinTableName.'.'.$this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform);
1719 1719
                 }
1720 1720
 
1721 1721
             } else {
@@ -1723,12 +1723,12 @@  discard block
 block discarded – undo
1723 1723
                     throw ORMException::invalidFindByInverseAssociation($this->class->name, $field);
1724 1724
                 }
1725 1725
 
1726
-                $className  = (isset($association['inherited']))
1726
+                $className = (isset($association['inherited']))
1727 1727
                     ? $association['inherited']
1728 1728
                     : $this->class->name;
1729 1729
 
1730 1730
                 foreach ($association['joinColumns'] as $joinColumn) {
1731
-                    $columns[] = $this->getSQLTableAlias($className) . '.' . $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1731
+                    $columns[] = $this->getSQLTableAlias($className).'.'.$this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1732 1732
                 }
1733 1733
             }
1734 1734
             return $columns;
@@ -1820,7 +1820,7 @@  discard block
 block discarded – undo
1820 1820
                     $value = $value[$this->em->getClassMetadata($sourceClass->associationMappings[$field]['targetEntity'])->identifier[0]];
1821 1821
                 }
1822 1822
 
1823
-                $criteria[$tableAlias . "." . $targetKeyColumn] = $value;
1823
+                $criteria[$tableAlias.".".$targetKeyColumn] = $value;
1824 1824
                 $parameters[]                                   = [
1825 1825
                     'value' => $value,
1826 1826
                     'field' => $field,
@@ -1833,7 +1833,7 @@  discard block
 block discarded – undo
1833 1833
             $field = $sourceClass->fieldNames[$sourceKeyColumn];
1834 1834
             $value = $sourceClass->reflFields[$field]->getValue($sourceEntity);
1835 1835
 
1836
-            $criteria[$tableAlias . "." . $targetKeyColumn] = $value;
1836
+            $criteria[$tableAlias.".".$targetKeyColumn] = $value;
1837 1837
             $parameters[] = [
1838 1838
                 'value' => $value,
1839 1839
                 'field' => $field,
@@ -1921,7 +1921,7 @@  discard block
 block discarded – undo
1921 1921
                 $assoc = $class->associationMappings[$field];
1922 1922
                 $class = $this->em->getClassMetadata($assoc['targetEntity']);
1923 1923
 
1924
-                if (! $assoc['isOwningSide']) {
1924
+                if ( ! $assoc['isOwningSide']) {
1925 1925
                     $assoc = $class->associationMappings[$assoc['mappedBy']];
1926 1926
                     $class = $this->em->getClassMetadata($assoc['targetEntity']);
1927 1927
                 }
@@ -1930,7 +1930,7 @@  discard block
 block discarded – undo
1930 1930
                     ? $assoc['relationToTargetKeyColumns']
1931 1931
                     : $assoc['sourceToTargetKeyColumns'];
1932 1932
 
1933
-                foreach ($columns as $column){
1933
+                foreach ($columns as $column) {
1934 1934
                     $types[] = PersisterHelper::getTypeOfColumn($column, $class, $this->em);
1935 1935
                 }
1936 1936
                 break;
@@ -1941,7 +1941,7 @@  discard block
 block discarded – undo
1941 1941
         }
1942 1942
 
1943 1943
         if (is_array($value)) {
1944
-            return array_map(function ($type) {
1944
+            return array_map(function($type) {
1945 1945
                 $type = Type::getType($type);
1946 1946
 
1947 1947
                 return $type->getBindingType() + Connection::ARRAY_PARAM_OFFSET;
@@ -2017,12 +2017,12 @@  discard block
 block discarded – undo
2017 2017
 
2018 2018
         $sql = 'SELECT 1 '
2019 2019
              . $this->getLockTablesSql(null)
2020
-             . ' WHERE ' . $this->getSelectConditionSQL($criteria);
2020
+             . ' WHERE '.$this->getSelectConditionSQL($criteria);
2021 2021
 
2022 2022
         list($params, $types) = $this->expandParameters($criteria);
2023 2023
 
2024 2024
         if (null !== $extraConditions) {
2025
-            $sql                                 .= ' AND ' . $this->getSelectConditionCriteriaSQL($extraConditions);
2025
+            $sql                                 .= ' AND '.$this->getSelectConditionCriteriaSQL($extraConditions);
2026 2026
             list($criteriaParams, $criteriaTypes) = $this->expandCriteriaParameters($extraConditions);
2027 2027
 
2028 2028
             $params = array_merge($params, $criteriaParams);
@@ -2030,7 +2030,7 @@  discard block
 block discarded – undo
2030 2030
         }
2031 2031
 
2032 2032
         if ($filterSql = $this->generateFilterConditionSQL($this->class, $alias)) {
2033
-            $sql .= ' AND ' . $filterSql;
2033
+            $sql .= ' AND '.$filterSql;
2034 2034
         }
2035 2035
 
2036 2036
         return (bool) $this->conn->fetchColumn($sql, $params, 0, $types);
@@ -2077,13 +2077,13 @@  discard block
 block discarded – undo
2077 2077
 
2078 2078
         foreach ($this->em->getFilters()->getEnabledFilters() as $filter) {
2079 2079
             if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
2080
-                $filterClauses[] = '(' . $filterExpr . ')';
2080
+                $filterClauses[] = '('.$filterExpr.')';
2081 2081
             }
2082 2082
         }
2083 2083
 
2084 2084
         $sql = implode(' AND ', $filterClauses);
2085 2085
 
2086
-        return $sql ? "(" . $sql . ")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
2086
+        return $sql ? "(".$sql.")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
2087 2087
     }
2088 2088
 
2089 2089
     /**
@@ -2113,7 +2113,7 @@  discard block
 block discarded – undo
2113 2113
         $entityManager = $this->em;
2114 2114
 
2115 2115
         return array_map(
2116
-            static function ($fieldName) use ($class, $entityManager) : string {
2116
+            static function($fieldName) use ($class, $entityManager) : string {
2117 2117
                 $types = PersisterHelper::getTypeOfField($fieldName, $class, $entityManager);
2118 2118
                 assert(isset($types[0]));
2119 2119
 
Please login to merge, or discard this patch.