@@ -295,16 +295,16 @@ discard block |
||
295 | 295 | $tableName = $versionedClass->table->getQuotedQualifiedName($this->platform); |
296 | 296 | $columnName = $this->platform->quoteIdentifier($versionProperty->getColumnName()); |
297 | 297 | $identifier = array_map( |
298 | - function ($columnName) { |
|
298 | + function($columnName) { |
|
299 | 299 | return $this->platform->quoteIdentifier($columnName); |
300 | 300 | }, |
301 | 301 | array_keys($versionedClass->getIdentifierColumns($this->em)) |
302 | 302 | ); |
303 | 303 | |
304 | 304 | // FIXME: Order with composite keys might not be correct |
305 | - $sql = 'SELECT ' . $columnName |
|
306 | - . ' FROM ' . $tableName |
|
307 | - . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?'; |
|
305 | + $sql = 'SELECT '.$columnName |
|
306 | + . ' FROM '.$tableName |
|
307 | + . ' WHERE '.implode(' = ? AND ', $identifier).' = ?'; |
|
308 | 308 | |
309 | 309 | $flattenedId = $this->em->getIdentifierFlattener()->flattenIdentifier($versionedClass, $id); |
310 | 310 | $versionType = $versionProperty->getType(); |
@@ -343,13 +343,13 @@ discard block |
||
343 | 343 | $tableName = $this->class->getTableName(); |
344 | 344 | $updateData = $this->prepareUpdateData($entity); |
345 | 345 | |
346 | - if (! isset($updateData[$tableName])) { |
|
346 | + if ( ! isset($updateData[$tableName])) { |
|
347 | 347 | return; |
348 | 348 | } |
349 | 349 | |
350 | 350 | $data = $updateData[$tableName]; |
351 | 351 | |
352 | - if (! $data) { |
|
352 | + if ( ! $data) { |
|
353 | 353 | return; |
354 | 354 | } |
355 | 355 | |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | |
402 | 402 | if ($value !== null) { |
403 | 403 | // @todo guilhermeblanco Make sure we do not have flat association values. |
404 | - if (! is_array($value)) { |
|
404 | + if ( ! is_array($value)) { |
|
405 | 405 | $value = [$targetClass->identifier[0] => $value]; |
406 | 406 | } |
407 | 407 | |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
415 | 415 | $targetField = $targetClass->fieldNames[$referencedColumnName]; |
416 | 416 | |
417 | - if (! $joinColumn->getType()) { |
|
417 | + if ( ! $joinColumn->getType()) { |
|
418 | 418 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
419 | 419 | } |
420 | 420 | |
@@ -480,7 +480,7 @@ discard block |
||
480 | 480 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
481 | 481 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
482 | 482 | |
483 | - if (! $joinColumn->getType()) { |
|
483 | + if ( ! $joinColumn->getType()) { |
|
484 | 484 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
485 | 485 | } |
486 | 486 | |
@@ -507,18 +507,18 @@ discard block |
||
507 | 507 | case Type::SMALLINT: |
508 | 508 | case Type::INTEGER: |
509 | 509 | case Type::BIGINT: |
510 | - $set[] = $versionColumnName . ' = ' . $versionColumnName . ' + 1'; |
|
510 | + $set[] = $versionColumnName.' = '.$versionColumnName.' + 1'; |
|
511 | 511 | break; |
512 | 512 | |
513 | 513 | case Type::DATETIME: |
514 | - $set[] = $versionColumnName . ' = CURRENT_TIMESTAMP'; |
|
514 | + $set[] = $versionColumnName.' = CURRENT_TIMESTAMP'; |
|
515 | 515 | break; |
516 | 516 | } |
517 | 517 | } |
518 | 518 | |
519 | - $sql = 'UPDATE ' . $quotedTableName |
|
520 | - . ' SET ' . implode(', ', $set) |
|
521 | - . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?'; |
|
519 | + $sql = 'UPDATE '.$quotedTableName |
|
520 | + . ' SET '.implode(', ', $set) |
|
521 | + . ' WHERE '.implode(' = ? AND ', $where).' = ?'; |
|
522 | 522 | |
523 | 523 | $result = $this->conn->executeUpdate($sql, $params, $types); |
524 | 524 | |
@@ -535,7 +535,7 @@ discard block |
||
535 | 535 | protected function deleteJoinTableRecords($identifier) |
536 | 536 | { |
537 | 537 | foreach ($this->class->getPropertiesIterator() as $association) { |
538 | - if (! ($association instanceof ManyToManyAssociationMetadata)) { |
|
538 | + if ( ! ($association instanceof ManyToManyAssociationMetadata)) { |
|
539 | 539 | continue; |
540 | 540 | } |
541 | 541 | |
@@ -547,7 +547,7 @@ discard block |
||
547 | 547 | $otherKeys = []; |
548 | 548 | $keys = []; |
549 | 549 | |
550 | - if (! $owningAssociation->isOwningSide()) { |
|
550 | + if ( ! $owningAssociation->isOwningSide()) { |
|
551 | 551 | $class = $this->em->getClassMetadata($association->getTargetEntity()); |
552 | 552 | $owningAssociation = $class->getProperty($association->getMappedBy()); |
553 | 553 | } |
@@ -657,7 +657,7 @@ discard block |
||
657 | 657 | } |
658 | 658 | |
659 | 659 | // Only owning side of x-1 associations can have a FK column. |
660 | - if (! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) { |
|
660 | + if ( ! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) { |
|
661 | 661 | continue; |
662 | 662 | } |
663 | 663 | |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | /** @var JoinColumnMetadata $joinColumn */ |
678 | 678 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
679 | 679 | |
680 | - if (! $joinColumn->getType()) { |
|
680 | + if ( ! $joinColumn->getType()) { |
|
681 | 681 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
682 | 682 | } |
683 | 683 | |
@@ -704,7 +704,7 @@ discard block |
||
704 | 704 | $propertyName = $this->class->fieldNames[$columnName]; |
705 | 705 | $property = $this->class->getProperty($propertyName); |
706 | 706 | |
707 | - if (! $property) { |
|
707 | + if ( ! $property) { |
|
708 | 708 | return null; |
709 | 709 | } |
710 | 710 | |
@@ -723,7 +723,7 @@ discard block |
||
723 | 723 | /** @var JoinColumnMetadata $joinColumn */ |
724 | 724 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
725 | 725 | |
726 | - if (! $joinColumn->getType()) { |
|
726 | + if ( ! $joinColumn->getType()) { |
|
727 | 727 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
728 | 728 | } |
729 | 729 | |
@@ -828,7 +828,7 @@ discard block |
||
828 | 828 | $sourceKeyColumn = $joinColumn->getReferencedColumnName(); |
829 | 829 | $targetKeyColumn = $joinColumn->getColumnName(); |
830 | 830 | |
831 | - if (! isset($sourceClass->fieldNames[$sourceKeyColumn])) { |
|
831 | + if ( ! isset($sourceClass->fieldNames[$sourceKeyColumn])) { |
|
832 | 832 | throw MappingException::joinColumnMustPointToMappedField( |
833 | 833 | $sourceClass->getClassName(), |
834 | 834 | $sourceKeyColumn |
@@ -929,7 +929,7 @@ discard block |
||
929 | 929 | foreach ($types as $type) { |
930 | 930 | [$field, $value, $operator] = $type; |
931 | 931 | $sqlType = $this->getTypes($field, $value, $this->class); |
932 | - if($operator === Comparison::CONTAINS && $sqlType[0] === Type::JSON) { |
|
932 | + if ($operator === Comparison::CONTAINS && $sqlType[0] === Type::JSON) { |
|
933 | 933 | $sqlType[0] = Type::STRING; |
934 | 934 | } |
935 | 935 | $sqlTypes = array_merge($sqlTypes, $sqlType); |
@@ -1059,7 +1059,7 @@ discard block |
||
1059 | 1059 | $criteria = []; |
1060 | 1060 | $parameters = []; |
1061 | 1061 | |
1062 | - if (! $association->isOwningSide()) { |
|
1062 | + if ( ! $association->isOwningSide()) { |
|
1063 | 1063 | $class = $this->em->getClassMetadata($association->getTargetEntity()); |
1064 | 1064 | $owningAssoc = $class->getProperty($association->getMappedBy()); |
1065 | 1065 | } |
@@ -1087,7 +1087,7 @@ discard block |
||
1087 | 1087 | $value = $value[$targetClass->identifier[0]]; |
1088 | 1088 | } |
1089 | 1089 | |
1090 | - $criteria[$joinTableName . '.' . $quotedColumnName] = $value; |
|
1090 | + $criteria[$joinTableName.'.'.$quotedColumnName] = $value; |
|
1091 | 1091 | $parameters[] = [ |
1092 | 1092 | 'value' => $value, |
1093 | 1093 | 'field' => $fieldName, |
@@ -1137,11 +1137,11 @@ discard block |
||
1137 | 1137 | |
1138 | 1138 | switch ($lockMode) { |
1139 | 1139 | case LockMode::PESSIMISTIC_READ: |
1140 | - $lockSql = ' ' . $this->platform->getReadLockSQL(); |
|
1140 | + $lockSql = ' '.$this->platform->getReadLockSQL(); |
|
1141 | 1141 | break; |
1142 | 1142 | |
1143 | 1143 | case LockMode::PESSIMISTIC_WRITE: |
1144 | - $lockSql = ' ' . $this->platform->getWriteLockSQL(); |
|
1144 | + $lockSql = ' '.$this->platform->getWriteLockSQL(); |
|
1145 | 1145 | break; |
1146 | 1146 | } |
1147 | 1147 | |
@@ -1152,14 +1152,14 @@ discard block |
||
1152 | 1152 | |
1153 | 1153 | if ($filterSql !== '') { |
1154 | 1154 | $conditionSql = $conditionSql |
1155 | - ? $conditionSql . ' AND ' . $filterSql |
|
1155 | + ? $conditionSql.' AND '.$filterSql |
|
1156 | 1156 | : $filterSql; |
1157 | 1157 | } |
1158 | 1158 | |
1159 | - $select = 'SELECT ' . $columnList; |
|
1160 | - $from = ' FROM ' . $tableName . ' ' . $tableAlias; |
|
1161 | - $join = $this->currentPersisterContext->selectJoinSql . $joinSql; |
|
1162 | - $where = ($conditionSql ? ' WHERE ' . $conditionSql : ''); |
|
1159 | + $select = 'SELECT '.$columnList; |
|
1160 | + $from = ' FROM '.$tableName.' '.$tableAlias; |
|
1161 | + $join = $this->currentPersisterContext->selectJoinSql.$joinSql; |
|
1162 | + $where = ($conditionSql ? ' WHERE '.$conditionSql : ''); |
|
1163 | 1163 | $lock = $this->platform->appendLockHint($from, $lockMode); |
1164 | 1164 | $query = $select |
1165 | 1165 | . $lock |
@@ -1167,7 +1167,7 @@ discard block |
||
1167 | 1167 | . $where |
1168 | 1168 | . $orderBySql; |
1169 | 1169 | |
1170 | - return $this->platform->modifyLimitQuery($query, $limit, $offset ?? 0) . $lockSql; |
|
1170 | + return $this->platform->modifyLimitQuery($query, $limit, $offset ?? 0).$lockSql; |
|
1171 | 1171 | } |
1172 | 1172 | |
1173 | 1173 | /** |
@@ -1186,13 +1186,13 @@ discard block |
||
1186 | 1186 | |
1187 | 1187 | if ($filterSql !== '') { |
1188 | 1188 | $conditionSql = $conditionSql |
1189 | - ? $conditionSql . ' AND ' . $filterSql |
|
1189 | + ? $conditionSql.' AND '.$filterSql |
|
1190 | 1190 | : $filterSql; |
1191 | 1191 | } |
1192 | 1192 | |
1193 | 1193 | return 'SELECT COUNT(*) ' |
1194 | - . 'FROM ' . $tableName . ' ' . $tableAlias |
|
1195 | - . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql); |
|
1194 | + . 'FROM '.$tableName.' '.$tableAlias |
|
1195 | + . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql); |
|
1196 | 1196 | } |
1197 | 1197 | |
1198 | 1198 | /** |
@@ -1207,7 +1207,7 @@ discard block |
||
1207 | 1207 | */ |
1208 | 1208 | final protected function getOrderBySQL(array $orderBy, $baseTableAlias) |
1209 | 1209 | { |
1210 | - if (! $orderBy) { |
|
1210 | + if ( ! $orderBy) { |
|
1211 | 1211 | return ''; |
1212 | 1212 | } |
1213 | 1213 | |
@@ -1216,7 +1216,7 @@ discard block |
||
1216 | 1216 | foreach ($orderBy as $fieldName => $orientation) { |
1217 | 1217 | $orientation = strtoupper(trim($orientation)); |
1218 | 1218 | |
1219 | - if (! in_array($orientation, ['ASC', 'DESC'], true)) { |
|
1219 | + if ( ! in_array($orientation, ['ASC', 'DESC'], true)) { |
|
1220 | 1220 | throw InvalidOrientation::fromClassNameAndField($this->class->getClassName(), $fieldName); |
1221 | 1221 | } |
1222 | 1222 | |
@@ -1226,11 +1226,11 @@ discard block |
||
1226 | 1226 | $tableAlias = $this->getSQLTableAlias($property->getTableName()); |
1227 | 1227 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
1228 | 1228 | |
1229 | - $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation; |
|
1229 | + $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation; |
|
1230 | 1230 | |
1231 | 1231 | continue; |
1232 | 1232 | } elseif ($property instanceof AssociationMetadata) { |
1233 | - if (! $property->isOwningSide()) { |
|
1233 | + if ( ! $property->isOwningSide()) { |
|
1234 | 1234 | throw InvalidFindByCall::fromInverseSideUsage( |
1235 | 1235 | $this->class->getClassName(), |
1236 | 1236 | $fieldName |
@@ -1246,7 +1246,7 @@ discard block |
||
1246 | 1246 | /** @var JoinColumnMetadata $joinColumn */ |
1247 | 1247 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
1248 | 1248 | |
1249 | - $orderByList[] = $tableAlias . '.' . $quotedColumnName . ' ' . $orientation; |
|
1249 | + $orderByList[] = $tableAlias.'.'.$quotedColumnName.' '.$orientation; |
|
1250 | 1250 | } |
1251 | 1251 | |
1252 | 1252 | continue; |
@@ -1255,7 +1255,7 @@ discard block |
||
1255 | 1255 | throw UnrecognizedField::byName($fieldName); |
1256 | 1256 | } |
1257 | 1257 | |
1258 | - return ' ORDER BY ' . implode(', ', $orderByList); |
|
1258 | + return ' ORDER BY '.implode(', ', $orderByList); |
|
1259 | 1259 | } |
1260 | 1260 | |
1261 | 1261 | /** |
@@ -1297,7 +1297,7 @@ discard block |
||
1297 | 1297 | $isAssocToOneInverseSide = $property instanceof ToOneAssociationMetadata && ! $property->isOwningSide(); |
1298 | 1298 | $isAssocFromOneEager = ! $property instanceof ManyToManyAssociationMetadata && $property->getFetchMode() === FetchMode::EAGER; |
1299 | 1299 | |
1300 | - if (! ($isAssocFromOneEager || $isAssocToOneInverseSide)) { |
|
1300 | + if ( ! ($isAssocFromOneEager || $isAssocToOneInverseSide)) { |
|
1301 | 1301 | break; |
1302 | 1302 | } |
1303 | 1303 | |
@@ -1312,7 +1312,7 @@ discard block |
||
1312 | 1312 | break; // now this is why you shouldn't use inheritance |
1313 | 1313 | } |
1314 | 1314 | |
1315 | - $assocAlias = 'e' . ($eagerAliasCounter++); |
|
1315 | + $assocAlias = 'e'.($eagerAliasCounter++); |
|
1316 | 1316 | |
1317 | 1317 | $this->currentPersisterContext->rsm->addJoinedEntityResult($targetEntity, $assocAlias, 'r', $fieldName); |
1318 | 1318 | |
@@ -1340,14 +1340,14 @@ discard block |
||
1340 | 1340 | $this->currentPersisterContext->rsm->addIndexBy($assocAlias, $property->getIndexedBy()); |
1341 | 1341 | } |
1342 | 1342 | |
1343 | - if (! $property->isOwningSide()) { |
|
1343 | + if ( ! $property->isOwningSide()) { |
|
1344 | 1344 | $owningAssociation = $eagerEntity->getProperty($property->getMappedBy()); |
1345 | 1345 | } |
1346 | 1346 | |
1347 | 1347 | $joinTableAlias = $this->getSQLTableAlias($eagerEntity->getTableName(), $assocAlias); |
1348 | 1348 | $joinTableName = $eagerEntity->table->getQuotedQualifiedName($this->platform); |
1349 | 1349 | |
1350 | - $this->currentPersisterContext->selectJoinSql .= ' ' . $this->getJoinSQLForAssociation($property); |
|
1350 | + $this->currentPersisterContext->selectJoinSql .= ' '.$this->getJoinSQLForAssociation($property); |
|
1351 | 1351 | |
1352 | 1352 | $sourceClass = $this->em->getClassMetadata($owningAssociation->getSourceEntity()); |
1353 | 1353 | $targetClass = $this->em->getClassMetadata($owningAssociation->getTargetEntity()); |
@@ -1371,7 +1371,7 @@ discard block |
||
1371 | 1371 | $joinCondition[] = $filterSql; |
1372 | 1372 | } |
1373 | 1373 | |
1374 | - $this->currentPersisterContext->selectJoinSql .= ' ' . $joinTableName . ' ' . $joinTableAlias . ' ON '; |
|
1374 | + $this->currentPersisterContext->selectJoinSql .= ' '.$joinTableName.' '.$joinTableAlias.' ON '; |
|
1375 | 1375 | $this->currentPersisterContext->selectJoinSql .= implode(' AND ', $joinCondition); |
1376 | 1376 | |
1377 | 1377 | break; |
@@ -1393,7 +1393,7 @@ discard block |
||
1393 | 1393 | */ |
1394 | 1394 | protected function getSelectColumnAssociationSQL($field, AssociationMetadata $association, ClassMetadata $class, $alias = 'r') |
1395 | 1395 | { |
1396 | - if (! ($association->isOwningSide() && $association instanceof ToOneAssociationMetadata)) { |
|
1396 | + if ( ! ($association->isOwningSide() && $association instanceof ToOneAssociationMetadata)) { |
|
1397 | 1397 | return ''; |
1398 | 1398 | } |
1399 | 1399 | |
@@ -1408,7 +1408,7 @@ discard block |
||
1408 | 1408 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
1409 | 1409 | $resultColumnName = $this->getSQLColumnAlias(); |
1410 | 1410 | |
1411 | - if (! $joinColumn->getType()) { |
|
1411 | + if ( ! $joinColumn->getType()) { |
|
1412 | 1412 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
1413 | 1413 | } |
1414 | 1414 | |
@@ -1438,7 +1438,7 @@ discard block |
||
1438 | 1438 | $owningAssociation = $association; |
1439 | 1439 | $sourceTableAlias = $this->getSQLTableAlias($this->class->getTableName()); |
1440 | 1440 | |
1441 | - if (! $association->isOwningSide()) { |
|
1441 | + if ( ! $association->isOwningSide()) { |
|
1442 | 1442 | $targetEntity = $this->em->getClassMetadata($association->getTargetEntity()); |
1443 | 1443 | $owningAssociation = $targetEntity->getProperty($association->getMappedBy()); |
1444 | 1444 | } |
@@ -1459,7 +1459,7 @@ discard block |
||
1459 | 1459 | ); |
1460 | 1460 | } |
1461 | 1461 | |
1462 | - return ' INNER JOIN ' . $joinTableName . ' ON ' . implode(' AND ', $conditions); |
|
1462 | + return ' INNER JOIN '.$joinTableName.' ON '.implode(' AND ', $conditions); |
|
1463 | 1463 | } |
1464 | 1464 | |
1465 | 1465 | /** |
@@ -1553,7 +1553,7 @@ discard block |
||
1553 | 1553 | $columnName = $joinColumn->getColumnName(); |
1554 | 1554 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
1555 | 1555 | |
1556 | - if (! $joinColumn->getType()) { |
|
1556 | + if ( ! $joinColumn->getType()) { |
|
1557 | 1557 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
1558 | 1558 | } |
1559 | 1559 | |
@@ -1592,7 +1592,7 @@ discard block |
||
1592 | 1592 | |
1593 | 1593 | $this->currentPersisterContext->rsm->addFieldResult($alias, $columnAlias, $field, $class->getClassName()); |
1594 | 1594 | |
1595 | - return $property->getType()->convertToPHPValueSQL($sql, $this->platform) . ' AS ' . $columnAlias; |
|
1595 | + return $property->getType()->convertToPHPValueSQL($sql, $this->platform).' AS '.$columnAlias; |
|
1596 | 1596 | } |
1597 | 1597 | |
1598 | 1598 | /** |
@@ -1606,14 +1606,14 @@ discard block |
||
1606 | 1606 | protected function getSQLTableAlias($tableName, $assocName = '') |
1607 | 1607 | { |
1608 | 1608 | if ($tableName) { |
1609 | - $tableName .= '#' . $assocName; |
|
1609 | + $tableName .= '#'.$assocName; |
|
1610 | 1610 | } |
1611 | 1611 | |
1612 | 1612 | if (isset($this->currentPersisterContext->sqlTableAliases[$tableName])) { |
1613 | 1613 | return $this->currentPersisterContext->sqlTableAliases[$tableName]; |
1614 | 1614 | } |
1615 | 1615 | |
1616 | - $tableAlias = 't' . $this->currentPersisterContext->sqlAliasCounter++; |
|
1616 | + $tableAlias = 't'.$this->currentPersisterContext->sqlAliasCounter++; |
|
1617 | 1617 | |
1618 | 1618 | $this->currentPersisterContext->sqlTableAliases[$tableName] = $tableAlias; |
1619 | 1619 | |
@@ -1639,7 +1639,7 @@ discard block |
||
1639 | 1639 | } |
1640 | 1640 | |
1641 | 1641 | $lock = $this->getLockTablesSql($lockMode); |
1642 | - $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' '; |
|
1642 | + $where = ($conditionSql ? ' WHERE '.$conditionSql : '').' '; |
|
1643 | 1643 | $sql = 'SELECT 1 ' |
1644 | 1644 | . $lock |
1645 | 1645 | . $where |
@@ -1662,7 +1662,7 @@ discard block |
||
1662 | 1662 | $tableName = $this->class->table->getQuotedQualifiedName($this->platform); |
1663 | 1663 | |
1664 | 1664 | return $this->platform->appendLockHint( |
1665 | - 'FROM ' . $tableName . ' ' . $this->getSQLTableAlias($this->class->getTableName()), |
|
1665 | + 'FROM '.$tableName.' '.$this->getSQLTableAlias($this->class->getTableName()), |
|
1666 | 1666 | $lockMode |
1667 | 1667 | ); |
1668 | 1668 | } |
@@ -1712,19 +1712,19 @@ discard block |
||
1712 | 1712 | |
1713 | 1713 | if ($comparison !== null) { |
1714 | 1714 | // special case null value handling |
1715 | - if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && $value ===null) { |
|
1716 | - $selectedColumns[] = $column . ' IS NULL'; |
|
1715 | + if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && $value === null) { |
|
1716 | + $selectedColumns[] = $column.' IS NULL'; |
|
1717 | 1717 | |
1718 | 1718 | continue; |
1719 | 1719 | } |
1720 | 1720 | |
1721 | 1721 | if ($comparison === Comparison::NEQ && $value === null) { |
1722 | - $selectedColumns[] = $column . ' IS NOT NULL'; |
|
1722 | + $selectedColumns[] = $column.' IS NOT NULL'; |
|
1723 | 1723 | |
1724 | 1724 | continue; |
1725 | 1725 | } |
1726 | 1726 | |
1727 | - $selectedColumns[] = $column . ' ' . sprintf(self::$comparisonMap[$comparison], $placeholder); |
|
1727 | + $selectedColumns[] = $column.' '.sprintf(self::$comparisonMap[$comparison], $placeholder); |
|
1728 | 1728 | |
1729 | 1729 | continue; |
1730 | 1730 | } |
@@ -1772,7 +1772,7 @@ discard block |
||
1772 | 1772 | $tableAlias = $this->getSQLTableAlias($property->getTableName()); |
1773 | 1773 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
1774 | 1774 | |
1775 | - return [$tableAlias . '.' . $columnName]; |
|
1775 | + return [$tableAlias.'.'.$columnName]; |
|
1776 | 1776 | } |
1777 | 1777 | |
1778 | 1778 | if ($property instanceof AssociationMetadata) { |
@@ -1781,7 +1781,7 @@ discard block |
||
1781 | 1781 | |
1782 | 1782 | // Many-To-Many requires join table check for joinColumn |
1783 | 1783 | if ($owningAssociation instanceof ManyToManyAssociationMetadata) { |
1784 | - if (! $owningAssociation->isOwningSide()) { |
|
1784 | + if ( ! $owningAssociation->isOwningSide()) { |
|
1785 | 1785 | $owningAssociation = $association; |
1786 | 1786 | } |
1787 | 1787 | |
@@ -1794,10 +1794,10 @@ discard block |
||
1794 | 1794 | foreach ($joinColumns as $joinColumn) { |
1795 | 1795 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
1796 | 1796 | |
1797 | - $columns[] = $joinTableName . '.' . $quotedColumnName; |
|
1797 | + $columns[] = $joinTableName.'.'.$quotedColumnName; |
|
1798 | 1798 | } |
1799 | 1799 | } else { |
1800 | - if (! $owningAssociation->isOwningSide()) { |
|
1800 | + if ( ! $owningAssociation->isOwningSide()) { |
|
1801 | 1801 | throw InvalidFindByCall::fromInverseSideUsage( |
1802 | 1802 | $this->class->getClassName(), |
1803 | 1803 | $field |
@@ -1812,7 +1812,7 @@ discard block |
||
1812 | 1812 | foreach ($owningAssociation->getJoinColumns() as $joinColumn) { |
1813 | 1813 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
1814 | 1814 | |
1815 | - $columns[] = $tableAlias . '.' . $quotedColumnName; |
|
1815 | + $columns[] = $tableAlias.'.'.$quotedColumnName; |
|
1816 | 1816 | } |
1817 | 1817 | } |
1818 | 1818 | |
@@ -1920,7 +1920,7 @@ discard block |
||
1920 | 1920 | $value = $value[$targetClass->identifier[0]]; |
1921 | 1921 | } |
1922 | 1922 | |
1923 | - $criteria[$tableAlias . '.' . $quotedColumnName] = $value; |
|
1923 | + $criteria[$tableAlias.'.'.$quotedColumnName] = $value; |
|
1924 | 1924 | $parameters[] = [ |
1925 | 1925 | 'value' => $value, |
1926 | 1926 | 'field' => $fieldName, |
@@ -2005,7 +2005,7 @@ discard block |
||
2005 | 2005 | case $property instanceof AssociationMetadata: |
2006 | 2006 | $class = $this->em->getClassMetadata($property->getTargetEntity()); |
2007 | 2007 | |
2008 | - if (! $property->isOwningSide()) { |
|
2008 | + if ( ! $property->isOwningSide()) { |
|
2009 | 2009 | $property = $class->getProperty($property->getMappedBy()); |
2010 | 2010 | $class = $this->em->getClassMetadata($property->getTargetEntity()); |
2011 | 2011 | } |
@@ -2018,7 +2018,7 @@ discard block |
||
2018 | 2018 | /** @var JoinColumnMetadata $joinColumn */ |
2019 | 2019 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
2020 | 2020 | |
2021 | - if (! $joinColumn->getType()) { |
|
2021 | + if ( ! $joinColumn->getType()) { |
|
2022 | 2022 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em)); |
2023 | 2023 | } |
2024 | 2024 | |
@@ -2033,7 +2033,7 @@ discard block |
||
2033 | 2033 | } |
2034 | 2034 | |
2035 | 2035 | if (is_array($value)) { |
2036 | - return array_map(static function ($type) { |
|
2036 | + return array_map(static function($type) { |
|
2037 | 2037 | return $type->getBindingType() + Connection::ARRAY_PARAM_OFFSET; |
2038 | 2038 | }, $types); |
2039 | 2039 | } |
@@ -2090,7 +2090,7 @@ discard block |
||
2090 | 2090 | */ |
2091 | 2091 | private function getIndividualValue($value) |
2092 | 2092 | { |
2093 | - if (! is_object($value) || ! $this->em->getMetadataFactory()->hasMetadataFor(StaticClassNameConverter::getClass($value))) { |
|
2093 | + if ( ! is_object($value) || ! $this->em->getMetadataFactory()->hasMetadataFor(StaticClassNameConverter::getClass($value))) { |
|
2094 | 2094 | return $value; |
2095 | 2095 | } |
2096 | 2096 | |
@@ -2104,7 +2104,7 @@ discard block |
||
2104 | 2104 | { |
2105 | 2105 | $criteria = $this->getIdentifier($entity); |
2106 | 2106 | |
2107 | - if (! $criteria) { |
|
2107 | + if ( ! $criteria) { |
|
2108 | 2108 | return false; |
2109 | 2109 | } |
2110 | 2110 | |
@@ -2112,12 +2112,12 @@ discard block |
||
2112 | 2112 | |
2113 | 2113 | $sql = 'SELECT 1 ' |
2114 | 2114 | . $this->getLockTablesSql(null) |
2115 | - . ' WHERE ' . $this->getSelectConditionSQL($criteria); |
|
2115 | + . ' WHERE '.$this->getSelectConditionSQL($criteria); |
|
2116 | 2116 | |
2117 | 2117 | [$params, $types] = $this->expandParameters($criteria); |
2118 | 2118 | |
2119 | 2119 | if ($extraConditions !== null) { |
2120 | - $sql .= ' AND ' . $this->getSelectConditionCriteriaSQL($extraConditions); |
|
2120 | + $sql .= ' AND '.$this->getSelectConditionCriteriaSQL($extraConditions); |
|
2121 | 2121 | [$criteriaParams, $criteriaTypes] = $this->expandCriteriaParameters($extraConditions); |
2122 | 2122 | |
2123 | 2123 | $params = array_merge($params, $criteriaParams); |
@@ -2127,7 +2127,7 @@ discard block |
||
2127 | 2127 | $filterSql = $this->generateFilterConditionSQL($this->class, $alias); |
2128 | 2128 | |
2129 | 2129 | if ($filterSql) { |
2130 | - $sql .= ' AND ' . $filterSql; |
|
2130 | + $sql .= ' AND '.$filterSql; |
|
2131 | 2131 | } |
2132 | 2132 | |
2133 | 2133 | return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); |
@@ -2140,13 +2140,13 @@ discard block |
||
2140 | 2140 | */ |
2141 | 2141 | protected function getJoinSQLForAssociation(AssociationMetadata $association) |
2142 | 2142 | { |
2143 | - if (! $association->isOwningSide()) { |
|
2143 | + if ( ! $association->isOwningSide()) { |
|
2144 | 2144 | return 'LEFT JOIN'; |
2145 | 2145 | } |
2146 | 2146 | |
2147 | 2147 | // if one of the join columns is nullable, return left join |
2148 | 2148 | foreach ($association->getJoinColumns() as $joinColumn) { |
2149 | - if (! $joinColumn->isNullable()) { |
|
2149 | + if ( ! $joinColumn->isNullable()) { |
|
2150 | 2150 | continue; |
2151 | 2151 | } |
2152 | 2152 | |
@@ -2163,7 +2163,7 @@ discard block |
||
2163 | 2163 | */ |
2164 | 2164 | public function getSQLColumnAlias() |
2165 | 2165 | { |
2166 | - return $this->platform->getSQLResultCasing('c' . $this->currentPersisterContext->sqlAliasCounter++); |
|
2166 | + return $this->platform->getSQLResultCasing('c'.$this->currentPersisterContext->sqlAliasCounter++); |
|
2167 | 2167 | } |
2168 | 2168 | |
2169 | 2169 | /** |
@@ -2182,13 +2182,13 @@ discard block |
||
2182 | 2182 | $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias); |
2183 | 2183 | |
2184 | 2184 | if ($filterExpr !== '') { |
2185 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
2185 | + $filterClauses[] = '('.$filterExpr.')'; |
|
2186 | 2186 | } |
2187 | 2187 | } |
2188 | 2188 | |
2189 | 2189 | $sql = implode(' AND ', $filterClauses); |
2190 | 2190 | |
2191 | - return $sql ? '(' . $sql . ')' : ''; // Wrap again to avoid "X or Y and FilterConditionSQL" |
|
2191 | + return $sql ? '('.$sql.')' : ''; // Wrap again to avoid "X or Y and FilterConditionSQL" |
|
2192 | 2192 | } |
2193 | 2193 | |
2194 | 2194 | /** |