@@ -45,12 +45,12 @@ |
||
45 | 45 | |
46 | 46 | /** @var InverseSide $fetchedInverse */ |
47 | 47 | $fetchedInverse = $this->em->createQueryBuilder() |
48 | - ->select('inverse') |
|
49 | - ->from(InverseSide::class, 'inverse') |
|
50 | - ->andWhere('inverse.id = :id') |
|
51 | - ->setParameter('id', 'inverse') |
|
52 | - ->getQuery() |
|
53 | - ->getSingleResult(); |
|
48 | + ->select('inverse') |
|
49 | + ->from(InverseSide::class, 'inverse') |
|
50 | + ->andWhere('inverse.id = :id') |
|
51 | + ->setParameter('id', 'inverse') |
|
52 | + ->getQuery() |
|
53 | + ->getSingleResult(); |
|
54 | 54 | |
55 | 55 | self::assertInstanceOf(InverseSide::class, $fetchedInverse); |
56 | 56 | self::assertInstanceOf(OwningSide::class, $fetchedInverse->owning); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Functional\Locking; |
6 | 6 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | while ($worker->work()) { |
35 | 35 | if ($worker->returnCode() !== GEARMAN_SUCCESS) { |
36 | - echo 'return_code: ' . $worker->returnCode() . "\n"; |
|
36 | + echo 'return_code: '.$worker->returnCode()."\n"; |
|
37 | 37 | break; |
38 | 38 | } |
39 | 39 | } |
@@ -58,14 +58,14 @@ discard block |
||
58 | 58 | |
59 | 59 | public function findWithLock($job) |
60 | 60 | { |
61 | - return $this->process($job, function ($fixture, $em) { |
|
61 | + return $this->process($job, function($fixture, $em) { |
|
62 | 62 | $entity = $em->find($fixture['entityName'], $fixture['entityId'], $fixture['lockMode']); |
63 | 63 | }); |
64 | 64 | } |
65 | 65 | |
66 | 66 | public function dqlWithLock($job) |
67 | 67 | { |
68 | - return $this->process($job, function ($fixture, $em) { |
|
68 | + return $this->process($job, function($fixture, $em) { |
|
69 | 69 | /** @var Doctrine\ORM\Query $query */ |
70 | 70 | $query = $em->createQuery($fixture['dql']); |
71 | 71 | $query->setLockMode($fixture['lockMode']); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | |
77 | 77 | public function lock($job) |
78 | 78 | { |
79 | - return $this->process($job, function ($fixture, $em) { |
|
79 | + return $this->process($job, function($fixture, $em) { |
|
80 | 80 | $entity = $em->find($fixture['entityName'], $fixture['entityId']); |
81 | 81 | $em->lock($entity, $fixture['lockMode']); |
82 | 82 | }); |
@@ -84,18 +84,18 @@ discard block |
||
84 | 84 | |
85 | 85 | protected function processWorkload($job) |
86 | 86 | { |
87 | - echo 'Received job: ' . $job->handle() . ' for function ' . $job->functionName() . "\n"; |
|
87 | + echo 'Received job: '.$job->handle().' for function '.$job->functionName()."\n"; |
|
88 | 88 | |
89 | 89 | $workload = $job->workload(); |
90 | 90 | $workload = unserialize($workload); |
91 | 91 | |
92 | - if (! isset($workload['conn']) || ! is_array($workload['conn'])) { |
|
92 | + if ( ! isset($workload['conn']) || ! is_array($workload['conn'])) { |
|
93 | 93 | throw new \InvalidArgumentException('Missing Database parameters'); |
94 | 94 | } |
95 | 95 | |
96 | 96 | $this->em = $this->createEntityManager($workload['conn']); |
97 | 97 | |
98 | - if (! isset($workload['fixture'])) { |
|
98 | + if ( ! isset($workload['fixture'])) { |
|
99 | 99 | throw new \InvalidArgumentException('Missing Fixture parameters'); |
100 | 100 | } |
101 | 101 | return $workload['fixture']; |
@@ -104,11 +104,11 @@ discard block |
||
104 | 104 | protected function createEntityManager($conn) |
105 | 105 | { |
106 | 106 | $config = new Configuration(); |
107 | - $config->setProxyDir(__DIR__ . '/../../../Proxies'); |
|
107 | + $config->setProxyDir(__DIR__.'/../../../Proxies'); |
|
108 | 108 | $config->setProxyNamespace('MyProject\Proxies'); |
109 | 109 | $config->setAutoGenerateProxyClasses(true); |
110 | 110 | |
111 | - $annotDriver = $config->newDefaultAnnotationDriver([__DIR__ . '/../../../Models/']); |
|
111 | + $annotDriver = $config->newDefaultAnnotationDriver([__DIR__.'/../../../Models/']); |
|
112 | 112 | $config->setMetadataDriverImpl($annotDriver); |
113 | 113 | |
114 | 114 | $cache = new ArrayCache(); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Persisters\Entity; |
6 | 6 | |
@@ -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 | |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | |
403 | 403 | if ($value !== null) { |
404 | 404 | // @todo guilhermeblanco Make sure we do not have flat association values. |
405 | - if (! is_array($value)) { |
|
405 | + if ( ! is_array($value)) { |
|
406 | 406 | $value = [$targetClass->identifier[0] => $value]; |
407 | 407 | } |
408 | 408 | |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
416 | 416 | $targetField = $targetClass->fieldNames[$referencedColumnName]; |
417 | 417 | |
418 | - if (! $joinColumn->getType()) { |
|
418 | + if ( ! $joinColumn->getType()) { |
|
419 | 419 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
420 | 420 | } |
421 | 421 | |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
482 | 482 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
483 | 483 | |
484 | - if (! $joinColumn->getType()) { |
|
484 | + if ( ! $joinColumn->getType()) { |
|
485 | 485 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
486 | 486 | } |
487 | 487 | |
@@ -508,18 +508,18 @@ discard block |
||
508 | 508 | case Type::SMALLINT: |
509 | 509 | case Type::INTEGER: |
510 | 510 | case Type::BIGINT: |
511 | - $set[] = $versionColumnName . ' = ' . $versionColumnName . ' + 1'; |
|
511 | + $set[] = $versionColumnName.' = '.$versionColumnName.' + 1'; |
|
512 | 512 | break; |
513 | 513 | |
514 | 514 | case Type::DATETIME: |
515 | - $set[] = $versionColumnName . ' = CURRENT_TIMESTAMP'; |
|
515 | + $set[] = $versionColumnName.' = CURRENT_TIMESTAMP'; |
|
516 | 516 | break; |
517 | 517 | } |
518 | 518 | } |
519 | 519 | |
520 | - $sql = 'UPDATE ' . $quotedTableName |
|
521 | - . ' SET ' . implode(', ', $set) |
|
522 | - . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?'; |
|
520 | + $sql = 'UPDATE '.$quotedTableName |
|
521 | + . ' SET '.implode(', ', $set) |
|
522 | + . ' WHERE '.implode(' = ? AND ', $where).' = ?'; |
|
523 | 523 | |
524 | 524 | $result = $this->conn->executeUpdate($sql, $params, $types); |
525 | 525 | |
@@ -536,7 +536,7 @@ discard block |
||
536 | 536 | protected function deleteJoinTableRecords($identifier) |
537 | 537 | { |
538 | 538 | foreach ($this->class->getDeclaredPropertiesIterator() as $association) { |
539 | - if (! ($association instanceof ManyToManyAssociationMetadata)) { |
|
539 | + if ( ! ($association instanceof ManyToManyAssociationMetadata)) { |
|
540 | 540 | continue; |
541 | 541 | } |
542 | 542 | |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | $otherKeys = []; |
549 | 549 | $keys = []; |
550 | 550 | |
551 | - if (! $owningAssociation->isOwningSide()) { |
|
551 | + if ( ! $owningAssociation->isOwningSide()) { |
|
552 | 552 | $class = $this->em->getClassMetadata($association->getTargetEntity()); |
553 | 553 | $owningAssociation = $class->getProperty($association->getMappedBy()); |
554 | 554 | } |
@@ -661,7 +661,7 @@ discard block |
||
661 | 661 | } |
662 | 662 | |
663 | 663 | // Only owning side of x-1 associations can have a FK column. |
664 | - if (! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) { |
|
664 | + if ( ! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) { |
|
665 | 665 | continue; |
666 | 666 | } |
667 | 667 | |
@@ -681,7 +681,7 @@ discard block |
||
681 | 681 | /** @var JoinColumnMetadata $joinColumn */ |
682 | 682 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
683 | 683 | |
684 | - if (! $joinColumn->getType()) { |
|
684 | + if ( ! $joinColumn->getType()) { |
|
685 | 685 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
686 | 686 | } |
687 | 687 | |
@@ -709,7 +709,7 @@ discard block |
||
709 | 709 | $propertyName = $this->class->fieldNames[$columnName]; |
710 | 710 | $property = $this->class->getProperty($propertyName); |
711 | 711 | |
712 | - if (! $property) { |
|
712 | + if ( ! $property) { |
|
713 | 713 | return null; |
714 | 714 | } |
715 | 715 | |
@@ -728,7 +728,7 @@ discard block |
||
728 | 728 | /** @var JoinColumnMetadata $joinColumn */ |
729 | 729 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
730 | 730 | |
731 | - if (! $joinColumn->getType()) { |
|
731 | + if ( ! $joinColumn->getType()) { |
|
732 | 732 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
733 | 733 | } |
734 | 734 | |
@@ -833,7 +833,7 @@ discard block |
||
833 | 833 | $sourceKeyColumn = $joinColumn->getReferencedColumnName(); |
834 | 834 | $targetKeyColumn = $joinColumn->getColumnName(); |
835 | 835 | |
836 | - if (! isset($sourceClass->fieldNames[$sourceKeyColumn])) { |
|
836 | + if ( ! isset($sourceClass->fieldNames[$sourceKeyColumn])) { |
|
837 | 837 | throw MappingException::joinColumnMustPointToMappedField( |
838 | 838 | $sourceClass->getClassName(), |
839 | 839 | $sourceKeyColumn |
@@ -1060,7 +1060,7 @@ discard block |
||
1060 | 1060 | $criteria = []; |
1061 | 1061 | $parameters = []; |
1062 | 1062 | |
1063 | - if (! $association->isOwningSide()) { |
|
1063 | + if ( ! $association->isOwningSide()) { |
|
1064 | 1064 | $class = $this->em->getClassMetadata($association->getTargetEntity()); |
1065 | 1065 | $owningAssoc = $class->getProperty($association->getMappedBy()); |
1066 | 1066 | } |
@@ -1089,7 +1089,7 @@ discard block |
||
1089 | 1089 | $value = $value[$targetClass->identifier[0]]; |
1090 | 1090 | } |
1091 | 1091 | |
1092 | - $criteria[$joinTableName . '.' . $quotedColumnName] = $value; |
|
1092 | + $criteria[$joinTableName.'.'.$quotedColumnName] = $value; |
|
1093 | 1093 | $parameters[] = [ |
1094 | 1094 | 'value' => $value, |
1095 | 1095 | 'field' => $fieldName, |
@@ -1139,11 +1139,11 @@ discard block |
||
1139 | 1139 | |
1140 | 1140 | switch ($lockMode) { |
1141 | 1141 | case LockMode::PESSIMISTIC_READ: |
1142 | - $lockSql = ' ' . $this->platform->getReadLockSQL(); |
|
1142 | + $lockSql = ' '.$this->platform->getReadLockSQL(); |
|
1143 | 1143 | break; |
1144 | 1144 | |
1145 | 1145 | case LockMode::PESSIMISTIC_WRITE: |
1146 | - $lockSql = ' ' . $this->platform->getWriteLockSQL(); |
|
1146 | + $lockSql = ' '.$this->platform->getWriteLockSQL(); |
|
1147 | 1147 | break; |
1148 | 1148 | } |
1149 | 1149 | |
@@ -1154,14 +1154,14 @@ discard block |
||
1154 | 1154 | |
1155 | 1155 | if ($filterSql !== '') { |
1156 | 1156 | $conditionSql = $conditionSql |
1157 | - ? $conditionSql . ' AND ' . $filterSql |
|
1157 | + ? $conditionSql.' AND '.$filterSql |
|
1158 | 1158 | : $filterSql; |
1159 | 1159 | } |
1160 | 1160 | |
1161 | - $select = 'SELECT ' . $columnList; |
|
1162 | - $from = ' FROM ' . $tableName . ' ' . $tableAlias; |
|
1163 | - $join = $this->currentPersisterContext->selectJoinSql . $joinSql; |
|
1164 | - $where = ($conditionSql ? ' WHERE ' . $conditionSql : ''); |
|
1161 | + $select = 'SELECT '.$columnList; |
|
1162 | + $from = ' FROM '.$tableName.' '.$tableAlias; |
|
1163 | + $join = $this->currentPersisterContext->selectJoinSql.$joinSql; |
|
1164 | + $where = ($conditionSql ? ' WHERE '.$conditionSql : ''); |
|
1165 | 1165 | $lock = $this->platform->appendLockHint($from, $lockMode); |
1166 | 1166 | $query = $select |
1167 | 1167 | . $lock |
@@ -1169,7 +1169,7 @@ discard block |
||
1169 | 1169 | . $where |
1170 | 1170 | . $orderBySql; |
1171 | 1171 | |
1172 | - return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql; |
|
1172 | + return $this->platform->modifyLimitQuery($query, $limit, $offset).$lockSql; |
|
1173 | 1173 | } |
1174 | 1174 | |
1175 | 1175 | /** |
@@ -1188,13 +1188,13 @@ discard block |
||
1188 | 1188 | |
1189 | 1189 | if ($filterSql !== '') { |
1190 | 1190 | $conditionSql = $conditionSql |
1191 | - ? $conditionSql . ' AND ' . $filterSql |
|
1191 | + ? $conditionSql.' AND '.$filterSql |
|
1192 | 1192 | : $filterSql; |
1193 | 1193 | } |
1194 | 1194 | |
1195 | 1195 | $sql = 'SELECT COUNT(*) ' |
1196 | - . 'FROM ' . $tableName . ' ' . $tableAlias |
|
1197 | - . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql); |
|
1196 | + . 'FROM '.$tableName.' '.$tableAlias |
|
1197 | + . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql); |
|
1198 | 1198 | |
1199 | 1199 | return $sql; |
1200 | 1200 | } |
@@ -1211,7 +1211,7 @@ discard block |
||
1211 | 1211 | */ |
1212 | 1212 | final protected function getOrderBySQL(array $orderBy, $baseTableAlias) |
1213 | 1213 | { |
1214 | - if (! $orderBy) { |
|
1214 | + if ( ! $orderBy) { |
|
1215 | 1215 | return ''; |
1216 | 1216 | } |
1217 | 1217 | |
@@ -1220,7 +1220,7 @@ discard block |
||
1220 | 1220 | foreach ($orderBy as $fieldName => $orientation) { |
1221 | 1221 | $orientation = strtoupper(trim($orientation)); |
1222 | 1222 | |
1223 | - if (! in_array($orientation, ['ASC', 'DESC'], true)) { |
|
1223 | + if ( ! in_array($orientation, ['ASC', 'DESC'], true)) { |
|
1224 | 1224 | throw ORMException::invalidOrientation($this->class->getClassName(), $fieldName); |
1225 | 1225 | } |
1226 | 1226 | |
@@ -1230,11 +1230,11 @@ discard block |
||
1230 | 1230 | $tableAlias = $this->getSQLTableAlias($property->getTableName()); |
1231 | 1231 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
1232 | 1232 | |
1233 | - $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation; |
|
1233 | + $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation; |
|
1234 | 1234 | |
1235 | 1235 | continue; |
1236 | 1236 | } elseif ($property instanceof AssociationMetadata) { |
1237 | - if (! $property->isOwningSide()) { |
|
1237 | + if ( ! $property->isOwningSide()) { |
|
1238 | 1238 | throw ORMException::invalidFindByInverseAssociation($this->class->getClassName(), $fieldName); |
1239 | 1239 | } |
1240 | 1240 | |
@@ -1247,7 +1247,7 @@ discard block |
||
1247 | 1247 | /** @var JoinColumnMetadata $joinColumn */ |
1248 | 1248 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
1249 | 1249 | |
1250 | - $orderByList[] = $tableAlias . '.' . $quotedColumnName . ' ' . $orientation; |
|
1250 | + $orderByList[] = $tableAlias.'.'.$quotedColumnName.' '.$orientation; |
|
1251 | 1251 | } |
1252 | 1252 | |
1253 | 1253 | continue; |
@@ -1256,7 +1256,7 @@ discard block |
||
1256 | 1256 | throw ORMException::unrecognizedField($fieldName); |
1257 | 1257 | } |
1258 | 1258 | |
1259 | - return ' ORDER BY ' . implode(', ', $orderByList); |
|
1259 | + return ' ORDER BY '.implode(', ', $orderByList); |
|
1260 | 1260 | } |
1261 | 1261 | |
1262 | 1262 | /** |
@@ -1298,7 +1298,7 @@ discard block |
||
1298 | 1298 | $isAssocToOneInverseSide = $property instanceof ToOneAssociationMetadata && ! $property->isOwningSide(); |
1299 | 1299 | $isAssocFromOneEager = ! $property instanceof ManyToManyAssociationMetadata && $property->getFetchMode() === FetchMode::EAGER; |
1300 | 1300 | |
1301 | - if (! ($isAssocFromOneEager || $isAssocToOneInverseSide)) { |
|
1301 | + if ( ! ($isAssocFromOneEager || $isAssocToOneInverseSide)) { |
|
1302 | 1302 | break; |
1303 | 1303 | } |
1304 | 1304 | |
@@ -1313,7 +1313,7 @@ discard block |
||
1313 | 1313 | break; // now this is why you shouldn't use inheritance |
1314 | 1314 | } |
1315 | 1315 | |
1316 | - $assocAlias = 'e' . ($eagerAliasCounter++); |
|
1316 | + $assocAlias = 'e'.($eagerAliasCounter++); |
|
1317 | 1317 | |
1318 | 1318 | $this->currentPersisterContext->rsm->addJoinedEntityResult($targetEntity, $assocAlias, 'r', $fieldName); |
1319 | 1319 | |
@@ -1341,14 +1341,14 @@ discard block |
||
1341 | 1341 | $this->currentPersisterContext->rsm->addIndexBy($assocAlias, $property->getIndexedBy()); |
1342 | 1342 | } |
1343 | 1343 | |
1344 | - if (! $property->isOwningSide()) { |
|
1344 | + if ( ! $property->isOwningSide()) { |
|
1345 | 1345 | $owningAssociation = $eagerEntity->getProperty($property->getMappedBy()); |
1346 | 1346 | } |
1347 | 1347 | |
1348 | 1348 | $joinTableAlias = $this->getSQLTableAlias($eagerEntity->getTableName(), $assocAlias); |
1349 | 1349 | $joinTableName = $eagerEntity->table->getQuotedQualifiedName($this->platform); |
1350 | 1350 | |
1351 | - $this->currentPersisterContext->selectJoinSql .= ' ' . $this->getJoinSQLForAssociation($property); |
|
1351 | + $this->currentPersisterContext->selectJoinSql .= ' '.$this->getJoinSQLForAssociation($property); |
|
1352 | 1352 | |
1353 | 1353 | $sourceClass = $this->em->getClassMetadata($owningAssociation->getSourceEntity()); |
1354 | 1354 | $targetClass = $this->em->getClassMetadata($owningAssociation->getTargetEntity()); |
@@ -1372,7 +1372,7 @@ discard block |
||
1372 | 1372 | $joinCondition[] = $filterSql; |
1373 | 1373 | } |
1374 | 1374 | |
1375 | - $this->currentPersisterContext->selectJoinSql .= ' ' . $joinTableName . ' ' . $joinTableAlias . ' ON '; |
|
1375 | + $this->currentPersisterContext->selectJoinSql .= ' '.$joinTableName.' '.$joinTableAlias.' ON '; |
|
1376 | 1376 | $this->currentPersisterContext->selectJoinSql .= implode(' AND ', $joinCondition); |
1377 | 1377 | |
1378 | 1378 | break; |
@@ -1394,7 +1394,7 @@ discard block |
||
1394 | 1394 | */ |
1395 | 1395 | protected function getSelectColumnAssociationSQL($field, AssociationMetadata $association, ClassMetadata $class, $alias = 'r') |
1396 | 1396 | { |
1397 | - if (! ($association->isOwningSide() && $association instanceof ToOneAssociationMetadata)) { |
|
1397 | + if ( ! ($association->isOwningSide() && $association instanceof ToOneAssociationMetadata)) { |
|
1398 | 1398 | return ''; |
1399 | 1399 | } |
1400 | 1400 | |
@@ -1409,7 +1409,7 @@ discard block |
||
1409 | 1409 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
1410 | 1410 | $resultColumnName = $this->getSQLColumnAlias(); |
1411 | 1411 | |
1412 | - if (! $joinColumn->getType()) { |
|
1412 | + if ( ! $joinColumn->getType()) { |
|
1413 | 1413 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
1414 | 1414 | } |
1415 | 1415 | |
@@ -1439,7 +1439,7 @@ discard block |
||
1439 | 1439 | $owningAssociation = $association; |
1440 | 1440 | $sourceTableAlias = $this->getSQLTableAlias($this->class->getTableName()); |
1441 | 1441 | |
1442 | - if (! $association->isOwningSide()) { |
|
1442 | + if ( ! $association->isOwningSide()) { |
|
1443 | 1443 | $targetEntity = $this->em->getClassMetadata($association->getTargetEntity()); |
1444 | 1444 | $owningAssociation = $targetEntity->getProperty($association->getMappedBy()); |
1445 | 1445 | } |
@@ -1461,7 +1461,7 @@ discard block |
||
1461 | 1461 | ); |
1462 | 1462 | } |
1463 | 1463 | |
1464 | - return ' INNER JOIN ' . $joinTableName . ' ON ' . implode(' AND ', $conditions); |
|
1464 | + return ' INNER JOIN '.$joinTableName.' ON '.implode(' AND ', $conditions); |
|
1465 | 1465 | } |
1466 | 1466 | |
1467 | 1467 | /** |
@@ -1556,7 +1556,7 @@ discard block |
||
1556 | 1556 | $columnName = $joinColumn->getColumnName(); |
1557 | 1557 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
1558 | 1558 | |
1559 | - if (! $joinColumn->getType()) { |
|
1559 | + if ( ! $joinColumn->getType()) { |
|
1560 | 1560 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
1561 | 1561 | } |
1562 | 1562 | |
@@ -1595,7 +1595,7 @@ discard block |
||
1595 | 1595 | |
1596 | 1596 | $this->currentPersisterContext->rsm->addFieldResult($alias, $columnAlias, $field, $class->getClassName()); |
1597 | 1597 | |
1598 | - return $property->getType()->convertToPHPValueSQL($sql, $this->platform) . ' AS ' . $columnAlias; |
|
1598 | + return $property->getType()->convertToPHPValueSQL($sql, $this->platform).' AS '.$columnAlias; |
|
1599 | 1599 | } |
1600 | 1600 | |
1601 | 1601 | /** |
@@ -1609,14 +1609,14 @@ discard block |
||
1609 | 1609 | protected function getSQLTableAlias($tableName, $assocName = '') |
1610 | 1610 | { |
1611 | 1611 | if ($tableName) { |
1612 | - $tableName .= '#' . $assocName; |
|
1612 | + $tableName .= '#'.$assocName; |
|
1613 | 1613 | } |
1614 | 1614 | |
1615 | 1615 | if (isset($this->currentPersisterContext->sqlTableAliases[$tableName])) { |
1616 | 1616 | return $this->currentPersisterContext->sqlTableAliases[$tableName]; |
1617 | 1617 | } |
1618 | 1618 | |
1619 | - $tableAlias = 't' . $this->currentPersisterContext->sqlAliasCounter++; |
|
1619 | + $tableAlias = 't'.$this->currentPersisterContext->sqlAliasCounter++; |
|
1620 | 1620 | |
1621 | 1621 | $this->currentPersisterContext->sqlTableAliases[$tableName] = $tableAlias; |
1622 | 1622 | |
@@ -1642,7 +1642,7 @@ discard block |
||
1642 | 1642 | } |
1643 | 1643 | |
1644 | 1644 | $lock = $this->getLockTablesSql($lockMode); |
1645 | - $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' '; |
|
1645 | + $where = ($conditionSql ? ' WHERE '.$conditionSql : '').' '; |
|
1646 | 1646 | $sql = 'SELECT 1 ' |
1647 | 1647 | . $lock |
1648 | 1648 | . $where |
@@ -1665,7 +1665,7 @@ discard block |
||
1665 | 1665 | $tableName = $this->class->table->getQuotedQualifiedName($this->platform); |
1666 | 1666 | |
1667 | 1667 | return $this->platform->appendLockHint( |
1668 | - 'FROM ' . $tableName . ' ' . $this->getSQLTableAlias($this->class->getTableName()), |
|
1668 | + 'FROM '.$tableName.' '.$this->getSQLTableAlias($this->class->getTableName()), |
|
1669 | 1669 | $lockMode |
1670 | 1670 | ); |
1671 | 1671 | } |
@@ -1715,19 +1715,19 @@ discard block |
||
1715 | 1715 | |
1716 | 1716 | if ($comparison !== null) { |
1717 | 1717 | // special case null value handling |
1718 | - if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && $value ===null) { |
|
1719 | - $selectedColumns[] = $column . ' IS NULL'; |
|
1718 | + if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && $value === null) { |
|
1719 | + $selectedColumns[] = $column.' IS NULL'; |
|
1720 | 1720 | |
1721 | 1721 | continue; |
1722 | 1722 | } |
1723 | 1723 | |
1724 | 1724 | if ($comparison === Comparison::NEQ && $value === null) { |
1725 | - $selectedColumns[] = $column . ' IS NOT NULL'; |
|
1725 | + $selectedColumns[] = $column.' IS NOT NULL'; |
|
1726 | 1726 | |
1727 | 1727 | continue; |
1728 | 1728 | } |
1729 | 1729 | |
1730 | - $selectedColumns[] = $column . ' ' . sprintf(self::$comparisonMap[$comparison], $placeholder); |
|
1730 | + $selectedColumns[] = $column.' '.sprintf(self::$comparisonMap[$comparison], $placeholder); |
|
1731 | 1731 | |
1732 | 1732 | continue; |
1733 | 1733 | } |
@@ -1775,7 +1775,7 @@ discard block |
||
1775 | 1775 | $tableAlias = $this->getSQLTableAlias($property->getTableName()); |
1776 | 1776 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
1777 | 1777 | |
1778 | - return [$tableAlias . '.' . $columnName]; |
|
1778 | + return [$tableAlias.'.'.$columnName]; |
|
1779 | 1779 | } |
1780 | 1780 | |
1781 | 1781 | if ($property instanceof AssociationMetadata) { |
@@ -1784,7 +1784,7 @@ discard block |
||
1784 | 1784 | |
1785 | 1785 | // Many-To-Many requires join table check for joinColumn |
1786 | 1786 | if ($owningAssociation instanceof ManyToManyAssociationMetadata) { |
1787 | - if (! $owningAssociation->isOwningSide()) { |
|
1787 | + if ( ! $owningAssociation->isOwningSide()) { |
|
1788 | 1788 | $owningAssociation = $association; |
1789 | 1789 | } |
1790 | 1790 | |
@@ -1798,14 +1798,14 @@ discard block |
||
1798 | 1798 | foreach ($joinColumns as $joinColumn) { |
1799 | 1799 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
1800 | 1800 | |
1801 | - $columns[] = $joinTableName . '.' . $quotedColumnName; |
|
1801 | + $columns[] = $joinTableName.'.'.$quotedColumnName; |
|
1802 | 1802 | } |
1803 | 1803 | } else { |
1804 | - if (! $owningAssociation->isOwningSide()) { |
|
1804 | + if ( ! $owningAssociation->isOwningSide()) { |
|
1805 | 1805 | throw ORMException::invalidFindByInverseAssociation($this->class->getClassName(), $field); |
1806 | 1806 | } |
1807 | 1807 | |
1808 | - $class = $this->class->isInheritedProperty($field) |
|
1808 | + $class = $this->class->isInheritedProperty($field) |
|
1809 | 1809 | ? $owningAssociation->getDeclaringClass() |
1810 | 1810 | : $this->class |
1811 | 1811 | ; |
@@ -1814,7 +1814,7 @@ discard block |
||
1814 | 1814 | foreach ($owningAssociation->getJoinColumns() as $joinColumn) { |
1815 | 1815 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
1816 | 1816 | |
1817 | - $columns[] = $tableAlias . '.' . $quotedColumnName; |
|
1817 | + $columns[] = $tableAlias.'.'.$quotedColumnName; |
|
1818 | 1818 | } |
1819 | 1819 | } |
1820 | 1820 | |
@@ -1923,7 +1923,7 @@ discard block |
||
1923 | 1923 | $value = $value[$targetClass->identifier[0]]; |
1924 | 1924 | } |
1925 | 1925 | |
1926 | - $criteria[$tableAlias . '.' . $quotedColumnName] = $value; |
|
1926 | + $criteria[$tableAlias.'.'.$quotedColumnName] = $value; |
|
1927 | 1927 | $parameters[] = [ |
1928 | 1928 | 'value' => $value, |
1929 | 1929 | 'field' => $fieldName, |
@@ -2008,7 +2008,7 @@ discard block |
||
2008 | 2008 | case ($property instanceof AssociationMetadata): |
2009 | 2009 | $class = $this->em->getClassMetadata($property->getTargetEntity()); |
2010 | 2010 | |
2011 | - if (! $property->isOwningSide()) { |
|
2011 | + if ( ! $property->isOwningSide()) { |
|
2012 | 2012 | $property = $class->getProperty($property->getMappedBy()); |
2013 | 2013 | $class = $this->em->getClassMetadata($property->getTargetEntity()); |
2014 | 2014 | } |
@@ -2022,7 +2022,7 @@ discard block |
||
2022 | 2022 | /** @var JoinColumnMetadata $joinColumn */ |
2023 | 2023 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
2024 | 2024 | |
2025 | - if (! $joinColumn->getType()) { |
|
2025 | + if ( ! $joinColumn->getType()) { |
|
2026 | 2026 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em)); |
2027 | 2027 | } |
2028 | 2028 | |
@@ -2037,7 +2037,7 @@ discard block |
||
2037 | 2037 | } |
2038 | 2038 | |
2039 | 2039 | if (is_array($value)) { |
2040 | - return array_map(function ($type) { |
|
2040 | + return array_map(function($type) { |
|
2041 | 2041 | return $type->getBindingType() + Connection::ARRAY_PARAM_OFFSET; |
2042 | 2042 | }, $types); |
2043 | 2043 | } |
@@ -2094,7 +2094,7 @@ discard block |
||
2094 | 2094 | */ |
2095 | 2095 | private function getIndividualValue($value) |
2096 | 2096 | { |
2097 | - if (! is_object($value) || ! $this->em->getMetadataFactory()->hasMetadataFor(StaticClassNameConverter::getClass($value))) { |
|
2097 | + if ( ! is_object($value) || ! $this->em->getMetadataFactory()->hasMetadataFor(StaticClassNameConverter::getClass($value))) { |
|
2098 | 2098 | return $value; |
2099 | 2099 | } |
2100 | 2100 | |
@@ -2108,7 +2108,7 @@ discard block |
||
2108 | 2108 | { |
2109 | 2109 | $criteria = $this->getIdentifier($entity); |
2110 | 2110 | |
2111 | - if (! $criteria) { |
|
2111 | + if ( ! $criteria) { |
|
2112 | 2112 | return false; |
2113 | 2113 | } |
2114 | 2114 | |
@@ -2116,12 +2116,12 @@ discard block |
||
2116 | 2116 | |
2117 | 2117 | $sql = 'SELECT 1 ' |
2118 | 2118 | . $this->getLockTablesSql(null) |
2119 | - . ' WHERE ' . $this->getSelectConditionSQL($criteria); |
|
2119 | + . ' WHERE '.$this->getSelectConditionSQL($criteria); |
|
2120 | 2120 | |
2121 | 2121 | list($params, $types) = $this->expandParameters($criteria); |
2122 | 2122 | |
2123 | 2123 | if ($extraConditions !== null) { |
2124 | - $sql .= ' AND ' . $this->getSelectConditionCriteriaSQL($extraConditions); |
|
2124 | + $sql .= ' AND '.$this->getSelectConditionCriteriaSQL($extraConditions); |
|
2125 | 2125 | list($criteriaParams, $criteriaTypes) = $this->expandCriteriaParameters($extraConditions); |
2126 | 2126 | |
2127 | 2127 | $params = array_merge($params, $criteriaParams); |
@@ -2131,7 +2131,7 @@ discard block |
||
2131 | 2131 | $filterSql = $this->generateFilterConditionSQL($this->class, $alias); |
2132 | 2132 | |
2133 | 2133 | if ($filterSql) { |
2134 | - $sql .= ' AND ' . $filterSql; |
|
2134 | + $sql .= ' AND '.$filterSql; |
|
2135 | 2135 | } |
2136 | 2136 | |
2137 | 2137 | return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); |
@@ -2144,13 +2144,13 @@ discard block |
||
2144 | 2144 | */ |
2145 | 2145 | protected function getJoinSQLForAssociation(AssociationMetadata $association) |
2146 | 2146 | { |
2147 | - if (! $association->isOwningSide()) { |
|
2147 | + if ( ! $association->isOwningSide()) { |
|
2148 | 2148 | return 'LEFT JOIN'; |
2149 | 2149 | } |
2150 | 2150 | |
2151 | 2151 | // if one of the join columns is nullable, return left join |
2152 | 2152 | foreach ($association->getJoinColumns() as $joinColumn) { |
2153 | - if (! $joinColumn->isNullable()) { |
|
2153 | + if ( ! $joinColumn->isNullable()) { |
|
2154 | 2154 | continue; |
2155 | 2155 | } |
2156 | 2156 | |
@@ -2167,7 +2167,7 @@ discard block |
||
2167 | 2167 | */ |
2168 | 2168 | public function getSQLColumnAlias() |
2169 | 2169 | { |
2170 | - return $this->platform->getSQLResultCasing('c' . $this->currentPersisterContext->sqlAliasCounter++); |
|
2170 | + return $this->platform->getSQLResultCasing('c'.$this->currentPersisterContext->sqlAliasCounter++); |
|
2171 | 2171 | } |
2172 | 2172 | |
2173 | 2173 | /** |
@@ -2186,13 +2186,13 @@ discard block |
||
2186 | 2186 | $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias); |
2187 | 2187 | |
2188 | 2188 | if ($filterExpr !== '') { |
2189 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
2189 | + $filterClauses[] = '('.$filterExpr.')'; |
|
2190 | 2190 | } |
2191 | 2191 | } |
2192 | 2192 | |
2193 | 2193 | $sql = implode(' AND ', $filterClauses); |
2194 | 2194 | |
2195 | - return $sql ? '(' . $sql . ')' : ''; // Wrap again to avoid "X or Y and FilterConditionSQL" |
|
2195 | + return $sql ? '('.$sql.')' : ''; // Wrap again to avoid "X or Y and FilterConditionSQL" |
|
2196 | 2196 | } |
2197 | 2197 | |
2198 | 2198 | /** |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Tools; |
6 | 6 | |
@@ -176,11 +176,11 @@ discard block |
||
176 | 176 | $pkColumns = []; |
177 | 177 | |
178 | 178 | foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) { |
179 | - if (! ($property instanceof FieldMetadata)) { |
|
179 | + if ( ! ($property instanceof FieldMetadata)) { |
|
180 | 180 | continue; |
181 | 181 | } |
182 | 182 | |
183 | - if (! $class->isInheritedProperty($fieldName)) { |
|
183 | + if ( ! $class->isInheritedProperty($fieldName)) { |
|
184 | 184 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
185 | 185 | |
186 | 186 | $this->gatherColumn($class, $property, $table); |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | } |
216 | 216 | } |
217 | 217 | |
218 | - if (! empty($inheritedKeyColumns)) { |
|
218 | + if ( ! empty($inheritedKeyColumns)) { |
|
219 | 219 | // Add a FK constraint on the ID column |
220 | 220 | $rootClass = $this->em->getClassMetadata($class->getRootClassName()); |
221 | 221 | |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | } |
261 | 261 | } |
262 | 262 | |
263 | - if (! $table->hasIndex('primary')) { |
|
263 | + if ( ! $table->hasIndex('primary')) { |
|
264 | 264 | $table->setPrimaryKey($pkColumns); |
265 | 265 | } |
266 | 266 | |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | $processedClasses[$class->getClassName()] = true; |
321 | 321 | |
322 | 322 | foreach ($class->getDeclaredPropertiesIterator() as $property) { |
323 | - if (! $property instanceof FieldMetadata |
|
323 | + if ( ! $property instanceof FieldMetadata |
|
324 | 324 | || ! $property->hasValueGenerator() |
325 | 325 | || $property->getValueGenerator()->getType() !== GeneratorType::SEQUENCE |
326 | 326 | || $class->getClassName() !== $class->getRootClassName()) { |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | |
330 | 330 | $quotedName = $this->platform->quoteIdentifier($property->getValueGenerator()->getDefinition()['sequenceName']); |
331 | 331 | |
332 | - if (! $schema->hasSequence($quotedName)) { |
|
332 | + if ( ! $schema->hasSequence($quotedName)) { |
|
333 | 333 | $schema->createSequence($quotedName, $property->getValueGenerator()->getDefinition()['allocationSize']); |
334 | 334 | } |
335 | 335 | } |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | } |
343 | 343 | } |
344 | 344 | |
345 | - if (! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) { |
|
345 | + if ( ! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) { |
|
346 | 346 | $schema->visit(new RemoveNamespacedAssets()); |
347 | 347 | } |
348 | 348 | |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | break; |
382 | 382 | } |
383 | 383 | |
384 | - if (! empty($discrColumn->getColumnDefinition())) { |
|
384 | + if ( ! empty($discrColumn->getColumnDefinition())) { |
|
385 | 385 | $options['columnDefinition'] = $discrColumn->getColumnDefinition(); |
386 | 386 | } |
387 | 387 | |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | $pkColumns = []; |
400 | 400 | |
401 | 401 | foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) { |
402 | - if (! ($property instanceof FieldMetadata)) { |
|
402 | + if ( ! ($property instanceof FieldMetadata)) { |
|
403 | 403 | continue; |
404 | 404 | } |
405 | 405 | |
@@ -514,7 +514,7 @@ discard block |
||
514 | 514 | private function gatherRelationsSql($class, $table, $schema, &$addedFks, &$blacklistedFks) |
515 | 515 | { |
516 | 516 | foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) { |
517 | - if (! ($property instanceof AssociationMetadata)) { |
|
517 | + if ( ! ($property instanceof AssociationMetadata)) { |
|
518 | 518 | continue; |
519 | 519 | } |
520 | 520 | |
@@ -522,7 +522,7 @@ discard block |
||
522 | 522 | continue; |
523 | 523 | } |
524 | 524 | |
525 | - if (! $property->isOwningSide()) { |
|
525 | + if ( ! $property->isOwningSide()) { |
|
526 | 526 | continue; |
527 | 527 | } |
528 | 528 | |
@@ -612,7 +612,7 @@ discard block |
||
612 | 612 | $idColumns = $class->getIdentifierColumns($this->em); |
613 | 613 | $idColumnNameList = array_keys($idColumns); |
614 | 614 | |
615 | - if (! in_array($referencedColumnName, $idColumnNameList, true)) { |
|
615 | + if ( ! in_array($referencedColumnName, $idColumnNameList, true)) { |
|
616 | 616 | return null; |
617 | 617 | } |
618 | 618 | |
@@ -620,7 +620,7 @@ discard block |
||
620 | 620 | foreach ($class->getIdentifierFieldNames() as $fieldName) { |
621 | 621 | $property = $class->getProperty($fieldName); |
622 | 622 | |
623 | - if (! ($property instanceof AssociationMetadata)) { |
|
623 | + if ( ! ($property instanceof AssociationMetadata)) { |
|
624 | 624 | continue; |
625 | 625 | } |
626 | 626 | |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | $joinColumn->getReferencedColumnName() |
677 | 677 | ); |
678 | 678 | |
679 | - if (! $definingClass) { |
|
679 | + if ( ! $definingClass) { |
|
680 | 680 | throw new ORMException(sprintf( |
681 | 681 | 'Column name "%s" referenced for relation from %s towards %s does not exist.', |
682 | 682 | $joinColumn->getReferencedColumnName(), |
@@ -692,14 +692,14 @@ discard block |
||
692 | 692 | $localColumns[] = $quotedColumnName; |
693 | 693 | $foreignColumns[] = $quotedReferencedColumnName; |
694 | 694 | |
695 | - if (! $theJoinTable->hasColumn($quotedColumnName)) { |
|
695 | + if ( ! $theJoinTable->hasColumn($quotedColumnName)) { |
|
696 | 696 | // Only add the column to the table if it does not exist already. |
697 | 697 | // It might exist already if the foreign key is mapped into a regular |
698 | 698 | // property as well. |
699 | 699 | $property = $definingClass->getProperty($referencedFieldName); |
700 | 700 | $columnDef = null; |
701 | 701 | |
702 | - if (! empty($joinColumn->getColumnDefinition())) { |
|
702 | + if ( ! empty($joinColumn->getColumnDefinition())) { |
|
703 | 703 | $columnDef = $joinColumn->getColumnDefinition(); |
704 | 704 | } elseif ($property->getColumnDefinition()) { |
705 | 705 | $columnDef = $property->getColumnDefinition(); |
@@ -733,7 +733,7 @@ discard block |
||
733 | 733 | $uniqueConstraints[] = ['columns' => [$quotedColumnName]]; |
734 | 734 | } |
735 | 735 | |
736 | - if (! empty($joinColumn->getOnDelete())) { |
|
736 | + if ( ! empty($joinColumn->getOnDelete())) { |
|
737 | 737 | $fkOptions['onDelete'] = $joinColumn->getOnDelete(); |
738 | 738 | } |
739 | 739 | } |
@@ -744,7 +744,7 @@ discard block |
||
744 | 744 | $theJoinTable->addUniqueIndex($unique['columns'], is_numeric($indexName) ? null : $indexName); |
745 | 745 | } |
746 | 746 | |
747 | - $compositeName = $theJoinTable->getName() . '.' . implode('', $localColumns); |
|
747 | + $compositeName = $theJoinTable->getName().'.'.implode('', $localColumns); |
|
748 | 748 | |
749 | 749 | if (isset($addedFks[$compositeName]) |
750 | 750 | && ($foreignTableName !== $addedFks[$compositeName]['foreignTableName'] |
@@ -761,7 +761,7 @@ discard block |
||
761 | 761 | } |
762 | 762 | |
763 | 763 | $blacklistedFks[$compositeName] = true; |
764 | - } elseif (! isset($blacklistedFks[$compositeName])) { |
|
764 | + } elseif ( ! isset($blacklistedFks[$compositeName])) { |
|
765 | 765 | $addedFks[$compositeName] = [ |
766 | 766 | 'foreignTableName' => $foreignTableName, |
767 | 767 | 'foreignColumns' => $foreignColumns, |
@@ -843,7 +843,7 @@ discard block |
||
843 | 843 | $fullSchema = $sm->createSchema(); |
844 | 844 | |
845 | 845 | foreach ($fullSchema->getTables() as $table) { |
846 | - if (! $schema->hasTable($table->getName())) { |
|
846 | + if ( ! $schema->hasTable($table->getName())) { |
|
847 | 847 | foreach ($table->getForeignKeys() as $foreignKey) { |
848 | 848 | /** @var $foreignKey \Doctrine\DBAL\Schema\ForeignKeyConstraint */ |
849 | 849 | if ($schema->hasTable($foreignKey->getForeignTableName())) { |
@@ -868,7 +868,7 @@ discard block |
||
868 | 868 | if ($table->hasPrimaryKey()) { |
869 | 869 | $columns = $table->getPrimaryKey()->getColumns(); |
870 | 870 | if (count($columns) === 1) { |
871 | - $checkSequence = $table->getName() . '_' . $columns[0] . '_seq'; |
|
871 | + $checkSequence = $table->getName().'_'.$columns[0].'_seq'; |
|
872 | 872 | if ($fullSchema->hasSequence($checkSequence)) { |
873 | 873 | $visitor->acceptSequence($fullSchema->getSequence($checkSequence)); |
874 | 874 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Tools\Pagination; |
6 | 6 | |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | /** @var Query $countQuery */ |
222 | 222 | $countQuery = $this->cloneQuery($this->query); |
223 | 223 | |
224 | - if (! $countQuery->hasHint(CountWalker::HINT_DISTINCT)) { |
|
224 | + if ( ! $countQuery->hasHint(CountWalker::HINT_DISTINCT)) { |
|
225 | 225 | $countQuery->setHint(CountWalker::HINT_DISTINCT, true); |
226 | 226 | } |
227 | 227 | |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | foreach ($parameters as $key => $parameter) { |
249 | 249 | $parameterName = $parameter->getName(); |
250 | 250 | |
251 | - if (! (isset($parameterMappings[$parameterName]) || array_key_exists($parameterName, $parameterMappings))) { |
|
251 | + if ( ! (isset($parameterMappings[$parameterName]) || array_key_exists($parameterName, $parameterMappings))) { |
|
252 | 252 | unset($parameters[$key]); |
253 | 253 | } |
254 | 254 | } |