@@ -27,10 +27,10 @@ |
||
27 | 27 | |
28 | 28 | if (empty($customCollectionClassName)) { |
29 | 29 | $customCollectionClassName = PersistentCollection::class; |
30 | - } elseif (! is_a($customCollectionClassName, PersistentCollection::class, true)) { |
|
30 | + } elseif ( ! is_a($customCollectionClassName, PersistentCollection::class, true)) { |
|
31 | 31 | throw new ORMInvalidArgumentException( |
32 | - 'The custom collection specified for entity ' . $class->getName() |
|
33 | - . ' (' . $customCollectionClassName . ') must extend ' . PersistentCollection::class . '.' |
|
32 | + 'The custom collection specified for entity '.$class->getName() |
|
33 | + . ' ('.$customCollectionClassName.') must extend '.PersistentCollection::class.'.' |
|
34 | 34 | ); |
35 | 35 | } |
36 | 36 |
@@ -348,9 +348,9 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | /** |