@@ -95,15 +95,15 @@ |
||
95 | 95 | $expressionList[] = $this->dispatch($child); |
96 | 96 | } |
97 | 97 | |
98 | - switch($expr->getType()) { |
|
98 | + switch ($expr->getType()) { |
|
99 | 99 | case CompositeExpression::TYPE_AND: |
100 | - return '(' . implode(' AND ', $expressionList) . ')'; |
|
100 | + return '('.implode(' AND ', $expressionList).')'; |
|
101 | 101 | |
102 | 102 | case CompositeExpression::TYPE_OR: |
103 | - return '(' . implode(' OR ', $expressionList) . ')'; |
|
103 | + return '('.implode(' OR ', $expressionList).')'; |
|
104 | 104 | |
105 | 105 | default: |
106 | - throw new \RuntimeException("Unknown composite " . $expr->getType()); |
|
106 | + throw new \RuntimeException("Unknown composite ".$expr->getType()); |
|
107 | 107 | } |
108 | 108 | } |
109 | 109 |
@@ -29,7 +29,7 @@ |
||
29 | 29 | static public function matchingAssocationFieldRequiresObject($class, $associationName) |
30 | 30 | { |
31 | 31 | return new self(sprintf( |
32 | - "Cannot match on %s::%s with a non-object value. Matching objects by id is " . |
|
32 | + "Cannot match on %s::%s with a non-object value. Matching objects by id is ". |
|
33 | 33 | "not compatible with matching on an in-memory collection, which compares objects by reference.", |
34 | 34 | $class, $associationName |
35 | 35 | )); |
@@ -39,7 +39,7 @@ |
||
39 | 39 | /** |
40 | 40 | * @var array |
41 | 41 | */ |
42 | - private $types = array(); |
|
42 | + private $types = array(); |
|
43 | 43 | |
44 | 44 | /** |
45 | 45 | * Converts a comparison expression into the target query language output. |
@@ -339,8 +339,8 @@ discard block |
||
339 | 339 | |
340 | 340 | // FIXME: Order with composite keys might not be correct |
341 | 341 | $sql = 'SELECT ' . $columnName |
342 | - . ' FROM ' . $tableName |
|
343 | - . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?'; |
|
342 | + . ' FROM ' . $tableName |
|
343 | + . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?'; |
|
344 | 344 | |
345 | 345 | $flatId = $this->identifierFlattener->flattenIdentifier($versionedClass, $id); |
346 | 346 | |
@@ -474,8 +474,8 @@ discard block |
||
474 | 474 | } |
475 | 475 | |
476 | 476 | $sql = 'UPDATE ' . $quotedTableName |
477 | - . ' SET ' . implode(', ', $set) |
|
478 | - . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?'; |
|
477 | + . ' SET ' . implode(', ', $set) |
|
478 | + . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?'; |
|
479 | 479 | |
480 | 480 | $result = $this->conn->executeUpdate($sql, $params, $types); |
481 | 481 | |
@@ -1528,9 +1528,9 @@ discard block |
||
1528 | 1528 | $lock = $this->getLockTablesSql($lockMode); |
1529 | 1529 | $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' '; |
1530 | 1530 | $sql = 'SELECT 1 ' |
1531 | - . $lock |
|
1532 | - . $where |
|
1533 | - . $lockSql; |
|
1531 | + . $lock |
|
1532 | + . $where |
|
1533 | + . $lockSql; |
|
1534 | 1534 | |
1535 | 1535 | list($params, $types) = $this->expandParameters($criteria); |
1536 | 1536 | |
@@ -1981,8 +1981,8 @@ discard block |
||
1981 | 1981 | $alias = $this->getSQLTableAlias($this->class->name); |
1982 | 1982 | |
1983 | 1983 | $sql = 'SELECT 1 ' |
1984 | - . $this->getLockTablesSql(null) |
|
1985 | - . ' WHERE ' . $this->getSelectConditionSQL($criteria); |
|
1984 | + . $this->getLockTablesSql(null) |
|
1985 | + . ' WHERE ' . $this->getSelectConditionSQL($criteria); |
|
1986 | 1986 | |
1987 | 1987 | list($params, $types) = $this->expandParameters($criteria); |
1988 | 1988 | |
@@ -2012,9 +2012,9 @@ discard block |
||
2012 | 2012 | { |
2013 | 2013 | // if one of the join columns is nullable, return left join |
2014 | 2014 | foreach ($joinColumns as $joinColumn) { |
2015 | - if ( ! isset($joinColumn['nullable']) || $joinColumn['nullable']) { |
|
2016 | - return 'LEFT JOIN'; |
|
2017 | - } |
|
2015 | + if ( ! isset($joinColumn['nullable']) || $joinColumn['nullable']) { |
|
2016 | + return 'LEFT JOIN'; |
|
2017 | + } |
|
2018 | 2018 | } |
2019 | 2019 | |
2020 | 2020 | return 'INNER JOIN'; |
@@ -334,9 +334,9 @@ discard block |
||
334 | 334 | $identifier = $this->quoteStrategy->getIdentifierColumnNames($versionedClass, $this->platform); |
335 | 335 | |
336 | 336 | // FIXME: Order with composite keys might not be correct |
337 | - $sql = 'SELECT ' . $columnName |
|
338 | - . ' FROM ' . $tableName |
|
339 | - . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?'; |
|
337 | + $sql = 'SELECT '.$columnName |
|
338 | + . ' FROM '.$tableName |
|
339 | + . ' WHERE '.implode(' = ? AND ', $identifier).' = ?'; |
|
340 | 340 | |
341 | 341 | $flattenedId = $this->identifierFlattener->flattenIdentifier($versionedClass, $id); |
342 | 342 | $value = $this->conn->fetchColumn($sql, array_values($flattenedId)); |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | $placeholder = $type->convertToDatabaseValueSQL('?', $this->platform); |
403 | 403 | } |
404 | 404 | |
405 | - $set[] = $quotedColumnName . ' = ' . $placeholder; |
|
405 | + $set[] = $quotedColumnName.' = '.$placeholder; |
|
406 | 406 | $params[] = $value; |
407 | 407 | $types[] = $type; |
408 | 408 | } |
@@ -455,18 +455,18 @@ discard block |
||
455 | 455 | case Type::SMALLINT: |
456 | 456 | case Type::INTEGER: |
457 | 457 | case Type::BIGINT: |
458 | - $set[] = $versionColumnName . ' = ' . $versionColumnName . ' + 1'; |
|
458 | + $set[] = $versionColumnName.' = '.$versionColumnName.' + 1'; |
|
459 | 459 | break; |
460 | 460 | |
461 | 461 | case Type::DATETIME: |
462 | - $set[] = $versionColumnName . ' = CURRENT_TIMESTAMP'; |
|
462 | + $set[] = $versionColumnName.' = CURRENT_TIMESTAMP'; |
|
463 | 463 | break; |
464 | 464 | } |
465 | 465 | } |
466 | 466 | |
467 | - $sql = 'UPDATE ' . $quotedTableName |
|
468 | - . ' SET ' . implode(', ', $set) |
|
469 | - . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?'; |
|
467 | + $sql = 'UPDATE '.$quotedTableName |
|
468 | + . ' SET '.implode(', ', $set) |
|
469 | + . ' WHERE '.implode(' = ? AND ', $where).' = ?'; |
|
470 | 470 | |
471 | 471 | $result = $this->conn->executeUpdate($sql, $params, $types); |
472 | 472 | |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | |
510 | 510 | |
511 | 511 | if ($selfReferential) { |
512 | - $otherColumns = (! $mapping['isOwningSide']) |
|
512 | + $otherColumns = ( ! $mapping['isOwningSide']) |
|
513 | 513 | ? $association['joinTable']['joinColumns'] |
514 | 514 | : $association['joinTable']['inverseJoinColumns']; |
515 | 515 | } |
@@ -547,7 +547,7 @@ discard block |
||
547 | 547 | $tableName = $this->quoteStrategy->getTableName($class, $this->platform); |
548 | 548 | $idColumns = $this->quoteStrategy->getIdentifierColumnNames($class, $this->platform); |
549 | 549 | $id = array_combine($idColumns, $identifier); |
550 | - $types = array_map(function ($identifier) use ($class, $self) { |
|
550 | + $types = array_map(function($identifier) use ($class, $self) { |
|
551 | 551 | if (($property = $class->getProperty($identifier)) !== null) { |
552 | 552 | return $property->getType(); |
553 | 553 | } |
@@ -775,7 +775,7 @@ discard block |
||
775 | 775 | |
776 | 776 | // unset the old value and set the new sql aliased value here. By definition |
777 | 777 | // unset($identifier[$targetKeyColumn] works here with how UnitOfWork::createEntity() calls this method. |
778 | - $identifier[$this->getSQLTableAlias($targetClass->getTableName()) . "." . $targetKeyColumn] = |
|
778 | + $identifier[$this->getSQLTableAlias($targetClass->getTableName()).".".$targetKeyColumn] = |
|
779 | 779 | $sourceClass->reflFields[$sourceClass->fieldNames[$sourceKeyColumn]]->getValue($sourceEntity); |
780 | 780 | |
781 | 781 | unset($identifier[$targetKeyColumn]); |
@@ -983,7 +983,7 @@ discard block |
||
983 | 983 | |
984 | 984 | foreach ($joinColumns as $joinColumn) { |
985 | 985 | $sourceKeyColumn = $joinColumn['referencedColumnName']; |
986 | - $quotedKeyColumn = $this->platform->quoteIdentifier($joinColumn['name']);; |
|
986 | + $quotedKeyColumn = $this->platform->quoteIdentifier($joinColumn['name']); ; |
|
987 | 987 | |
988 | 988 | switch (true) { |
989 | 989 | case $sourceClass->containsForeignIdentifier: |
@@ -1009,7 +1009,7 @@ discard block |
||
1009 | 1009 | ); |
1010 | 1010 | } |
1011 | 1011 | |
1012 | - $criteria[$quotedJoinTable . '.' . $quotedKeyColumn] = $value; |
|
1012 | + $criteria[$quotedJoinTable.'.'.$quotedKeyColumn] = $value; |
|
1013 | 1013 | |
1014 | 1014 | $parameters[] = array( |
1015 | 1015 | 'value' => $value, |
@@ -1054,11 +1054,11 @@ discard block |
||
1054 | 1054 | |
1055 | 1055 | switch ($lockMode) { |
1056 | 1056 | case LockMode::PESSIMISTIC_READ: |
1057 | - $lockSql = ' ' . $this->platform->getReadLockSql(); |
|
1057 | + $lockSql = ' '.$this->platform->getReadLockSql(); |
|
1058 | 1058 | break; |
1059 | 1059 | |
1060 | 1060 | case LockMode::PESSIMISTIC_WRITE: |
1061 | - $lockSql = ' ' . $this->platform->getWriteLockSql(); |
|
1061 | + $lockSql = ' '.$this->platform->getWriteLockSql(); |
|
1062 | 1062 | break; |
1063 | 1063 | } |
1064 | 1064 | |
@@ -1069,14 +1069,14 @@ discard block |
||
1069 | 1069 | |
1070 | 1070 | if ('' !== $filterSql) { |
1071 | 1071 | $conditionSql = $conditionSql |
1072 | - ? $conditionSql . ' AND ' . $filterSql |
|
1072 | + ? $conditionSql.' AND '.$filterSql |
|
1073 | 1073 | : $filterSql; |
1074 | 1074 | } |
1075 | 1075 | |
1076 | - $select = 'SELECT ' . $columnList; |
|
1077 | - $from = ' FROM ' . $tableName . ' '. $tableAlias; |
|
1078 | - $join = $this->currentPersisterContext->selectJoinSql . $joinSql; |
|
1079 | - $where = ($conditionSql ? ' WHERE ' . $conditionSql : ''); |
|
1076 | + $select = 'SELECT '.$columnList; |
|
1077 | + $from = ' FROM '.$tableName.' '.$tableAlias; |
|
1078 | + $join = $this->currentPersisterContext->selectJoinSql.$joinSql; |
|
1079 | + $where = ($conditionSql ? ' WHERE '.$conditionSql : ''); |
|
1080 | 1080 | $lock = $this->platform->appendLockHint($from, $lockMode); |
1081 | 1081 | $query = $select |
1082 | 1082 | . $lock |
@@ -1084,7 +1084,7 @@ discard block |
||
1084 | 1084 | . $where |
1085 | 1085 | . $orderBySql; |
1086 | 1086 | |
1087 | - return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql; |
|
1087 | + return $this->platform->modifyLimitQuery($query, $limit, $offset).$lockSql; |
|
1088 | 1088 | } |
1089 | 1089 | |
1090 | 1090 | /** |
@@ -1103,13 +1103,13 @@ discard block |
||
1103 | 1103 | |
1104 | 1104 | if ('' !== $filterSql) { |
1105 | 1105 | $conditionSql = $conditionSql |
1106 | - ? $conditionSql . ' AND ' . $filterSql |
|
1106 | + ? $conditionSql.' AND '.$filterSql |
|
1107 | 1107 | : $filterSql; |
1108 | 1108 | } |
1109 | 1109 | |
1110 | 1110 | $sql = 'SELECT COUNT(*) ' |
1111 | - . 'FROM ' . $tableName . ' ' . $tableAlias |
|
1112 | - . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql); |
|
1111 | + . 'FROM '.$tableName.' '.$tableAlias |
|
1112 | + . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql); |
|
1113 | 1113 | |
1114 | 1114 | return $sql; |
1115 | 1115 | } |
@@ -1139,7 +1139,7 @@ discard block |
||
1139 | 1139 | $tableAlias = $this->getSQLTableAlias($property->getTableName()); |
1140 | 1140 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
1141 | 1141 | |
1142 | - $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation; |
|
1142 | + $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation; |
|
1143 | 1143 | |
1144 | 1144 | continue; |
1145 | 1145 | } |
@@ -1157,7 +1157,7 @@ discard block |
||
1157 | 1157 | foreach ($this->class->associationMappings[$fieldName]['joinColumns'] as $joinColumn) { |
1158 | 1158 | $columnName = $this->platform->quoteIdentifier($joinColumn['name']); |
1159 | 1159 | |
1160 | - $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation; |
|
1160 | + $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation; |
|
1161 | 1161 | } |
1162 | 1162 | |
1163 | 1163 | continue; |
@@ -1166,7 +1166,7 @@ discard block |
||
1166 | 1166 | throw ORMException::unrecognizedField($fieldName); |
1167 | 1167 | } |
1168 | 1168 | |
1169 | - return ' ORDER BY ' . implode(', ', $orderByList); |
|
1169 | + return ' ORDER BY '.implode(', ', $orderByList); |
|
1170 | 1170 | } |
1171 | 1171 | |
1172 | 1172 | /** |
@@ -1194,8 +1194,8 @@ discard block |
||
1194 | 1194 | $columnList[] = $this->getSelectColumnSQL($field, $this->class); |
1195 | 1195 | } |
1196 | 1196 | |
1197 | - $this->currentPersisterContext->selectJoinSql = ''; |
|
1198 | - $eagerAliasCounter = 0; |
|
1197 | + $this->currentPersisterContext->selectJoinSql = ''; |
|
1198 | + $eagerAliasCounter = 0; |
|
1199 | 1199 | |
1200 | 1200 | foreach ($this->class->associationMappings as $assocField => $assoc) { |
1201 | 1201 | $assocColumnSQL = $this->getSelectColumnAssociationSQL($assocField, $assoc, $this->class); |
@@ -1221,7 +1221,7 @@ discard block |
||
1221 | 1221 | continue; // now this is why you shouldn't use inheritance |
1222 | 1222 | } |
1223 | 1223 | |
1224 | - $assocAlias = 'e' . ($eagerAliasCounter++); |
|
1224 | + $assocAlias = 'e'.($eagerAliasCounter++); |
|
1225 | 1225 | $this->currentPersisterContext->rsm->addJoinedEntityResult($assoc['targetEntity'], $assocAlias, 'r', $assocField); |
1226 | 1226 | |
1227 | 1227 | foreach ($eagerEntity->fieldNames as $field) { |
@@ -1254,7 +1254,7 @@ discard block |
||
1254 | 1254 | $joinTableName = $this->quoteStrategy->getTableName($eagerEntity, $this->platform); |
1255 | 1255 | |
1256 | 1256 | if ($assoc['isOwningSide']) { |
1257 | - $this->currentPersisterContext->selectJoinSql .= ' ' . $this->getJoinSQLForJoinColumns($association['joinColumns']); |
|
1257 | + $this->currentPersisterContext->selectJoinSql .= ' '.$this->getJoinSQLForJoinColumns($association['joinColumns']); |
|
1258 | 1258 | |
1259 | 1259 | $sourceClass = $this->em->getClassMetadata($association['sourceEntity']); |
1260 | 1260 | $targetClass = $this->em->getClassMetadata($association['targetEntity']); |
@@ -1292,7 +1292,7 @@ discard block |
||
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 | |
@@ -1363,10 +1363,10 @@ discard block |
||
1363 | 1363 | $quotedSourceColumn = $this->platform->quoteIdentifier($joinColumn['name']); |
1364 | 1364 | $quotedTargetColumn = $this->platform->quoteIdentifier($joinColumn['referencedColumnName']); |
1365 | 1365 | |
1366 | - $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableName . '.' . $quotedSourceColumn; |
|
1366 | + $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableName.'.'.$quotedSourceColumn; |
|
1367 | 1367 | } |
1368 | 1368 | |
1369 | - return ' INNER JOIN ' . $joinTableName . ' ON ' . implode(' AND ', $conditions); |
|
1369 | + return ' INNER JOIN '.$joinTableName.' ON '.implode(' AND ', $conditions); |
|
1370 | 1370 | } |
1371 | 1371 | |
1372 | 1372 | /** |
@@ -1495,7 +1495,7 @@ discard block |
||
1495 | 1495 | |
1496 | 1496 | $this->currentPersisterContext->rsm->addFieldResult($alias, $columnAlias, $field, $class->name); |
1497 | 1497 | |
1498 | - return $property->getType()->convertToPHPValueSQL($sql, $this->platform) . ' AS ' . $columnAlias; |
|
1498 | + return $property->getType()->convertToPHPValueSQL($sql, $this->platform).' AS '.$columnAlias; |
|
1499 | 1499 | } |
1500 | 1500 | |
1501 | 1501 | /** |
@@ -1509,14 +1509,14 @@ discard block |
||
1509 | 1509 | protected function getSQLTableAlias($tableName, $assocName = '') |
1510 | 1510 | { |
1511 | 1511 | if ($tableName) { |
1512 | - $tableName .= '#' . $assocName; |
|
1512 | + $tableName .= '#'.$assocName; |
|
1513 | 1513 | } |
1514 | 1514 | |
1515 | 1515 | if (isset($this->currentPersisterContext->sqlTableAliases[$tableName])) { |
1516 | 1516 | return $this->currentPersisterContext->sqlTableAliases[$tableName]; |
1517 | 1517 | } |
1518 | 1518 | |
1519 | - $tableAlias = 't' . $this->currentPersisterContext->sqlAliasCounter++; |
|
1519 | + $tableAlias = 't'.$this->currentPersisterContext->sqlAliasCounter++; |
|
1520 | 1520 | |
1521 | 1521 | $this->currentPersisterContext->sqlTableAliases[$tableName] = $tableAlias; |
1522 | 1522 | |
@@ -1543,7 +1543,7 @@ discard block |
||
1543 | 1543 | } |
1544 | 1544 | |
1545 | 1545 | $lock = $this->getLockTablesSql($lockMode); |
1546 | - $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' '; |
|
1546 | + $where = ($conditionSql ? ' WHERE '.$conditionSql : '').' '; |
|
1547 | 1547 | $sql = 'SELECT 1 ' |
1548 | 1548 | . $lock |
1549 | 1549 | . $where |
@@ -1565,7 +1565,7 @@ discard block |
||
1565 | 1565 | { |
1566 | 1566 | return $this->platform->appendLockHint( |
1567 | 1567 | 'FROM ' |
1568 | - . $this->quoteStrategy->getTableName($this->class, $this->platform) . ' ' |
|
1568 | + . $this->quoteStrategy->getTableName($this->class, $this->platform).' ' |
|
1569 | 1569 | . $this->getSQLTableAlias($this->class->getTableName()), |
1570 | 1570 | $lockMode |
1571 | 1571 | ); |
@@ -1616,19 +1616,19 @@ discard block |
||
1616 | 1616 | |
1617 | 1617 | if (null !== $comparison) { |
1618 | 1618 | // special case null value handling |
1619 | - if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null ===$value) { |
|
1620 | - $selectedColumns[] = $column . ' IS NULL'; |
|
1619 | + if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null === $value) { |
|
1620 | + $selectedColumns[] = $column.' IS NULL'; |
|
1621 | 1621 | |
1622 | 1622 | continue; |
1623 | 1623 | } |
1624 | 1624 | |
1625 | 1625 | if ($comparison === Comparison::NEQ && null === $value) { |
1626 | - $selectedColumns[] = $column . ' IS NOT NULL'; |
|
1626 | + $selectedColumns[] = $column.' IS NOT NULL'; |
|
1627 | 1627 | |
1628 | 1628 | continue; |
1629 | 1629 | } |
1630 | 1630 | |
1631 | - $selectedColumns[] = $column . ' ' . sprintf(self::$comparisonMap[$comparison], $placeholder); |
|
1631 | + $selectedColumns[] = $column.' '.sprintf(self::$comparisonMap[$comparison], $placeholder); |
|
1632 | 1632 | |
1633 | 1633 | continue; |
1634 | 1634 | } |
@@ -1675,7 +1675,7 @@ discard block |
||
1675 | 1675 | $tableAlias = $this->getSQLTableAlias($property->getTableName()); |
1676 | 1676 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
1677 | 1677 | |
1678 | - return array($tableAlias . '.' . $columnName); |
|
1678 | + return array($tableAlias.'.'.$columnName); |
|
1679 | 1679 | } |
1680 | 1680 | |
1681 | 1681 | if (isset($this->class->associationMappings[$field])) { |
@@ -1698,7 +1698,7 @@ discard block |
||
1698 | 1698 | foreach ($joinColumns as $joinColumn) { |
1699 | 1699 | $columnName = $this->platform->quoteIdentifier($joinColumn['name']); |
1700 | 1700 | |
1701 | - $columns[] = $joinTableName . '.' . $columnName; |
|
1701 | + $columns[] = $joinTableName.'.'.$columnName; |
|
1702 | 1702 | } |
1703 | 1703 | |
1704 | 1704 | } else { |
@@ -1714,7 +1714,7 @@ discard block |
||
1714 | 1714 | foreach ($association['joinColumns'] as $joinColumn) { |
1715 | 1715 | $columnName = $this->platform->quoteIdentifier($joinColumn['name']); |
1716 | 1716 | |
1717 | - $columns[] = $tableAlias . '.' . $columnName; |
|
1717 | + $columns[] = $tableAlias.'.'.$columnName; |
|
1718 | 1718 | } |
1719 | 1719 | } |
1720 | 1720 | |
@@ -1812,7 +1812,7 @@ discard block |
||
1812 | 1812 | $value = $value[$targetClass->identifier[0]]; |
1813 | 1813 | } |
1814 | 1814 | |
1815 | - $criteria[$tableAlias . "." . $targetKeyColumn] = $value; |
|
1815 | + $criteria[$tableAlias.".".$targetKeyColumn] = $value; |
|
1816 | 1816 | $parameters[] = array( |
1817 | 1817 | 'value' => $value, |
1818 | 1818 | 'field' => $field, |
@@ -1825,7 +1825,7 @@ discard block |
||
1825 | 1825 | $field = $sourceClass->fieldNames[$sourceKeyColumn]; |
1826 | 1826 | $value = $sourceClass->reflFields[$field]->getValue($sourceEntity); |
1827 | 1827 | |
1828 | - $criteria[$tableAlias . "." . $targetKeyColumn] = $value; |
|
1828 | + $criteria[$tableAlias.".".$targetKeyColumn] = $value; |
|
1829 | 1829 | $parameters[] = array( |
1830 | 1830 | 'value' => $value, |
1831 | 1831 | 'field' => $field, |
@@ -1914,7 +1914,7 @@ discard block |
||
1914 | 1914 | $assoc = $class->associationMappings[$field]; |
1915 | 1915 | $class = $this->em->getClassMetadata($assoc['targetEntity']); |
1916 | 1916 | |
1917 | - if (! $assoc['isOwningSide']) { |
|
1917 | + if ( ! $assoc['isOwningSide']) { |
|
1918 | 1918 | $assoc = $class->associationMappings[$assoc['mappedBy']]; |
1919 | 1919 | $class = $this->em->getClassMetadata($assoc['targetEntity']); |
1920 | 1920 | } |
@@ -1923,7 +1923,7 @@ discard block |
||
1923 | 1923 | ? $assoc['relationToTargetKeyColumns'] |
1924 | 1924 | : $assoc['sourceToTargetKeyColumns']; |
1925 | 1925 | |
1926 | - foreach ($columns as $column){ |
|
1926 | + foreach ($columns as $column) { |
|
1927 | 1927 | $types[] = PersisterHelper::getTypeOfColumn($column, $class, $this->em); |
1928 | 1928 | } |
1929 | 1929 | break; |
@@ -1934,7 +1934,7 @@ discard block |
||
1934 | 1934 | } |
1935 | 1935 | |
1936 | 1936 | if (is_array($value)) { |
1937 | - return array_map(function ($type) { |
|
1937 | + return array_map(function($type) { |
|
1938 | 1938 | return $type->getBindingType() + Connection::ARRAY_PARAM_OFFSET; |
1939 | 1939 | }, $types); |
1940 | 1940 | } |
@@ -2008,12 +2008,12 @@ discard block |
||
2008 | 2008 | |
2009 | 2009 | $sql = 'SELECT 1 ' |
2010 | 2010 | . $this->getLockTablesSql(null) |
2011 | - . ' WHERE ' . $this->getSelectConditionSQL($criteria); |
|
2011 | + . ' WHERE '.$this->getSelectConditionSQL($criteria); |
|
2012 | 2012 | |
2013 | 2013 | list($params, $types) = $this->expandParameters($criteria); |
2014 | 2014 | |
2015 | 2015 | if (null !== $extraConditions) { |
2016 | - $sql .= ' AND ' . $this->getSelectConditionCriteriaSQL($extraConditions); |
|
2016 | + $sql .= ' AND '.$this->getSelectConditionCriteriaSQL($extraConditions); |
|
2017 | 2017 | list($criteriaParams, $criteriaTypes) = $this->expandCriteriaParameters($extraConditions); |
2018 | 2018 | |
2019 | 2019 | $params = array_merge($params, $criteriaParams); |
@@ -2021,7 +2021,7 @@ discard block |
||
2021 | 2021 | } |
2022 | 2022 | |
2023 | 2023 | if ($filterSql = $this->generateFilterConditionSQL($this->class, $alias)) { |
2024 | - $sql .= ' AND ' . $filterSql; |
|
2024 | + $sql .= ' AND '.$filterSql; |
|
2025 | 2025 | } |
2026 | 2026 | |
2027 | 2027 | return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); |
@@ -2068,13 +2068,13 @@ discard block |
||
2068 | 2068 | |
2069 | 2069 | foreach ($this->em->getFilters()->getEnabledFilters() as $filter) { |
2070 | 2070 | if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) { |
2071 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
2071 | + $filterClauses[] = '('.$filterExpr.')'; |
|
2072 | 2072 | } |
2073 | 2073 | } |
2074 | 2074 | |
2075 | 2075 | $sql = implode(' AND ', $filterClauses); |
2076 | 2076 | |
2077 | - return $sql ? "(" . $sql . ")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL" |
|
2077 | + return $sql ? "(".$sql.")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL" |
|
2078 | 2078 | } |
2079 | 2079 | |
2080 | 2080 | /** |
@@ -47,17 +47,17 @@ |
||
47 | 47 | * Get all queued inserts. |
48 | 48 | * |
49 | 49 | * @return array |
50 | - */ |
|
50 | + */ |
|
51 | 51 | public function getInserts(); |
52 | 52 | |
53 | - /** |
|
54 | - * @TODO - It should not be here. |
|
55 | - * But its necessary since JoinedSubclassPersister#executeInserts invoke the root persister. |
|
56 | - * |
|
57 | - * Gets the INSERT SQL used by the persister to persist a new entity. |
|
58 | - * |
|
59 | - * @return string |
|
60 | - */ |
|
53 | + /** |
|
54 | + * @TODO - It should not be here. |
|
55 | + * But its necessary since JoinedSubclassPersister#executeInserts invoke the root persister. |
|
56 | + * |
|
57 | + * Gets the INSERT SQL used by the persister to persist a new entity. |
|
58 | + * |
|
59 | + * @return string |
|
60 | + */ |
|
61 | 61 | public function getInsertSQL(); |
62 | 62 | |
63 | 63 | /** |
@@ -57,7 +57,7 @@ |
||
57 | 57 | $rootClass = $this->em->getClassMetadata($this->class->rootEntityName); |
58 | 58 | $tableAlias = $this->getSQLTableAlias($rootClass->name); |
59 | 59 | |
60 | - // Append discriminator column |
|
60 | + // Append discriminator column |
|
61 | 61 | $discrColumn = $this->class->discriminatorColumn['name']; |
62 | 62 | $discrColumnType = $this->class->discriminatorColumn['type']; |
63 | 63 |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName); |
60 | 60 | $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumnName, false, $discrColumnType); |
61 | 61 | |
62 | - $columnList[] = $discrColumnType->convertToDatabaseValueSQL($tableAlias . '.' . $quotedColumnName, $this->platform); |
|
62 | + $columnList[] = $discrColumnType->convertToDatabaseValueSQL($tableAlias.'.'.$quotedColumnName, $this->platform); |
|
63 | 63 | |
64 | 64 | // Append subclass columns |
65 | 65 | foreach ($this->class->subClasses as $subClassName) { |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $conditionSql .= ' AND '; |
133 | 133 | } |
134 | 134 | |
135 | - return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL(); |
|
135 | + return $conditionSql.$this->getSelectConditionDiscriminatorValueSQL(); |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | /** |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | $conditionSql .= ' AND '; |
147 | 147 | } |
148 | 148 | |
149 | - return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL(); |
|
149 | + return $conditionSql.$this->getSelectConditionDiscriminatorValueSQL(); |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | /** |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | |
174 | 174 | return sprintf( |
175 | 175 | '%s IN (%s)', |
176 | - $discrColumnType->convertToDatabaseValueSQL($tableAlias . '.' . $quotedColumnName, $this->platform), |
|
176 | + $discrColumnType->convertToDatabaseValueSQL($tableAlias.'.'.$quotedColumnName, $this->platform), |
|
177 | 177 | implode(', ', $values) |
178 | 178 | ); |
179 | 179 | } |
@@ -231,7 +231,7 @@ |
||
231 | 231 | } |
232 | 232 | |
233 | 233 | if (empty($arguments)) { |
234 | - throw ORMException::findByRequiresParameter($method . $by); |
|
234 | + throw ORMException::findByRequiresParameter($method.$by); |
|
235 | 235 | } |
236 | 236 | |
237 | 237 | $fieldName = lcfirst(\Doctrine\Common\Util\Inflector::classify($by)); |
@@ -33,6 +33,6 @@ |
||
33 | 33 | */ |
34 | 34 | public static function noDispatchForNode($node) |
35 | 35 | { |
36 | - return new self("Double-dispatch for node " . get_class($node) . " is not supported."); |
|
36 | + return new self("Double-dispatch for node ".get_class($node)." is not supported."); |
|
37 | 37 | } |
38 | 38 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | foreach ($props as $name => $prop) { |
75 | 75 | $ident += 4; |
76 | 76 | $str .= str_repeat(' ', $ident) . '"' . $name . '": ' |
77 | - . $this->dump($prop) . ',' . PHP_EOL; |
|
77 | + . $this->dump($prop) . ',' . PHP_EOL; |
|
78 | 78 | $ident -= 4; |
79 | 79 | } |
80 | 80 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | |
87 | 87 | foreach ($obj as $k => $v) { |
88 | 88 | $str .= PHP_EOL . str_repeat(' ', $ident) . '"' |
89 | - . $k . '" => ' . $this->dump($v) . ','; |
|
89 | + . $k . '" => ' . $this->dump($v) . ','; |
|
90 | 90 | $some = true; |
91 | 91 | } |
92 | 92 |
@@ -68,32 +68,32 @@ |
||
68 | 68 | $str = ''; |
69 | 69 | |
70 | 70 | if ($obj instanceof Node) { |
71 | - $str .= get_class($obj) . '(' . PHP_EOL; |
|
71 | + $str .= get_class($obj).'('.PHP_EOL; |
|
72 | 72 | $props = get_object_vars($obj); |
73 | 73 | |
74 | 74 | foreach ($props as $name => $prop) { |
75 | 75 | $ident += 4; |
76 | - $str .= str_repeat(' ', $ident) . '"' . $name . '": ' |
|
77 | - . $this->dump($prop) . ',' . PHP_EOL; |
|
76 | + $str .= str_repeat(' ', $ident).'"'.$name.'": ' |
|
77 | + . $this->dump($prop).','.PHP_EOL; |
|
78 | 78 | $ident -= 4; |
79 | 79 | } |
80 | 80 | |
81 | - $str .= str_repeat(' ', $ident) . ')'; |
|
81 | + $str .= str_repeat(' ', $ident).')'; |
|
82 | 82 | } else if (is_array($obj)) { |
83 | 83 | $ident += 4; |
84 | 84 | $str .= 'array('; |
85 | 85 | $some = false; |
86 | 86 | |
87 | 87 | foreach ($obj as $k => $v) { |
88 | - $str .= PHP_EOL . str_repeat(' ', $ident) . '"' |
|
89 | - . $k . '" => ' . $this->dump($v) . ','; |
|
88 | + $str .= PHP_EOL.str_repeat(' ', $ident).'"' |
|
89 | + . $k.'" => '.$this->dump($v).','; |
|
90 | 90 | $some = true; |
91 | 91 | } |
92 | 92 | |
93 | 93 | $ident -= 4; |
94 | - $str .= ($some ? PHP_EOL . str_repeat(' ', $ident) : '') . ')'; |
|
94 | + $str .= ($some ? PHP_EOL.str_repeat(' ', $ident) : '').')'; |
|
95 | 95 | } else if (is_object($obj)) { |
96 | - $str .= 'instanceof(' . get_class($obj) . ')'; |
|
96 | + $str .= 'instanceof('.get_class($obj).')'; |
|
97 | 97 | } else { |
98 | 98 | $str .= var_export($obj, true); |
99 | 99 | } |