@@ -66,7 +66,7 @@ |
||
66 | 66 | $criteria = Criteria::create(); |
67 | 67 | $criteria->where(Criteria::expr()->gt('id', 1)); |
68 | 68 | |
69 | - $statement= $this->_persister->getSelectConditionStatementSQL(0, $criteria); |
|
69 | + $statement = $this->_persister->getSelectConditionStatementSQL(0, $criteria); |
|
70 | 70 | $this->assertEquals('t0.id > ?', $statement); |
71 | 71 | } |
72 | 72 | } |
@@ -342,9 +342,9 @@ discard block |
||
342 | 342 | $columnName = $this->quoteStrategy->getColumnName($versionField, $versionedClass, $this->platform); |
343 | 343 | |
344 | 344 | // FIXME: Order with composite keys might not be correct |
345 | - $sql = 'SELECT ' . $columnName |
|
346 | - . ' FROM ' . $tableName |
|
347 | - . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?'; |
|
345 | + $sql = 'SELECT '.$columnName |
|
346 | + . ' FROM '.$tableName |
|
347 | + . ' WHERE '.implode(' = ? AND ', $identifier).' = ?'; |
|
348 | 348 | |
349 | 349 | |
350 | 350 | $flatId = $this->identifierFlattener->flattenIdentifier($versionedClass, $id); |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | } |
438 | 438 | |
439 | 439 | $params[] = $value; |
440 | - $set[] = $column . ' = ' . $placeholder; |
|
440 | + $set[] = $column.' = '.$placeholder; |
|
441 | 441 | $types[] = $this->columnTypes[$columnName]; |
442 | 442 | } |
443 | 443 | |
@@ -483,18 +483,18 @@ discard block |
||
483 | 483 | case Type::SMALLINT: |
484 | 484 | case Type::INTEGER: |
485 | 485 | case Type::BIGINT: |
486 | - $set[] = $versionColumn . ' = ' . $versionColumn . ' + 1'; |
|
486 | + $set[] = $versionColumn.' = '.$versionColumn.' + 1'; |
|
487 | 487 | break; |
488 | 488 | |
489 | 489 | case Type::DATETIME: |
490 | - $set[] = $versionColumn . ' = CURRENT_TIMESTAMP'; |
|
490 | + $set[] = $versionColumn.' = CURRENT_TIMESTAMP'; |
|
491 | 491 | break; |
492 | 492 | } |
493 | 493 | } |
494 | 494 | |
495 | - $sql = 'UPDATE ' . $quotedTableName |
|
496 | - . ' SET ' . implode(', ', $set) |
|
497 | - . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?'; |
|
495 | + $sql = 'UPDATE '.$quotedTableName |
|
496 | + . ' SET '.implode(', ', $set) |
|
497 | + . ' WHERE '.implode(' = ? AND ', $where).' = ?'; |
|
498 | 498 | |
499 | 499 | $result = $this->conn->executeUpdate($sql, $params, $types); |
500 | 500 | |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | |
538 | 538 | |
539 | 539 | if ($selfReferential) { |
540 | - $otherColumns = (! $mapping['isOwningSide']) |
|
540 | + $otherColumns = ( ! $mapping['isOwningSide']) |
|
541 | 541 | ? $association['joinTable']['joinColumns'] |
542 | 542 | : $association['joinTable']['inverseJoinColumns']; |
543 | 543 | } |
@@ -575,7 +575,7 @@ discard block |
||
575 | 575 | $tableName = $this->quoteStrategy->getTableName($class, $this->platform); |
576 | 576 | $idColumns = $this->quoteStrategy->getIdentifierColumnNames($class, $this->platform); |
577 | 577 | $id = array_combine($idColumns, $identifier); |
578 | - $types = array_map(function ($identifier) use ($class, $self) { |
|
578 | + $types = array_map(function($identifier) use ($class, $self) { |
|
579 | 579 | if (isset($class->fieldMappings[$identifier])) { |
580 | 580 | return $class->fieldMappings[$identifier]['type']; |
581 | 581 | } |
@@ -1036,7 +1036,7 @@ discard block |
||
1036 | 1036 | ); |
1037 | 1037 | } |
1038 | 1038 | |
1039 | - $criteria[$quotedJoinTable . '.' . $quotedKeyColumn] = $value; |
|
1039 | + $criteria[$quotedJoinTable.'.'.$quotedKeyColumn] = $value; |
|
1040 | 1040 | $parameters[] = [ |
1041 | 1041 | 'value' => $value, |
1042 | 1042 | 'field' => $field, |
@@ -1079,11 +1079,11 @@ discard block |
||
1079 | 1079 | |
1080 | 1080 | switch ($lockMode) { |
1081 | 1081 | case LockMode::PESSIMISTIC_READ: |
1082 | - $lockSql = ' ' . $this->platform->getReadLockSQL(); |
|
1082 | + $lockSql = ' '.$this->platform->getReadLockSQL(); |
|
1083 | 1083 | break; |
1084 | 1084 | |
1085 | 1085 | case LockMode::PESSIMISTIC_WRITE: |
1086 | - $lockSql = ' ' . $this->platform->getWriteLockSQL(); |
|
1086 | + $lockSql = ' '.$this->platform->getWriteLockSQL(); |
|
1087 | 1087 | break; |
1088 | 1088 | } |
1089 | 1089 | |
@@ -1094,14 +1094,14 @@ discard block |
||
1094 | 1094 | |
1095 | 1095 | if ('' !== $filterSql) { |
1096 | 1096 | $conditionSql = $conditionSql |
1097 | - ? $conditionSql . ' AND ' . $filterSql |
|
1097 | + ? $conditionSql.' AND '.$filterSql |
|
1098 | 1098 | : $filterSql; |
1099 | 1099 | } |
1100 | 1100 | |
1101 | - $select = 'SELECT ' . $columnList; |
|
1102 | - $from = ' FROM ' . $tableName . ' '. $tableAlias; |
|
1103 | - $join = $this->currentPersisterContext->selectJoinSql . $joinSql; |
|
1104 | - $where = ($conditionSql ? ' WHERE ' . $conditionSql : ''); |
|
1101 | + $select = 'SELECT '.$columnList; |
|
1102 | + $from = ' FROM '.$tableName.' '.$tableAlias; |
|
1103 | + $join = $this->currentPersisterContext->selectJoinSql.$joinSql; |
|
1104 | + $where = ($conditionSql ? ' WHERE '.$conditionSql : ''); |
|
1105 | 1105 | $lock = $this->platform->appendLockHint($from, $lockMode); |
1106 | 1106 | $query = $select |
1107 | 1107 | . $lock |
@@ -1109,7 +1109,7 @@ discard block |
||
1109 | 1109 | . $where |
1110 | 1110 | . $orderBySql; |
1111 | 1111 | |
1112 | - return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql; |
|
1112 | + return $this->platform->modifyLimitQuery($query, $limit, $offset).$lockSql; |
|
1113 | 1113 | } |
1114 | 1114 | |
1115 | 1115 | /** |
@@ -1128,13 +1128,13 @@ discard block |
||
1128 | 1128 | |
1129 | 1129 | if ('' !== $filterSql) { |
1130 | 1130 | $conditionSql = $conditionSql |
1131 | - ? $conditionSql . ' AND ' . $filterSql |
|
1131 | + ? $conditionSql.' AND '.$filterSql |
|
1132 | 1132 | : $filterSql; |
1133 | 1133 | } |
1134 | 1134 | |
1135 | 1135 | $sql = 'SELECT COUNT(*) ' |
1136 | - . 'FROM ' . $tableName . ' ' . $tableAlias |
|
1137 | - . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql); |
|
1136 | + . 'FROM '.$tableName.' '.$tableAlias |
|
1137 | + . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql); |
|
1138 | 1138 | |
1139 | 1139 | return $sql; |
1140 | 1140 | } |
@@ -1167,7 +1167,7 @@ discard block |
||
1167 | 1167 | : $baseTableAlias; |
1168 | 1168 | |
1169 | 1169 | $columnName = $this->quoteStrategy->getColumnName($fieldName, $this->class, $this->platform); |
1170 | - $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation; |
|
1170 | + $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation; |
|
1171 | 1171 | |
1172 | 1172 | continue; |
1173 | 1173 | } |
@@ -1184,7 +1184,7 @@ discard block |
||
1184 | 1184 | |
1185 | 1185 | foreach ($this->class->associationMappings[$fieldName]['joinColumns'] as $joinColumn) { |
1186 | 1186 | $columnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform); |
1187 | - $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation; |
|
1187 | + $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation; |
|
1188 | 1188 | } |
1189 | 1189 | |
1190 | 1190 | continue; |
@@ -1193,7 +1193,7 @@ discard block |
||
1193 | 1193 | throw ORMException::unrecognizedField($fieldName); |
1194 | 1194 | } |
1195 | 1195 | |
1196 | - return ' ORDER BY ' . implode(', ', $orderByList); |
|
1196 | + return ' ORDER BY '.implode(', ', $orderByList); |
|
1197 | 1197 | } |
1198 | 1198 | |
1199 | 1199 | /** |
@@ -1221,8 +1221,8 @@ discard block |
||
1221 | 1221 | $columnList[] = $this->getSelectColumnSQL($field, $this->class); |
1222 | 1222 | } |
1223 | 1223 | |
1224 | - $this->currentPersisterContext->selectJoinSql = ''; |
|
1225 | - $eagerAliasCounter = 0; |
|
1224 | + $this->currentPersisterContext->selectJoinSql = ''; |
|
1225 | + $eagerAliasCounter = 0; |
|
1226 | 1226 | |
1227 | 1227 | foreach ($this->class->associationMappings as $assocField => $assoc) { |
1228 | 1228 | $assocColumnSQL = $this->getSelectColumnAssociationSQL($assocField, $assoc, $this->class); |
@@ -1248,7 +1248,7 @@ discard block |
||
1248 | 1248 | continue; // now this is why you shouldn't use inheritance |
1249 | 1249 | } |
1250 | 1250 | |
1251 | - $assocAlias = 'e' . ($eagerAliasCounter++); |
|
1251 | + $assocAlias = 'e'.($eagerAliasCounter++); |
|
1252 | 1252 | $this->currentPersisterContext->rsm->addJoinedEntityResult($assoc['targetEntity'], $assocAlias, 'r', $assocField); |
1253 | 1253 | |
1254 | 1254 | foreach ($eagerEntity->fieldNames as $field) { |
@@ -1281,14 +1281,14 @@ discard block |
||
1281 | 1281 | $joinTableName = $this->quoteStrategy->getTableName($eagerEntity, $this->platform); |
1282 | 1282 | |
1283 | 1283 | if ($assoc['isOwningSide']) { |
1284 | - $tableAlias = $this->getSQLTableAlias($association['targetEntity'], $assocAlias); |
|
1285 | - $this->currentPersisterContext->selectJoinSql .= ' ' . $this->getJoinSQLForJoinColumns($association['joinColumns']); |
|
1284 | + $tableAlias = $this->getSQLTableAlias($association['targetEntity'], $assocAlias); |
|
1285 | + $this->currentPersisterContext->selectJoinSql .= ' '.$this->getJoinSQLForJoinColumns($association['joinColumns']); |
|
1286 | 1286 | |
1287 | 1287 | foreach ($association['joinColumns'] as $joinColumn) { |
1288 | 1288 | $sourceCol = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform); |
1289 | 1289 | $targetCol = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform); |
1290 | 1290 | $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity']) |
1291 | - . '.' . $sourceCol . ' = ' . $tableAlias . '.' . $targetCol; |
|
1291 | + . '.'.$sourceCol.' = '.$tableAlias.'.'.$targetCol; |
|
1292 | 1292 | } |
1293 | 1293 | |
1294 | 1294 | // Add filter SQL |
@@ -1304,12 +1304,12 @@ discard block |
||
1304 | 1304 | $sourceCol = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform); |
1305 | 1305 | $targetCol = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform); |
1306 | 1306 | |
1307 | - $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity'], $assocAlias) . '.' . $sourceCol . ' = ' |
|
1308 | - . $this->getSQLTableAlias($association['targetEntity']) . '.' . $targetCol; |
|
1307 | + $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity'], $assocAlias).'.'.$sourceCol.' = ' |
|
1308 | + . $this->getSQLTableAlias($association['targetEntity']).'.'.$targetCol; |
|
1309 | 1309 | } |
1310 | 1310 | } |
1311 | 1311 | |
1312 | - $this->currentPersisterContext->selectJoinSql .= ' ' . $joinTableName . ' ' . $joinTableAlias . ' ON '; |
|
1312 | + $this->currentPersisterContext->selectJoinSql .= ' '.$joinTableName.' '.$joinTableAlias.' ON '; |
|
1313 | 1313 | $this->currentPersisterContext->selectJoinSql .= implode(' AND ', $joinCondition); |
1314 | 1314 | } |
1315 | 1315 | |
@@ -1330,7 +1330,7 @@ discard block |
||
1330 | 1330 | */ |
1331 | 1331 | protected function getSelectColumnAssociationSQL($field, $assoc, ClassMetadata $class, $alias = 'r') |
1332 | 1332 | { |
1333 | - if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) ) { |
|
1333 | + if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE)) { |
|
1334 | 1334 | return ''; |
1335 | 1335 | } |
1336 | 1336 | |
@@ -1379,10 +1379,10 @@ discard block |
||
1379 | 1379 | foreach ($joinColumns as $joinColumn) { |
1380 | 1380 | $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform); |
1381 | 1381 | $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform); |
1382 | - $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableName . '.' . $quotedSourceColumn; |
|
1382 | + $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableName.'.'.$quotedSourceColumn; |
|
1383 | 1383 | } |
1384 | 1384 | |
1385 | - return ' INNER JOIN ' . $joinTableName . ' ON ' . implode(' AND ', $conditions); |
|
1385 | + return ' INNER JOIN '.$joinTableName.' ON '.implode(' AND ', $conditions); |
|
1386 | 1386 | } |
1387 | 1387 | |
1388 | 1388 | /** |
@@ -1461,7 +1461,7 @@ discard block |
||
1461 | 1461 | continue; |
1462 | 1462 | } |
1463 | 1463 | |
1464 | - if (! $this->class->isIdGeneratorIdentity() || $this->class->identifier[0] != $name) { |
|
1464 | + if ( ! $this->class->isIdGeneratorIdentity() || $this->class->identifier[0] != $name) { |
|
1465 | 1465 | $columns[] = $this->quoteStrategy->getColumnName($name, $this->class, $this->platform); |
1466 | 1466 | $this->columnTypes[$name] = $this->class->fieldMappings[$name]['type']; |
1467 | 1467 | } |
@@ -1482,7 +1482,7 @@ discard block |
||
1482 | 1482 | */ |
1483 | 1483 | protected function getSelectColumnSQL($field, ClassMetadata $class, $alias = 'r') |
1484 | 1484 | { |
1485 | - $root = $alias == 'r' ? '' : $alias ; |
|
1485 | + $root = $alias == 'r' ? '' : $alias; |
|
1486 | 1486 | $tableAlias = $this->getSQLTableAlias($class->name, $root); |
1487 | 1487 | $fieldMapping = $class->fieldMappings[$field]; |
1488 | 1488 | $sql = sprintf('%s.%s', $tableAlias, $this->quoteStrategy->getColumnName($field, $class, $this->platform)); |
@@ -1495,7 +1495,7 @@ discard block |
||
1495 | 1495 | $sql = $type->convertToPHPValueSQL($sql, $this->platform); |
1496 | 1496 | } |
1497 | 1497 | |
1498 | - return $sql . ' AS ' . $columnAlias; |
|
1498 | + return $sql.' AS '.$columnAlias; |
|
1499 | 1499 | } |
1500 | 1500 | |
1501 | 1501 | /** |
@@ -1511,14 +1511,14 @@ discard block |
||
1511 | 1511 | protected function getSQLTableAlias($className, $assocName = '') |
1512 | 1512 | { |
1513 | 1513 | if ($assocName) { |
1514 | - $className .= '#' . $assocName; |
|
1514 | + $className .= '#'.$assocName; |
|
1515 | 1515 | } |
1516 | 1516 | |
1517 | 1517 | if (isset($this->currentPersisterContext->sqlTableAliases[$className])) { |
1518 | 1518 | return $this->currentPersisterContext->sqlTableAliases[$className]; |
1519 | 1519 | } |
1520 | 1520 | |
1521 | - $tableAlias = 't' . $this->currentPersisterContext->sqlAliasCounter++; |
|
1521 | + $tableAlias = 't'.$this->currentPersisterContext->sqlAliasCounter++; |
|
1522 | 1522 | |
1523 | 1523 | $this->currentPersisterContext->sqlTableAliases[$className] = $tableAlias; |
1524 | 1524 | |
@@ -1545,7 +1545,7 @@ discard block |
||
1545 | 1545 | } |
1546 | 1546 | |
1547 | 1547 | $lock = $this->getLockTablesSql($lockMode); |
1548 | - $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' '; |
|
1548 | + $where = ($conditionSql ? ' WHERE '.$conditionSql : '').' '; |
|
1549 | 1549 | $sql = 'SELECT 1 ' |
1550 | 1550 | . $lock |
1551 | 1551 | . $where |
@@ -1567,7 +1567,7 @@ discard block |
||
1567 | 1567 | { |
1568 | 1568 | return $this->platform->appendLockHint( |
1569 | 1569 | 'FROM ' |
1570 | - . $this->quoteStrategy->getTableName($this->class, $this->platform) . ' ' |
|
1570 | + . $this->quoteStrategy->getTableName($this->class, $this->platform).' ' |
|
1571 | 1571 | . $this->getSQLTableAlias($this->class->name), |
1572 | 1572 | $lockMode |
1573 | 1573 | ); |
@@ -1612,7 +1612,7 @@ discard block |
||
1612 | 1612 | $comparison = $expression->getOperator(); |
1613 | 1613 | } |
1614 | 1614 | |
1615 | - $columns = $this->getSelectConditionStatementColumnSQL($field, $assoc); |
|
1615 | + $columns = $this->getSelectConditionStatementColumnSQL($field, $assoc); |
|
1616 | 1616 | |
1617 | 1617 | if (count($columns) > 1 && $comparison === Comparison::IN) { |
1618 | 1618 | /* |
@@ -1632,19 +1632,19 @@ discard block |
||
1632 | 1632 | |
1633 | 1633 | if (null !== $comparison) { |
1634 | 1634 | // special case null value handling |
1635 | - if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null ===$value) { |
|
1636 | - $selectedColumns[] = $column . ' IS NULL'; |
|
1635 | + if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null === $value) { |
|
1636 | + $selectedColumns[] = $column.' IS NULL'; |
|
1637 | 1637 | |
1638 | 1638 | continue; |
1639 | 1639 | } |
1640 | 1640 | |
1641 | 1641 | if ($comparison === Comparison::NEQ && null === $value) { |
1642 | - $selectedColumns[] = $column . ' IS NOT NULL'; |
|
1642 | + $selectedColumns[] = $column.' IS NOT NULL'; |
|
1643 | 1643 | |
1644 | 1644 | continue; |
1645 | 1645 | } |
1646 | 1646 | |
1647 | - $selectedColumns[] = $column . ' ' . sprintf(self::$comparisonMap[$comparison], $placeholder); |
|
1647 | + $selectedColumns[] = $column.' '.sprintf(self::$comparisonMap[$comparison], $placeholder); |
|
1648 | 1648 | |
1649 | 1649 | continue; |
1650 | 1650 | } |
@@ -1692,7 +1692,7 @@ discard block |
||
1692 | 1692 | ? $this->class->fieldMappings[$field]['inherited'] |
1693 | 1693 | : $this->class->name; |
1694 | 1694 | |
1695 | - return [$this->getSQLTableAlias($className) . '.' . $this->quoteStrategy->getColumnName($field, $this->class, $this->platform)]; |
|
1695 | + return [$this->getSQLTableAlias($className).'.'.$this->quoteStrategy->getColumnName($field, $this->class, $this->platform)]; |
|
1696 | 1696 | } |
1697 | 1697 | |
1698 | 1698 | if (isset($this->class->associationMappings[$field])) { |
@@ -1713,7 +1713,7 @@ discard block |
||
1713 | 1713 | |
1714 | 1714 | |
1715 | 1715 | foreach ($joinColumns as $joinColumn) { |
1716 | - $columns[] = $joinTableName . '.' . $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform); |
|
1716 | + $columns[] = $joinTableName.'.'.$this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform); |
|
1717 | 1717 | } |
1718 | 1718 | |
1719 | 1719 | } else { |
@@ -1721,12 +1721,12 @@ discard block |
||
1721 | 1721 | throw ORMException::invalidFindByInverseAssociation($this->class->name, $field); |
1722 | 1722 | } |
1723 | 1723 | |
1724 | - $className = (isset($association['inherited'])) |
|
1724 | + $className = (isset($association['inherited'])) |
|
1725 | 1725 | ? $association['inherited'] |
1726 | 1726 | : $this->class->name; |
1727 | 1727 | |
1728 | 1728 | foreach ($association['joinColumns'] as $joinColumn) { |
1729 | - $columns[] = $this->getSQLTableAlias($className) . '.' . $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform); |
|
1729 | + $columns[] = $this->getSQLTableAlias($className).'.'.$this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform); |
|
1730 | 1730 | } |
1731 | 1731 | } |
1732 | 1732 | return $columns; |
@@ -1818,7 +1818,7 @@ discard block |
||
1818 | 1818 | $value = $value[$this->em->getClassMetadata($sourceClass->associationMappings[$field]['targetEntity'])->identifier[0]]; |
1819 | 1819 | } |
1820 | 1820 | |
1821 | - $criteria[$tableAlias . "." . $targetKeyColumn] = $value; |
|
1821 | + $criteria[$tableAlias.".".$targetKeyColumn] = $value; |
|
1822 | 1822 | $parameters[] = [ |
1823 | 1823 | 'value' => $value, |
1824 | 1824 | 'field' => $field, |
@@ -1831,7 +1831,7 @@ discard block |
||
1831 | 1831 | $field = $sourceClass->fieldNames[$sourceKeyColumn]; |
1832 | 1832 | $value = $sourceClass->reflFields[$field]->getValue($sourceEntity); |
1833 | 1833 | |
1834 | - $criteria[$tableAlias . "." . $targetKeyColumn] = $value; |
|
1834 | + $criteria[$tableAlias.".".$targetKeyColumn] = $value; |
|
1835 | 1835 | $parameters[] = [ |
1836 | 1836 | 'value' => $value, |
1837 | 1837 | 'field' => $field, |
@@ -1919,7 +1919,7 @@ discard block |
||
1919 | 1919 | $assoc = $class->associationMappings[$field]; |
1920 | 1920 | $class = $this->em->getClassMetadata($assoc['targetEntity']); |
1921 | 1921 | |
1922 | - if (! $assoc['isOwningSide']) { |
|
1922 | + if ( ! $assoc['isOwningSide']) { |
|
1923 | 1923 | $assoc = $class->associationMappings[$assoc['mappedBy']]; |
1924 | 1924 | $class = $this->em->getClassMetadata($assoc['targetEntity']); |
1925 | 1925 | } |
@@ -1928,7 +1928,7 @@ discard block |
||
1928 | 1928 | ? $assoc['relationToTargetKeyColumns'] |
1929 | 1929 | : $assoc['sourceToTargetKeyColumns']; |
1930 | 1930 | |
1931 | - foreach ($columns as $column){ |
|
1931 | + foreach ($columns as $column) { |
|
1932 | 1932 | $types[] = PersisterHelper::getTypeOfColumn($column, $class, $this->em); |
1933 | 1933 | } |
1934 | 1934 | break; |
@@ -1939,7 +1939,7 @@ discard block |
||
1939 | 1939 | } |
1940 | 1940 | |
1941 | 1941 | if (is_array($value)) { |
1942 | - return array_map(function ($type) { |
|
1942 | + return array_map(function($type) { |
|
1943 | 1943 | $type = Type::getType($type); |
1944 | 1944 | |
1945 | 1945 | return $type->getBindingType() + Connection::ARRAY_PARAM_OFFSET; |
@@ -2015,12 +2015,12 @@ discard block |
||
2015 | 2015 | |
2016 | 2016 | $sql = 'SELECT 1 ' |
2017 | 2017 | . $this->getLockTablesSql(null) |
2018 | - . ' WHERE ' . $this->getSelectConditionSQL($criteria); |
|
2018 | + . ' WHERE '.$this->getSelectConditionSQL($criteria); |
|
2019 | 2019 | |
2020 | 2020 | list($params, $types) = $this->expandParameters($criteria); |
2021 | 2021 | |
2022 | 2022 | if (null !== $extraConditions) { |
2023 | - $sql .= ' AND ' . $this->getSelectConditionCriteriaSQL($extraConditions); |
|
2023 | + $sql .= ' AND '.$this->getSelectConditionCriteriaSQL($extraConditions); |
|
2024 | 2024 | list($criteriaParams, $criteriaTypes) = $this->expandCriteriaParameters($extraConditions); |
2025 | 2025 | |
2026 | 2026 | $params = array_merge($params, $criteriaParams); |
@@ -2028,7 +2028,7 @@ discard block |
||
2028 | 2028 | } |
2029 | 2029 | |
2030 | 2030 | if ($filterSql = $this->generateFilterConditionSQL($this->class, $alias)) { |
2031 | - $sql .= ' AND ' . $filterSql; |
|
2031 | + $sql .= ' AND '.$filterSql; |
|
2032 | 2032 | } |
2033 | 2033 | |
2034 | 2034 | return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); |
@@ -2075,13 +2075,13 @@ discard block |
||
2075 | 2075 | |
2076 | 2076 | foreach ($this->em->getFilters()->getEnabledFilters() as $filter) { |
2077 | 2077 | if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) { |
2078 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
2078 | + $filterClauses[] = '('.$filterExpr.')'; |
|
2079 | 2079 | } |
2080 | 2080 | } |
2081 | 2081 | |
2082 | 2082 | $sql = implode(' AND ', $filterClauses); |
2083 | 2083 | |
2084 | - return $sql ? "(" . $sql . ")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL" |
|
2084 | + return $sql ? "(".$sql.")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL" |
|
2085 | 2085 | } |
2086 | 2086 | |
2087 | 2087 | /** |