@@ -338,9 +338,9 @@ discard block |
||
338 | 338 | $columnName = $this->quoteStrategy->getColumnName($versionField, $versionedClass, $this->platform); |
339 | 339 | |
340 | 340 | // FIXME: Order with composite keys might not be correct |
341 | - $sql = 'SELECT ' . $columnName |
|
342 | - . ' FROM ' . $tableName |
|
343 | - . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?'; |
|
341 | + $sql = 'SELECT '.$columnName |
|
342 | + . ' FROM '.$tableName |
|
343 | + . ' WHERE '.implode(' = ? AND ', $identifier).' = ?'; |
|
344 | 344 | |
345 | 345 | $flatId = $this->identifierFlattener->flattenIdentifier($versionedClass, $id); |
346 | 346 | |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | } |
417 | 417 | |
418 | 418 | $params[] = $value; |
419 | - $set[] = $column . ' = ' . $placeholder; |
|
419 | + $set[] = $column.' = '.$placeholder; |
|
420 | 420 | $types[] = $this->columnTypes[$columnName]; |
421 | 421 | } |
422 | 422 | |
@@ -464,18 +464,18 @@ discard block |
||
464 | 464 | case Type::SMALLINT: |
465 | 465 | case Type::INTEGER: |
466 | 466 | case Type::BIGINT: |
467 | - $set[] = $versionColumn . ' = ' . $versionColumn . ' + 1'; |
|
467 | + $set[] = $versionColumn.' = '.$versionColumn.' + 1'; |
|
468 | 468 | break; |
469 | 469 | |
470 | 470 | case Type::DATETIME: |
471 | - $set[] = $versionColumn . ' = CURRENT_TIMESTAMP'; |
|
471 | + $set[] = $versionColumn.' = CURRENT_TIMESTAMP'; |
|
472 | 472 | break; |
473 | 473 | } |
474 | 474 | } |
475 | 475 | |
476 | - $sql = 'UPDATE ' . $quotedTableName |
|
477 | - . ' SET ' . implode(', ', $set) |
|
478 | - . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?'; |
|
476 | + $sql = 'UPDATE '.$quotedTableName |
|
477 | + . ' SET '.implode(', ', $set) |
|
478 | + . ' WHERE '.implode(' = ? AND ', $where).' = ?'; |
|
479 | 479 | |
480 | 480 | $result = $this->conn->executeUpdate($sql, $params, $types); |
481 | 481 | |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | |
519 | 519 | |
520 | 520 | if ($selfReferential) { |
521 | - $otherColumns = (! $mapping['isOwningSide']) |
|
521 | + $otherColumns = ( ! $mapping['isOwningSide']) |
|
522 | 522 | ? $association['joinTable']['joinColumns'] |
523 | 523 | : $association['joinTable']['inverseJoinColumns']; |
524 | 524 | } |
@@ -556,7 +556,7 @@ discard block |
||
556 | 556 | $tableName = $this->quoteStrategy->getTableName($class, $this->platform); |
557 | 557 | $idColumns = $this->quoteStrategy->getIdentifierColumnNames($class, $this->platform); |
558 | 558 | $id = array_combine($idColumns, $identifier); |
559 | - $types = array_map(function ($identifier) use ($class, $self) { |
|
559 | + $types = array_map(function($identifier) use ($class, $self) { |
|
560 | 560 | if (isset($class->fieldMappings[$identifier])) { |
561 | 561 | return $class->fieldMappings[$identifier]['type']; |
562 | 562 | } |
@@ -783,7 +783,7 @@ discard block |
||
783 | 783 | |
784 | 784 | // unset the old value and set the new sql aliased value here. By definition |
785 | 785 | // unset($identifier[$targetKeyColumn] works here with how UnitOfWork::createEntity() calls this method. |
786 | - $identifier[$this->getSQLTableAlias($targetClass->name) . "." . $targetKeyColumn] = |
|
786 | + $identifier[$this->getSQLTableAlias($targetClass->name).".".$targetKeyColumn] = |
|
787 | 787 | $sourceClass->reflFields[$sourceClass->fieldNames[$sourceKeyColumn]]->getValue($sourceEntity); |
788 | 788 | |
789 | 789 | unset($identifier[$targetKeyColumn]); |
@@ -1019,7 +1019,7 @@ discard block |
||
1019 | 1019 | ); |
1020 | 1020 | } |
1021 | 1021 | |
1022 | - $criteria[$quotedJoinTable . '.' . $quotedKeyColumn] = $value; |
|
1022 | + $criteria[$quotedJoinTable.'.'.$quotedKeyColumn] = $value; |
|
1023 | 1023 | $parameters[] = [ |
1024 | 1024 | 'value' => $value, |
1025 | 1025 | 'field' => $field, |
@@ -1062,11 +1062,11 @@ discard block |
||
1062 | 1062 | |
1063 | 1063 | switch ($lockMode) { |
1064 | 1064 | case LockMode::PESSIMISTIC_READ: |
1065 | - $lockSql = ' ' . $this->platform->getReadLockSql(); |
|
1065 | + $lockSql = ' '.$this->platform->getReadLockSql(); |
|
1066 | 1066 | break; |
1067 | 1067 | |
1068 | 1068 | case LockMode::PESSIMISTIC_WRITE: |
1069 | - $lockSql = ' ' . $this->platform->getWriteLockSql(); |
|
1069 | + $lockSql = ' '.$this->platform->getWriteLockSql(); |
|
1070 | 1070 | break; |
1071 | 1071 | } |
1072 | 1072 | |
@@ -1077,14 +1077,14 @@ discard block |
||
1077 | 1077 | |
1078 | 1078 | if ('' !== $filterSql) { |
1079 | 1079 | $conditionSql = $conditionSql |
1080 | - ? $conditionSql . ' AND ' . $filterSql |
|
1080 | + ? $conditionSql.' AND '.$filterSql |
|
1081 | 1081 | : $filterSql; |
1082 | 1082 | } |
1083 | 1083 | |
1084 | - $select = 'SELECT ' . $columnList; |
|
1085 | - $from = ' FROM ' . $tableName . ' '. $tableAlias; |
|
1086 | - $join = $this->currentPersisterContext->selectJoinSql . $joinSql; |
|
1087 | - $where = ($conditionSql ? ' WHERE ' . $conditionSql : ''); |
|
1084 | + $select = 'SELECT '.$columnList; |
|
1085 | + $from = ' FROM '.$tableName.' '.$tableAlias; |
|
1086 | + $join = $this->currentPersisterContext->selectJoinSql.$joinSql; |
|
1087 | + $where = ($conditionSql ? ' WHERE '.$conditionSql : ''); |
|
1088 | 1088 | $lock = $this->platform->appendLockHint($from, $lockMode); |
1089 | 1089 | $query = $select |
1090 | 1090 | . $lock |
@@ -1092,7 +1092,7 @@ discard block |
||
1092 | 1092 | . $where |
1093 | 1093 | . $orderBySql; |
1094 | 1094 | |
1095 | - return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql; |
|
1095 | + return $this->platform->modifyLimitQuery($query, $limit, $offset).$lockSql; |
|
1096 | 1096 | } |
1097 | 1097 | |
1098 | 1098 | /** |
@@ -1111,13 +1111,13 @@ discard block |
||
1111 | 1111 | |
1112 | 1112 | if ('' !== $filterSql) { |
1113 | 1113 | $conditionSql = $conditionSql |
1114 | - ? $conditionSql . ' AND ' . $filterSql |
|
1114 | + ? $conditionSql.' AND '.$filterSql |
|
1115 | 1115 | : $filterSql; |
1116 | 1116 | } |
1117 | 1117 | |
1118 | 1118 | $sql = 'SELECT COUNT(*) ' |
1119 | - . 'FROM ' . $tableName . ' ' . $tableAlias |
|
1120 | - . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql); |
|
1119 | + . 'FROM '.$tableName.' '.$tableAlias |
|
1120 | + . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql); |
|
1121 | 1121 | |
1122 | 1122 | return $sql; |
1123 | 1123 | } |
@@ -1150,7 +1150,7 @@ discard block |
||
1150 | 1150 | : $baseTableAlias; |
1151 | 1151 | |
1152 | 1152 | $columnName = $this->quoteStrategy->getColumnName($fieldName, $this->class, $this->platform); |
1153 | - $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation; |
|
1153 | + $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation; |
|
1154 | 1154 | |
1155 | 1155 | continue; |
1156 | 1156 | } |
@@ -1167,7 +1167,7 @@ discard block |
||
1167 | 1167 | |
1168 | 1168 | foreach ($this->class->associationMappings[$fieldName]['joinColumns'] as $joinColumn) { |
1169 | 1169 | $columnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform); |
1170 | - $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation; |
|
1170 | + $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation; |
|
1171 | 1171 | } |
1172 | 1172 | |
1173 | 1173 | continue; |
@@ -1176,7 +1176,7 @@ discard block |
||
1176 | 1176 | throw ORMException::unrecognizedField($fieldName); |
1177 | 1177 | } |
1178 | 1178 | |
1179 | - return ' ORDER BY ' . implode(', ', $orderByList); |
|
1179 | + return ' ORDER BY '.implode(', ', $orderByList); |
|
1180 | 1180 | } |
1181 | 1181 | |
1182 | 1182 | /** |
@@ -1204,8 +1204,8 @@ discard block |
||
1204 | 1204 | $columnList[] = $this->getSelectColumnSQL($field, $this->class); |
1205 | 1205 | } |
1206 | 1206 | |
1207 | - $this->currentPersisterContext->selectJoinSql = ''; |
|
1208 | - $eagerAliasCounter = 0; |
|
1207 | + $this->currentPersisterContext->selectJoinSql = ''; |
|
1208 | + $eagerAliasCounter = 0; |
|
1209 | 1209 | |
1210 | 1210 | foreach ($this->class->associationMappings as $assocField => $assoc) { |
1211 | 1211 | $assocColumnSQL = $this->getSelectColumnAssociationSQL($assocField, $assoc, $this->class); |
@@ -1231,7 +1231,7 @@ discard block |
||
1231 | 1231 | continue; // now this is why you shouldn't use inheritance |
1232 | 1232 | } |
1233 | 1233 | |
1234 | - $assocAlias = 'e' . ($eagerAliasCounter++); |
|
1234 | + $assocAlias = 'e'.($eagerAliasCounter++); |
|
1235 | 1235 | $this->currentPersisterContext->rsm->addJoinedEntityResult($assoc['targetEntity'], $assocAlias, 'r', $assocField); |
1236 | 1236 | |
1237 | 1237 | foreach ($eagerEntity->fieldNames as $field) { |
@@ -1264,14 +1264,14 @@ discard block |
||
1264 | 1264 | $joinTableName = $this->quoteStrategy->getTableName($eagerEntity, $this->platform); |
1265 | 1265 | |
1266 | 1266 | if ($assoc['isOwningSide']) { |
1267 | - $tableAlias = $this->getSQLTableAlias($association['targetEntity'], $assocAlias); |
|
1268 | - $this->currentPersisterContext->selectJoinSql .= ' ' . $this->getJoinSQLForJoinColumns($association['joinColumns']); |
|
1267 | + $tableAlias = $this->getSQLTableAlias($association['targetEntity'], $assocAlias); |
|
1268 | + $this->currentPersisterContext->selectJoinSql .= ' '.$this->getJoinSQLForJoinColumns($association['joinColumns']); |
|
1269 | 1269 | |
1270 | 1270 | foreach ($association['joinColumns'] as $joinColumn) { |
1271 | 1271 | $sourceCol = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform); |
1272 | 1272 | $targetCol = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform); |
1273 | 1273 | $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity']) |
1274 | - . '.' . $sourceCol . ' = ' . $tableAlias . '.' . $targetCol; |
|
1274 | + . '.'.$sourceCol.' = '.$tableAlias.'.'.$targetCol; |
|
1275 | 1275 | } |
1276 | 1276 | |
1277 | 1277 | // Add filter SQL |
@@ -1287,12 +1287,12 @@ discard block |
||
1287 | 1287 | $sourceCol = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform); |
1288 | 1288 | $targetCol = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform); |
1289 | 1289 | |
1290 | - $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity'], $assocAlias) . '.' . $sourceCol . ' = ' |
|
1291 | - . $this->getSQLTableAlias($association['targetEntity']) . '.' . $targetCol; |
|
1290 | + $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity'], $assocAlias).'.'.$sourceCol.' = ' |
|
1291 | + . $this->getSQLTableAlias($association['targetEntity']).'.'.$targetCol; |
|
1292 | 1292 | } |
1293 | 1293 | } |
1294 | 1294 | |
1295 | - $this->currentPersisterContext->selectJoinSql .= ' ' . $joinTableName . ' ' . $joinTableAlias . ' ON '; |
|
1295 | + $this->currentPersisterContext->selectJoinSql .= ' '.$joinTableName.' '.$joinTableAlias.' ON '; |
|
1296 | 1296 | $this->currentPersisterContext->selectJoinSql .= implode(' AND ', $joinCondition); |
1297 | 1297 | } |
1298 | 1298 | |
@@ -1313,7 +1313,7 @@ discard block |
||
1313 | 1313 | */ |
1314 | 1314 | protected function getSelectColumnAssociationSQL($field, $assoc, ClassMetadata $class, $alias = 'r') |
1315 | 1315 | { |
1316 | - if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) ) { |
|
1316 | + if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE)) { |
|
1317 | 1317 | return ''; |
1318 | 1318 | } |
1319 | 1319 | |
@@ -1362,10 +1362,10 @@ discard block |
||
1362 | 1362 | foreach ($joinColumns as $joinColumn) { |
1363 | 1363 | $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform); |
1364 | 1364 | $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform); |
1365 | - $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableName . '.' . $quotedSourceColumn; |
|
1365 | + $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableName.'.'.$quotedSourceColumn; |
|
1366 | 1366 | } |
1367 | 1367 | |
1368 | - return ' INNER JOIN ' . $joinTableName . ' ON ' . implode(' AND ', $conditions); |
|
1368 | + return ' INNER JOIN '.$joinTableName.' ON '.implode(' AND ', $conditions); |
|
1369 | 1369 | } |
1370 | 1370 | |
1371 | 1371 | /** |
@@ -1444,7 +1444,7 @@ discard block |
||
1444 | 1444 | continue; |
1445 | 1445 | } |
1446 | 1446 | |
1447 | - if (! $this->class->isIdGeneratorIdentity() || $this->class->identifier[0] != $name) { |
|
1447 | + if ( ! $this->class->isIdGeneratorIdentity() || $this->class->identifier[0] != $name) { |
|
1448 | 1448 | $columns[] = $this->quoteStrategy->getColumnName($name, $this->class, $this->platform); |
1449 | 1449 | $this->columnTypes[$name] = $this->class->fieldMappings[$name]['type']; |
1450 | 1450 | } |
@@ -1465,7 +1465,7 @@ discard block |
||
1465 | 1465 | */ |
1466 | 1466 | protected function getSelectColumnSQL($field, ClassMetadata $class, $alias = 'r') |
1467 | 1467 | { |
1468 | - $root = $alias == 'r' ? '' : $alias ; |
|
1468 | + $root = $alias == 'r' ? '' : $alias; |
|
1469 | 1469 | $tableAlias = $this->getSQLTableAlias($class->name, $root); |
1470 | 1470 | $fieldMapping = $class->fieldMappings[$field]; |
1471 | 1471 | $sql = sprintf('%s.%s', $tableAlias, $this->quoteStrategy->getColumnName($field, $class, $this->platform)); |
@@ -1478,7 +1478,7 @@ discard block |
||
1478 | 1478 | $sql = $type->convertToPHPValueSQL($sql, $this->platform); |
1479 | 1479 | } |
1480 | 1480 | |
1481 | - return $sql . ' AS ' . $columnAlias; |
|
1481 | + return $sql.' AS '.$columnAlias; |
|
1482 | 1482 | } |
1483 | 1483 | |
1484 | 1484 | /** |
@@ -1494,14 +1494,14 @@ discard block |
||
1494 | 1494 | protected function getSQLTableAlias($className, $assocName = '') |
1495 | 1495 | { |
1496 | 1496 | if ($assocName) { |
1497 | - $className .= '#' . $assocName; |
|
1497 | + $className .= '#'.$assocName; |
|
1498 | 1498 | } |
1499 | 1499 | |
1500 | 1500 | if (isset($this->currentPersisterContext->sqlTableAliases[$className])) { |
1501 | 1501 | return $this->currentPersisterContext->sqlTableAliases[$className]; |
1502 | 1502 | } |
1503 | 1503 | |
1504 | - $tableAlias = 't' . $this->currentPersisterContext->sqlAliasCounter++; |
|
1504 | + $tableAlias = 't'.$this->currentPersisterContext->sqlAliasCounter++; |
|
1505 | 1505 | |
1506 | 1506 | $this->currentPersisterContext->sqlTableAliases[$className] = $tableAlias; |
1507 | 1507 | |
@@ -1528,7 +1528,7 @@ discard block |
||
1528 | 1528 | } |
1529 | 1529 | |
1530 | 1530 | $lock = $this->getLockTablesSql($lockMode); |
1531 | - $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' '; |
|
1531 | + $where = ($conditionSql ? ' WHERE '.$conditionSql : '').' '; |
|
1532 | 1532 | $sql = 'SELECT 1 ' |
1533 | 1533 | . $lock |
1534 | 1534 | . $where |
@@ -1550,7 +1550,7 @@ discard block |
||
1550 | 1550 | { |
1551 | 1551 | return $this->platform->appendLockHint( |
1552 | 1552 | 'FROM ' |
1553 | - . $this->quoteStrategy->getTableName($this->class, $this->platform) . ' ' |
|
1553 | + . $this->quoteStrategy->getTableName($this->class, $this->platform).' ' |
|
1554 | 1554 | . $this->getSQLTableAlias($this->class->name), |
1555 | 1555 | $lockMode |
1556 | 1556 | ); |
@@ -1602,19 +1602,19 @@ discard block |
||
1602 | 1602 | |
1603 | 1603 | if (null !== $comparison) { |
1604 | 1604 | // special case null value handling |
1605 | - if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null ===$value) { |
|
1606 | - $selectedColumns[] = $column . ' IS NULL'; |
|
1605 | + if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null === $value) { |
|
1606 | + $selectedColumns[] = $column.' IS NULL'; |
|
1607 | 1607 | |
1608 | 1608 | continue; |
1609 | 1609 | } |
1610 | 1610 | |
1611 | 1611 | if ($comparison === Comparison::NEQ && null === $value) { |
1612 | - $selectedColumns[] = $column . ' IS NOT NULL'; |
|
1612 | + $selectedColumns[] = $column.' IS NOT NULL'; |
|
1613 | 1613 | |
1614 | 1614 | continue; |
1615 | 1615 | } |
1616 | 1616 | |
1617 | - $selectedColumns[] = $column . ' ' . sprintf(self::$comparisonMap[$comparison], $placeholder); |
|
1617 | + $selectedColumns[] = $column.' '.sprintf(self::$comparisonMap[$comparison], $placeholder); |
|
1618 | 1618 | |
1619 | 1619 | continue; |
1620 | 1620 | } |
@@ -1662,7 +1662,7 @@ discard block |
||
1662 | 1662 | ? $this->class->fieldMappings[$field]['inherited'] |
1663 | 1663 | : $this->class->name; |
1664 | 1664 | |
1665 | - return [$this->getSQLTableAlias($className) . '.' . $this->quoteStrategy->getColumnName($field, $this->class, $this->platform)]; |
|
1665 | + return [$this->getSQLTableAlias($className).'.'.$this->quoteStrategy->getColumnName($field, $this->class, $this->platform)]; |
|
1666 | 1666 | } |
1667 | 1667 | |
1668 | 1668 | if (isset($this->class->associationMappings[$field])) { |
@@ -1683,7 +1683,7 @@ discard block |
||
1683 | 1683 | |
1684 | 1684 | |
1685 | 1685 | foreach ($joinColumns as $joinColumn) { |
1686 | - $columns[] = $joinTableName . '.' . $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform); |
|
1686 | + $columns[] = $joinTableName.'.'.$this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform); |
|
1687 | 1687 | } |
1688 | 1688 | |
1689 | 1689 | } else { |
@@ -1691,12 +1691,12 @@ discard block |
||
1691 | 1691 | throw ORMException::invalidFindByInverseAssociation($this->class->name, $field); |
1692 | 1692 | } |
1693 | 1693 | |
1694 | - $className = (isset($association['inherited'])) |
|
1694 | + $className = (isset($association['inherited'])) |
|
1695 | 1695 | ? $association['inherited'] |
1696 | 1696 | : $this->class->name; |
1697 | 1697 | |
1698 | 1698 | foreach ($association['joinColumns'] as $joinColumn) { |
1699 | - $columns[] = $this->getSQLTableAlias($className) . '.' . $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform); |
|
1699 | + $columns[] = $this->getSQLTableAlias($className).'.'.$this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform); |
|
1700 | 1700 | } |
1701 | 1701 | } |
1702 | 1702 | return $columns; |
@@ -1788,7 +1788,7 @@ discard block |
||
1788 | 1788 | $value = $value[$this->em->getClassMetadata($sourceClass->associationMappings[$field]['targetEntity'])->identifier[0]]; |
1789 | 1789 | } |
1790 | 1790 | |
1791 | - $criteria[$tableAlias . "." . $targetKeyColumn] = $value; |
|
1791 | + $criteria[$tableAlias.".".$targetKeyColumn] = $value; |
|
1792 | 1792 | $parameters[] = [ |
1793 | 1793 | 'value' => $value, |
1794 | 1794 | 'field' => $field, |
@@ -1801,7 +1801,7 @@ discard block |
||
1801 | 1801 | $field = $sourceClass->fieldNames[$sourceKeyColumn]; |
1802 | 1802 | $value = $sourceClass->reflFields[$field]->getValue($sourceEntity); |
1803 | 1803 | |
1804 | - $criteria[$tableAlias . "." . $targetKeyColumn] = $value; |
|
1804 | + $criteria[$tableAlias.".".$targetKeyColumn] = $value; |
|
1805 | 1805 | $parameters[] = [ |
1806 | 1806 | 'value' => $value, |
1807 | 1807 | 'field' => $field, |
@@ -1888,7 +1888,7 @@ discard block |
||
1888 | 1888 | $assoc = $class->associationMappings[$field]; |
1889 | 1889 | $class = $this->em->getClassMetadata($assoc['targetEntity']); |
1890 | 1890 | |
1891 | - if (! $assoc['isOwningSide']) { |
|
1891 | + if ( ! $assoc['isOwningSide']) { |
|
1892 | 1892 | $assoc = $class->associationMappings[$assoc['mappedBy']]; |
1893 | 1893 | $class = $this->em->getClassMetadata($assoc['targetEntity']); |
1894 | 1894 | } |
@@ -1897,7 +1897,7 @@ discard block |
||
1897 | 1897 | ? $assoc['relationToTargetKeyColumns'] |
1898 | 1898 | : $assoc['sourceToTargetKeyColumns']; |
1899 | 1899 | |
1900 | - foreach ($columns as $column){ |
|
1900 | + foreach ($columns as $column) { |
|
1901 | 1901 | $types[] = PersisterHelper::getTypeOfColumn($column, $class, $this->em); |
1902 | 1902 | } |
1903 | 1903 | break; |
@@ -1908,8 +1908,8 @@ discard block |
||
1908 | 1908 | } |
1909 | 1909 | |
1910 | 1910 | if (is_array($value)) { |
1911 | - return array_map(function ($type) { |
|
1912 | - return '[' . $type . ']'; |
|
1911 | + return array_map(function($type) { |
|
1912 | + return '['.$type.']'; |
|
1913 | 1913 | }, $types); |
1914 | 1914 | } |
1915 | 1915 | |
@@ -1982,12 +1982,12 @@ discard block |
||
1982 | 1982 | |
1983 | 1983 | $sql = 'SELECT 1 ' |
1984 | 1984 | . $this->getLockTablesSql(null) |
1985 | - . ' WHERE ' . $this->getSelectConditionSQL($criteria); |
|
1985 | + . ' WHERE '.$this->getSelectConditionSQL($criteria); |
|
1986 | 1986 | |
1987 | 1987 | list($params, $types) = $this->expandParameters($criteria); |
1988 | 1988 | |
1989 | 1989 | if (null !== $extraConditions) { |
1990 | - $sql .= ' AND ' . $this->getSelectConditionCriteriaSQL($extraConditions); |
|
1990 | + $sql .= ' AND '.$this->getSelectConditionCriteriaSQL($extraConditions); |
|
1991 | 1991 | list($criteriaParams, $criteriaTypes) = $this->expandCriteriaParameters($extraConditions); |
1992 | 1992 | |
1993 | 1993 | $params = array_merge($params, $criteriaParams); |
@@ -1995,7 +1995,7 @@ discard block |
||
1995 | 1995 | } |
1996 | 1996 | |
1997 | 1997 | if ($filterSql = $this->generateFilterConditionSQL($this->class, $alias)) { |
1998 | - $sql .= ' AND ' . $filterSql; |
|
1998 | + $sql .= ' AND '.$filterSql; |
|
1999 | 1999 | } |
2000 | 2000 | |
2001 | 2001 | return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); |
@@ -2042,13 +2042,13 @@ discard block |
||
2042 | 2042 | |
2043 | 2043 | foreach ($this->em->getFilters()->getEnabledFilters() as $filter) { |
2044 | 2044 | if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) { |
2045 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
2045 | + $filterClauses[] = '('.$filterExpr.')'; |
|
2046 | 2046 | } |
2047 | 2047 | } |
2048 | 2048 | |
2049 | 2049 | $sql = implode(' AND ', $filterClauses); |
2050 | 2050 | |
2051 | - return $sql ? "(" . $sql . ")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL" |
|
2051 | + return $sql ? "(".$sql.")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL" |
|
2052 | 2052 | } |
2053 | 2053 | |
2054 | 2054 | /** |
@@ -58,7 +58,7 @@ |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | if (is_array($value)) { |
61 | - return '[' . static::inferType(current($value)) . ']'; |
|
61 | + return '['.static::inferType(current($value)).']'; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | return \PDO::PARAM_STR; |