@@ -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\Internal\Hydration; |
| 6 | 6 | |
@@ -96,10 +96,10 @@ discard block |
||
| 96 | 96 | // It's a joined result |
| 97 | 97 | |
| 98 | 98 | $parent = $this->rsm->parentAliasMap[$dqlAlias]; |
| 99 | - $path = $parent . '.' . $dqlAlias; |
|
| 99 | + $path = $parent.'.'.$dqlAlias; |
|
| 100 | 100 | |
| 101 | 101 | // missing parent data, skipping as RIGHT JOIN hydration is not supported. |
| 102 | - if ( ! isset($nonemptyComponents[$parent]) ) { |
|
| 102 | + if ( ! isset($nonemptyComponents[$parent])) { |
|
| 103 | 103 | continue; |
| 104 | 104 | } |
| 105 | 105 | |
@@ -108,9 +108,9 @@ discard block |
||
| 108 | 108 | if ($this->rsm->isMixed && isset($this->rootAliases[$parent])) { |
| 109 | 109 | $first = reset($this->resultPointers); |
| 110 | 110 | // TODO: Exception if $key === null ? |
| 111 | - $baseElement =& $this->resultPointers[$parent][key($first)]; |
|
| 111 | + $baseElement = & $this->resultPointers[$parent][key($first)]; |
|
| 112 | 112 | } elseif (isset($this->resultPointers[$parent])) { |
| 113 | - $baseElement =& $this->resultPointers[$parent]; |
|
| 113 | + $baseElement = & $this->resultPointers[$parent]; |
|
| 114 | 114 | } else { |
| 115 | 115 | unset($this->resultPointers[$dqlAlias]); // Ticket #1228 |
| 116 | 116 | |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | $relation = $parentClass->getProperty($relationAlias); |
| 123 | 123 | |
| 124 | 124 | // Check the type of the relation (many or single-valued) |
| 125 | - if (! $relation instanceof ToOneAssociationMetadata) { |
|
| 125 | + if ( ! $relation instanceof ToOneAssociationMetadata) { |
|
| 126 | 126 | $oneToOne = false; |
| 127 | 127 | |
| 128 | 128 | if ( ! isset($baseElement[$relationAlias])) { |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | } |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | - $coll =& $baseElement[$relationAlias]; |
|
| 164 | + $coll = & $baseElement[$relationAlias]; |
|
| 165 | 165 | |
| 166 | 166 | if (is_array($coll)) { |
| 167 | 167 | $this->updateResultPointer($coll, $index, $dqlAlias, $oneToOne); |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | $entityKey = $this->rsm->entityMappings[$dqlAlias] ?: 0; |
| 174 | 174 | |
| 175 | 175 | // if this row has a NULL value for the root result id then make it a null result. |
| 176 | - if ( ! isset($nonemptyComponents[$dqlAlias]) ) { |
|
| 176 | + if ( ! isset($nonemptyComponents[$dqlAlias])) { |
|
| 177 | 177 | $result[] = $this->rsm->isMixed |
| 178 | 178 | ? [$entityKey => null] |
| 179 | 179 | : null; |
@@ -267,13 +267,13 @@ discard block |
||
| 267 | 267 | private function updateResultPointer(array &$coll, $index, $dqlAlias, $oneToOne) |
| 268 | 268 | { |
| 269 | 269 | if ($oneToOne) { |
| 270 | - $this->resultPointers[$dqlAlias] =& $coll; |
|
| 270 | + $this->resultPointers[$dqlAlias] = & $coll; |
|
| 271 | 271 | |
| 272 | 272 | return; |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | if ($index !== false) { |
| 276 | - $this->resultPointers[$dqlAlias] =& $coll[$index]; |
|
| 276 | + $this->resultPointers[$dqlAlias] = & $coll[$index]; |
|
| 277 | 277 | |
| 278 | 278 | return; |
| 279 | 279 | } |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | end($coll); |
| 286 | - $this->resultPointers[$dqlAlias] =& $coll[key($coll)]; |
|
| 286 | + $this->resultPointers[$dqlAlias] = & $coll[key($coll)]; |
|
| 287 | 287 | |
| 288 | 288 | return; |
| 289 | 289 | } |
@@ -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\Mapping\Driver; |
| 6 | 6 | |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | return $this->classNames; |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | - if (!$this->paths) { |
|
| 189 | + if ( ! $this->paths) { |
|
| 190 | 190 | throw Mapping\MappingException::pathRequired(); |
| 191 | 191 | } |
| 192 | 192 | |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS), |
| 204 | 204 | \RecursiveIteratorIterator::LEAVES_ONLY |
| 205 | 205 | ), |
| 206 | - '/^.+' . preg_quote($this->fileExtension) . '$/i', |
|
| 206 | + '/^.+'.preg_quote($this->fileExtension).'$/i', |
|
| 207 | 207 | \RecursiveRegexIterator::GET_MATCH |
| 208 | 208 | ); |
| 209 | 209 | |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | { |
| 256 | 256 | $reflectionClass = $metadata->getReflectionClass(); |
| 257 | 257 | |
| 258 | - if (! $reflectionClass) { |
|
| 258 | + if ( ! $reflectionClass) { |
|
| 259 | 259 | // this happens when running annotation driver in combination with |
| 260 | 260 | // static reflection services. This is not the nicest fix |
| 261 | 261 | $reflectionClass = new \ReflectionClass($metadata->getClassName()); |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | $classMetadata |
| 292 | 292 | ); |
| 293 | 293 | |
| 294 | - if (! $property) { |
|
| 294 | + if ( ! $property) { |
|
| 295 | 295 | continue; |
| 296 | 296 | } |
| 297 | 297 | |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | ) |
| 370 | 370 | { |
| 371 | 371 | /** @var Annotation\Entity $entityAnnot */ |
| 372 | - $entityAnnot = $classAnnotations[Annotation\Entity::class]; |
|
| 372 | + $entityAnnot = $classAnnotations[Annotation\Entity::class]; |
|
| 373 | 373 | |
| 374 | 374 | if ($entityAnnot->repositoryClass !== null) { |
| 375 | 375 | $metadata->setCustomRepositoryClassName($entityAnnot->repositoryClass); |
@@ -621,11 +621,11 @@ discard block |
||
| 621 | 621 | $assocMetadata->setOrphanRemoval($oneToOneAnnot->orphanRemoval); |
| 622 | 622 | $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToOneAnnot->fetch)); |
| 623 | 623 | |
| 624 | - if (! empty($oneToOneAnnot->mappedBy)) { |
|
| 624 | + if ( ! empty($oneToOneAnnot->mappedBy)) { |
|
| 625 | 625 | $assocMetadata->setMappedBy($oneToOneAnnot->mappedBy); |
| 626 | 626 | } |
| 627 | 627 | |
| 628 | - if (! empty($oneToOneAnnot->inversedBy)) { |
|
| 628 | + if ( ! empty($oneToOneAnnot->inversedBy)) { |
|
| 629 | 629 | $assocMetadata->setInversedBy($oneToOneAnnot->inversedBy); |
| 630 | 630 | } |
| 631 | 631 | |
@@ -685,7 +685,7 @@ discard block |
||
| 685 | 685 | $assocMetadata->setCascade($this->getCascade($className, $fieldName, $manyToOneAnnot->cascade)); |
| 686 | 686 | $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToOneAnnot->fetch)); |
| 687 | 687 | |
| 688 | - if (! empty($manyToOneAnnot->inversedBy)) { |
|
| 688 | + if ( ! empty($manyToOneAnnot->inversedBy)) { |
|
| 689 | 689 | $assocMetadata->setInversedBy($manyToOneAnnot->inversedBy); |
| 690 | 690 | } |
| 691 | 691 | |
@@ -748,11 +748,11 @@ discard block |
||
| 748 | 748 | $assocMetadata->setOrphanRemoval($oneToManyAnnot->orphanRemoval); |
| 749 | 749 | $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToManyAnnot->fetch)); |
| 750 | 750 | |
| 751 | - if (! empty($oneToManyAnnot->mappedBy)) { |
|
| 751 | + if ( ! empty($oneToManyAnnot->mappedBy)) { |
|
| 752 | 752 | $assocMetadata->setMappedBy($oneToManyAnnot->mappedBy); |
| 753 | 753 | } |
| 754 | 754 | |
| 755 | - if (! empty($oneToManyAnnot->indexBy)) { |
|
| 755 | + if ( ! empty($oneToManyAnnot->indexBy)) { |
|
| 756 | 756 | $assocMetadata->setIndexedBy($oneToManyAnnot->indexBy); |
| 757 | 757 | } |
| 758 | 758 | |
@@ -799,15 +799,15 @@ discard block |
||
| 799 | 799 | $assocMetadata->setOrphanRemoval($manyToManyAnnot->orphanRemoval); |
| 800 | 800 | $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToManyAnnot->fetch)); |
| 801 | 801 | |
| 802 | - if (! empty($manyToManyAnnot->mappedBy)) { |
|
| 802 | + if ( ! empty($manyToManyAnnot->mappedBy)) { |
|
| 803 | 803 | $assocMetadata->setMappedBy($manyToManyAnnot->mappedBy); |
| 804 | 804 | } |
| 805 | 805 | |
| 806 | - if (! empty($manyToManyAnnot->inversedBy)) { |
|
| 806 | + if ( ! empty($manyToManyAnnot->inversedBy)) { |
|
| 807 | 807 | $assocMetadata->setInversedBy($manyToManyAnnot->inversedBy); |
| 808 | 808 | } |
| 809 | 809 | |
| 810 | - if (! empty($manyToManyAnnot->indexBy)) { |
|
| 810 | + if ( ! empty($manyToManyAnnot->indexBy)) { |
|
| 811 | 811 | $assocMetadata->setIndexedBy($manyToManyAnnot->indexBy); |
| 812 | 812 | } |
| 813 | 813 | |
@@ -858,15 +858,15 @@ discard block |
||
| 858 | 858 | |
| 859 | 859 | $fieldMetadata->setType(Type::getType($columnAnnot->type)); |
| 860 | 860 | |
| 861 | - if (! empty($columnAnnot->name)) { |
|
| 861 | + if ( ! empty($columnAnnot->name)) { |
|
| 862 | 862 | $fieldMetadata->setColumnName($columnAnnot->name); |
| 863 | 863 | } |
| 864 | 864 | |
| 865 | - if (! empty($columnAnnot->columnDefinition)) { |
|
| 865 | + if ( ! empty($columnAnnot->columnDefinition)) { |
|
| 866 | 866 | $fieldMetadata->setColumnDefinition($columnAnnot->columnDefinition); |
| 867 | 867 | } |
| 868 | 868 | |
| 869 | - if (! empty($columnAnnot->length)) { |
|
| 869 | + if ( ! empty($columnAnnot->length)) { |
|
| 870 | 870 | $fieldMetadata->setLength($columnAnnot->length); |
| 871 | 871 | } |
| 872 | 872 | |
@@ -895,11 +895,11 @@ discard block |
||
| 895 | 895 | Mapping\TableMetadata $tableMetadata |
| 896 | 896 | ) : void |
| 897 | 897 | { |
| 898 | - if (! empty($tableAnnot->name)) { |
|
| 898 | + if ( ! empty($tableAnnot->name)) { |
|
| 899 | 899 | $tableMetadata->setName($tableAnnot->name); |
| 900 | 900 | } |
| 901 | 901 | |
| 902 | - if (! empty($tableAnnot->schema)) { |
|
| 902 | + if ( ! empty($tableAnnot->schema)) { |
|
| 903 | 903 | $tableMetadata->setSchema($tableAnnot->schema); |
| 904 | 904 | } |
| 905 | 905 | |
@@ -940,11 +940,11 @@ discard block |
||
| 940 | 940 | { |
| 941 | 941 | $joinTable = new Mapping\JoinTableMetadata(); |
| 942 | 942 | |
| 943 | - if (! empty($joinTableAnnot->name)) { |
|
| 943 | + if ( ! empty($joinTableAnnot->name)) { |
|
| 944 | 944 | $joinTable->setName($joinTableAnnot->name); |
| 945 | 945 | } |
| 946 | 946 | |
| 947 | - if (! empty($joinTableAnnot->schema)) { |
|
| 947 | + if ( ! empty($joinTableAnnot->schema)) { |
|
| 948 | 948 | $joinTable->setSchema($joinTableAnnot->schema); |
| 949 | 949 | } |
| 950 | 950 | |
@@ -977,22 +977,22 @@ discard block |
||
| 977 | 977 | $joinColumn = new Mapping\JoinColumnMetadata(); |
| 978 | 978 | |
| 979 | 979 | // @todo Remove conditionals for name and referencedColumnName once naming strategy is brought into drivers |
| 980 | - if (! empty($joinColumnAnnot->name)) { |
|
| 980 | + if ( ! empty($joinColumnAnnot->name)) { |
|
| 981 | 981 | $joinColumn->setColumnName($joinColumnAnnot->name); |
| 982 | 982 | } |
| 983 | 983 | |
| 984 | - if (! empty($joinColumnAnnot->referencedColumnName)) { |
|
| 984 | + if ( ! empty($joinColumnAnnot->referencedColumnName)) { |
|
| 985 | 985 | $joinColumn->setReferencedColumnName($joinColumnAnnot->referencedColumnName); |
| 986 | 986 | } |
| 987 | 987 | |
| 988 | 988 | $joinColumn->setNullable($joinColumnAnnot->nullable); |
| 989 | 989 | $joinColumn->setUnique($joinColumnAnnot->unique); |
| 990 | 990 | |
| 991 | - if (! empty($joinColumnAnnot->fieldName)) { |
|
| 991 | + if ( ! empty($joinColumnAnnot->fieldName)) { |
|
| 992 | 992 | $joinColumn->setAliasedName($joinColumnAnnot->fieldName); |
| 993 | 993 | } |
| 994 | 994 | |
| 995 | - if (! empty($joinColumnAnnot->columnDefinition)) { |
|
| 995 | + if ( ! empty($joinColumnAnnot->columnDefinition)) { |
|
| 996 | 996 | $joinColumn->setColumnDefinition($joinColumnAnnot->columnDefinition); |
| 997 | 997 | } |
| 998 | 998 | |
@@ -1019,7 +1019,7 @@ discard block |
||
| 1019 | 1019 | ) : Mapping\CacheMetadata |
| 1020 | 1020 | { |
| 1021 | 1021 | $baseRegion = strtolower(str_replace('\\', '_', $metadata->getRootClassName())); |
| 1022 | - $defaultRegion = $baseRegion . ($fieldName ? '__' . $fieldName : ''); |
|
| 1022 | + $defaultRegion = $baseRegion.($fieldName ? '__'.$fieldName : ''); |
|
| 1023 | 1023 | |
| 1024 | 1024 | $usage = constant(sprintf('%s::%s', Mapping\CacheUsage::class, $cacheAnnot->usage)); |
| 1025 | 1025 | $region = $cacheAnnot->region ?: $defaultRegion; |
@@ -1082,7 +1082,7 @@ discard block |
||
| 1082 | 1082 | ) { |
| 1083 | 1083 | // Handle the case where a middle mapped super class inherits from a single table inheritance tree. |
| 1084 | 1084 | do { |
| 1085 | - if (! $parent->isMappedSuperclass) { |
|
| 1085 | + if ( ! $parent->isMappedSuperclass) { |
|
| 1086 | 1086 | $metadata->setTable($parent->table); |
| 1087 | 1087 | |
| 1088 | 1088 | break; |
@@ -1140,11 +1140,11 @@ discard block |
||
| 1140 | 1140 | $discriminatorColumn->setType(Type::getType($typeName)); |
| 1141 | 1141 | $discriminatorColumn->setColumnName($discriminatorColumnAnnotation->name); |
| 1142 | 1142 | |
| 1143 | - if (! empty($discriminatorColumnAnnotation->columnDefinition)) { |
|
| 1143 | + if ( ! empty($discriminatorColumnAnnotation->columnDefinition)) { |
|
| 1144 | 1144 | $discriminatorColumn->setColumnDefinition($discriminatorColumnAnnotation->columnDefinition); |
| 1145 | 1145 | } |
| 1146 | 1146 | |
| 1147 | - if (! empty($discriminatorColumnAnnotation->length)) { |
|
| 1147 | + if ( ! empty($discriminatorColumnAnnotation->length)) { |
|
| 1148 | 1148 | $discriminatorColumn->setLength($discriminatorColumnAnnotation->length); |
| 1149 | 1149 | } |
| 1150 | 1150 | } |
@@ -1180,12 +1180,12 @@ discard block |
||
| 1180 | 1180 | if (isset($classAnnotations[Annotation\NamedQueries::class])) { |
| 1181 | 1181 | $namedQueriesAnnot = $classAnnotations[Annotation\NamedQueries::class]; |
| 1182 | 1182 | |
| 1183 | - if (! is_array($namedQueriesAnnot->value)) { |
|
| 1183 | + if ( ! is_array($namedQueriesAnnot->value)) { |
|
| 1184 | 1184 | throw new \UnexpectedValueException("@NamedQueries should contain an array of @NamedQuery annotations."); |
| 1185 | 1185 | } |
| 1186 | 1186 | |
| 1187 | 1187 | foreach ($namedQueriesAnnot->value as $namedQuery) { |
| 1188 | - if (! ($namedQuery instanceof Annotation\NamedQuery)) { |
|
| 1188 | + if ( ! ($namedQuery instanceof Annotation\NamedQuery)) { |
|
| 1189 | 1189 | throw new \UnexpectedValueException("@NamedQueries should contain an array of @NamedQuery annotations."); |
| 1190 | 1190 | } |
| 1191 | 1191 | |
@@ -1281,7 +1281,7 @@ discard block |
||
| 1281 | 1281 | $entityListenersAnnot = $classAnnotations[Annotation\EntityListeners::class]; |
| 1282 | 1282 | |
| 1283 | 1283 | foreach ($entityListenersAnnot->value as $listenerClassName) { |
| 1284 | - if (! class_exists($listenerClassName)) { |
|
| 1284 | + if ( ! class_exists($listenerClassName)) { |
|
| 1285 | 1285 | throw Mapping\MappingException::entityListenerClassNotFound( |
| 1286 | 1286 | $listenerClassName, |
| 1287 | 1287 | $metadata->getClassName() |
@@ -1323,7 +1323,7 @@ discard block |
||
| 1323 | 1323 | $fieldName = $associationOverride->name; |
| 1324 | 1324 | $property = $metadata->getProperty($fieldName); |
| 1325 | 1325 | |
| 1326 | - if (! $property) { |
|
| 1326 | + if ( ! $property) { |
|
| 1327 | 1327 | throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName); |
| 1328 | 1328 | } |
| 1329 | 1329 | |
@@ -1357,7 +1357,7 @@ discard block |
||
| 1357 | 1357 | // Check for fetch |
| 1358 | 1358 | if ($associationOverride->fetch) { |
| 1359 | 1359 | $override->setFetchMode( |
| 1360 | - constant(Mapping\FetchMode::class . '::' . $associationOverride->fetch) |
|
| 1360 | + constant(Mapping\FetchMode::class.'::'.$associationOverride->fetch) |
|
| 1361 | 1361 | ); |
| 1362 | 1362 | } |
| 1363 | 1363 | |
@@ -1494,7 +1494,7 @@ discard block |
||
| 1494 | 1494 | $classAnnotations = $this->reader->getClassAnnotations($reflectionClass); |
| 1495 | 1495 | |
| 1496 | 1496 | foreach ($classAnnotations as $key => $annot) { |
| 1497 | - if (! is_numeric($key)) { |
|
| 1497 | + if ( ! is_numeric($key)) { |
|
| 1498 | 1498 | continue; |
| 1499 | 1499 | } |
| 1500 | 1500 | |
@@ -1514,7 +1514,7 @@ discard block |
||
| 1514 | 1514 | $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty); |
| 1515 | 1515 | |
| 1516 | 1516 | foreach ($propertyAnnotations as $key => $annot) { |
| 1517 | - if (! is_numeric($key)) { |
|
| 1517 | + if ( ! is_numeric($key)) { |
|
| 1518 | 1518 | continue; |
| 1519 | 1519 | } |
| 1520 | 1520 | |
@@ -1534,7 +1534,7 @@ discard block |
||
| 1534 | 1534 | $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod); |
| 1535 | 1535 | |
| 1536 | 1536 | foreach ($methodAnnotations as $key => $annot) { |
| 1537 | - if (! is_numeric($key)) { |
|
| 1537 | + if ( ! is_numeric($key)) { |
|
| 1538 | 1538 | continue; |
| 1539 | 1539 | } |
| 1540 | 1540 | |
@@ -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\Mapping; |
| 6 | 6 | |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | */ |
| 152 | 152 | public function getAllMetadata() : array |
| 153 | 153 | { |
| 154 | - if (! $this->initialized) { |
|
| 154 | + if ( ! $this->initialized) { |
|
| 155 | 155 | $this->initialize(); |
| 156 | 156 | } |
| 157 | 157 | |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | |
| 195 | 195 | try { |
| 196 | 196 | if ($this->cacheDriver) { |
| 197 | - $cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt); |
|
| 197 | + $cached = $this->cacheDriver->fetch($realClassName.$this->cacheSalt); |
|
| 198 | 198 | |
| 199 | 199 | if ($cached instanceof ClassMetadata) { |
| 200 | 200 | $this->loadedMetadata[$realClassName] = $cached; |
@@ -204,14 +204,14 @@ discard block |
||
| 204 | 204 | foreach ($this->loadMetadata($realClassName, $metadataBuildingContext) as $loadedClass) { |
| 205 | 205 | $loadedClassName = $loadedClass->getClassName(); |
| 206 | 206 | |
| 207 | - $this->cacheDriver->save($loadedClassName . $this->cacheSalt, $loadedClass, 0); |
|
| 207 | + $this->cacheDriver->save($loadedClassName.$this->cacheSalt, $loadedClass, 0); |
|
| 208 | 208 | } |
| 209 | 209 | } |
| 210 | 210 | } else { |
| 211 | 211 | $this->loadMetadata($realClassName, $metadataBuildingContext); |
| 212 | 212 | } |
| 213 | 213 | } catch (CommonMappingException $loadingException) { |
| 214 | - if (! $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName, $metadataBuildingContext)) { |
|
| 214 | + if ( ! $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName, $metadataBuildingContext)) { |
|
| 215 | 215 | throw $loadingException; |
| 216 | 216 | } |
| 217 | 217 | |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | $parentClasses = []; |
| 307 | 307 | |
| 308 | 308 | foreach (array_reverse($this->getReflectionService()->getParentClasses($name)) as $parentClass) { |
| 309 | - if (! $this->getDriver()->isTransient($parentClass)) { |
|
| 309 | + if ( ! $this->getDriver()->isTransient($parentClass)) { |
|
| 310 | 310 | $parentClasses[] = $parentClass; |
| 311 | 311 | } |
| 312 | 312 | } |
@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | |
| 4 | -declare(strict_types=1); |
|
| 4 | +declare(strict_types = 1); |
|
| 5 | 5 | |
| 6 | 6 | namespace Doctrine\ORM\Mapping; |
| 7 | 7 | |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | */ |
| 309 | 309 | public function __toString() |
| 310 | 310 | { |
| 311 | - return __CLASS__ . '@' . spl_object_id($this); |
|
| 311 | + return __CLASS__.'@'.spl_object_id($this); |
|
| 312 | 312 | } |
| 313 | 313 | |
| 314 | 314 | /** |
@@ -411,7 +411,7 @@ discard block |
||
| 411 | 411 | // Restore ReflectionClass and properties |
| 412 | 412 | $this->reflectionClass = $reflectionService->getClass($this->className); |
| 413 | 413 | |
| 414 | - if (! $this->reflectionClass) { |
|
| 414 | + if ( ! $this->reflectionClass) { |
|
| 415 | 415 | return; |
| 416 | 416 | } |
| 417 | 417 | |
@@ -437,11 +437,11 @@ discard block |
||
| 437 | 437 | } |
| 438 | 438 | |
| 439 | 439 | // Verify & complete identifier mapping |
| 440 | - if (! $this->identifier) { |
|
| 440 | + if ( ! $this->identifier) { |
|
| 441 | 441 | throw MappingException::identifierRequired($this->className); |
| 442 | 442 | } |
| 443 | 443 | |
| 444 | - $explicitlyGeneratedProperties = array_filter($this->declaredProperties, function (Property $property) : bool { |
|
| 444 | + $explicitlyGeneratedProperties = array_filter($this->declaredProperties, function(Property $property) : bool { |
|
| 445 | 445 | return $property instanceof FieldMetadata |
| 446 | 446 | && $property->isPrimaryKey() |
| 447 | 447 | && $property->hasValueGenerator(); |
@@ -462,14 +462,14 @@ discard block |
||
| 462 | 462 | public function validateAssociations() : void |
| 463 | 463 | { |
| 464 | 464 | array_map( |
| 465 | - function (Property $property) { |
|
| 466 | - if (! ($property instanceof AssociationMetadata)) { |
|
| 465 | + function(Property $property) { |
|
| 466 | + if ( ! ($property instanceof AssociationMetadata)) { |
|
| 467 | 467 | return; |
| 468 | 468 | } |
| 469 | 469 | |
| 470 | 470 | $targetEntity = $property->getTargetEntity(); |
| 471 | 471 | |
| 472 | - if (! class_exists($targetEntity)) { |
|
| 472 | + if ( ! class_exists($targetEntity)) { |
|
| 473 | 473 | throw MappingException::invalidTargetEntityClass($targetEntity, $this->className, $property->getName()); |
| 474 | 474 | } |
| 475 | 475 | }, |
@@ -491,7 +491,7 @@ discard block |
||
| 491 | 491 | foreach ($this->lifecycleCallbacks as $callbacks) { |
| 492 | 492 | /** @var array $callbacks */ |
| 493 | 493 | foreach ($callbacks as $callbackFuncName) { |
| 494 | - if (! $reflectionService->hasPublicMethod($this->className, $callbackFuncName)) { |
|
| 494 | + if ( ! $reflectionService->hasPublicMethod($this->className, $callbackFuncName)) { |
|
| 495 | 495 | throw MappingException::lifecycleCallbackMethodNotFound($this->className, $callbackFuncName); |
| 496 | 496 | } |
| 497 | 497 | } |
@@ -519,11 +519,11 @@ discard block |
||
| 519 | 519 | */ |
| 520 | 520 | public function isIdentifier(string $fieldName) : bool |
| 521 | 521 | { |
| 522 | - if (! $this->identifier) { |
|
| 522 | + if ( ! $this->identifier) { |
|
| 523 | 523 | return false; |
| 524 | 524 | } |
| 525 | 525 | |
| 526 | - if (! $this->isIdentifierComposite()) { |
|
| 526 | + if ( ! $this->isIdentifierComposite()) { |
|
| 527 | 527 | return $fieldName === $this->identifier[0]; |
| 528 | 528 | } |
| 529 | 529 | |
@@ -551,7 +551,7 @@ discard block |
||
| 551 | 551 | */ |
| 552 | 552 | public function getNamedQuery($queryName) : string |
| 553 | 553 | { |
| 554 | - if (! isset($this->namedQueries[$queryName])) { |
|
| 554 | + if ( ! isset($this->namedQueries[$queryName])) { |
|
| 555 | 555 | throw MappingException::queryNotFound($this->className, $queryName); |
| 556 | 556 | } |
| 557 | 557 | |
@@ -611,7 +611,7 @@ discard block |
||
| 611 | 611 | */ |
| 612 | 612 | public function getSqlResultSetMapping($name) |
| 613 | 613 | { |
| 614 | - if (! isset($this->sqlResultSetMappings[$name])) { |
|
| 614 | + if ( ! isset($this->sqlResultSetMappings[$name])) { |
|
| 615 | 615 | throw MappingException::resultMappingNotFound($this->className, $name); |
| 616 | 616 | } |
| 617 | 617 | |
@@ -646,7 +646,7 @@ discard block |
||
| 646 | 646 | $property->setColumnName($columnName); |
| 647 | 647 | } |
| 648 | 648 | |
| 649 | - if (! $this->isMappedSuperclass) { |
|
| 649 | + if ( ! $this->isMappedSuperclass) { |
|
| 650 | 650 | $property->setTableName($this->getTableName()); |
| 651 | 651 | } |
| 652 | 652 | |
@@ -666,7 +666,7 @@ discard block |
||
| 666 | 666 | throw MappingException::sqlConversionNotAllowedForPrimaryKeyProperties($this->className, $property); |
| 667 | 667 | } |
| 668 | 668 | |
| 669 | - if (! in_array($fieldName, $this->identifier)) { |
|
| 669 | + if ( ! in_array($fieldName, $this->identifier)) { |
|
| 670 | 670 | $this->identifier[] = $fieldName; |
| 671 | 671 | } |
| 672 | 672 | } |
@@ -720,7 +720,7 @@ discard block |
||
| 720 | 720 | $fieldName = $property->getName(); |
| 721 | 721 | $targetEntity = $property->getTargetEntity(); |
| 722 | 722 | |
| 723 | - if (! $targetEntity) { |
|
| 723 | + if ( ! $targetEntity) { |
|
| 724 | 724 | throw MappingException::missingTargetEntity($fieldName); |
| 725 | 725 | } |
| 726 | 726 | |
@@ -746,7 +746,7 @@ discard block |
||
| 746 | 746 | $this->identifier[] = $property->getName(); |
| 747 | 747 | } |
| 748 | 748 | |
| 749 | - if ($this->cache && !$property->getCache()) { |
|
| 749 | + if ($this->cache && ! $property->getCache()) { |
|
| 750 | 750 | throw CacheException::nonCacheableEntityAssociation($this->className, $fieldName); |
| 751 | 751 | } |
| 752 | 752 | |
@@ -800,7 +800,7 @@ discard block |
||
| 800 | 800 | /** @var JoinColumnMetadata $joinColumn */ |
| 801 | 801 | if ($property instanceof OneToOneAssociationMetadata && $this->inheritanceType !== InheritanceType::SINGLE_TABLE) { |
| 802 | 802 | if (1 === count($property->getJoinColumns())) { |
| 803 | - if (! $property->isPrimaryKey()) { |
|
| 803 | + if ( ! $property->isPrimaryKey()) { |
|
| 804 | 804 | $joinColumn->setUnique(true); |
| 805 | 805 | } |
| 806 | 806 | } else { |
@@ -808,13 +808,13 @@ discard block |
||
| 808 | 808 | } |
| 809 | 809 | } |
| 810 | 810 | |
| 811 | - $joinColumn->setTableName(! $this->isMappedSuperclass ? $this->getTableName() : null); |
|
| 811 | + $joinColumn->setTableName( ! $this->isMappedSuperclass ? $this->getTableName() : null); |
|
| 812 | 812 | |
| 813 | - if (! $joinColumn->getColumnName()) { |
|
| 813 | + if ( ! $joinColumn->getColumnName()) { |
|
| 814 | 814 | $joinColumn->setColumnName($this->namingStrategy->joinColumnName($fieldName, $this->className)); |
| 815 | 815 | } |
| 816 | 816 | |
| 817 | - if (! $joinColumn->getReferencedColumnName()) { |
|
| 817 | + if ( ! $joinColumn->getReferencedColumnName()) { |
|
| 818 | 818 | $joinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName()); |
| 819 | 819 | } |
| 820 | 820 | |
@@ -842,7 +842,7 @@ discard block |
||
| 842 | 842 | if ($property->isOrphanRemoval()) { |
| 843 | 843 | $cascades = $property->getCascade(); |
| 844 | 844 | |
| 845 | - if (! in_array('remove', $cascades)) { |
|
| 845 | + if ( ! in_array('remove', $cascades)) { |
|
| 846 | 846 | $cascades[] = 'remove'; |
| 847 | 847 | |
| 848 | 848 | $property->setCascade($cascades); |
@@ -908,14 +908,14 @@ discard block |
||
| 908 | 908 | $property->setOwningSide(false); |
| 909 | 909 | |
| 910 | 910 | // OneToMany MUST have mappedBy |
| 911 | - if (! $property->getMappedBy()) { |
|
| 911 | + if ( ! $property->getMappedBy()) { |
|
| 912 | 912 | throw MappingException::oneToManyRequiresMappedBy($property->getName()); |
| 913 | 913 | } |
| 914 | 914 | |
| 915 | 915 | if ($property->isOrphanRemoval()) { |
| 916 | 916 | $cascades = $property->getCascade(); |
| 917 | 917 | |
| 918 | - if (! in_array('remove', $cascades)) { |
|
| 918 | + if ( ! in_array('remove', $cascades)) { |
|
| 919 | 919 | $cascades[] = 'remove'; |
| 920 | 920 | |
| 921 | 921 | $property->setCascade($cascades); |
@@ -938,7 +938,7 @@ discard block |
||
| 938 | 938 | |
| 939 | 939 | $property->setJoinTable($joinTable); |
| 940 | 940 | |
| 941 | - if (! $joinTable->getName()) { |
|
| 941 | + if ( ! $joinTable->getName()) { |
|
| 942 | 942 | $joinTableName = $this->namingStrategy->joinTableName( |
| 943 | 943 | $property->getSourceEntity(), |
| 944 | 944 | $property->getTargetEntity(), |
@@ -950,7 +950,7 @@ discard block |
||
| 950 | 950 | |
| 951 | 951 | $selfReferencingEntityWithoutJoinColumns = $property->getSourceEntity() == $property->getTargetEntity() && ! $joinTable->hasColumns(); |
| 952 | 952 | |
| 953 | - if (! $joinTable->getJoinColumns()) { |
|
| 953 | + if ( ! $joinTable->getJoinColumns()) { |
|
| 954 | 954 | $referencedColumnName = $this->namingStrategy->referenceColumnName(); |
| 955 | 955 | $sourceReferenceName = $selfReferencingEntityWithoutJoinColumns ? 'source' : $referencedColumnName; |
| 956 | 956 | $columnName = $this->namingStrategy->joinKeyColumnName($property->getSourceEntity(), $sourceReferenceName); |
@@ -963,7 +963,7 @@ discard block |
||
| 963 | 963 | $joinTable->addJoinColumn($joinColumn); |
| 964 | 964 | } |
| 965 | 965 | |
| 966 | - if (! $joinTable->getInverseJoinColumns()) { |
|
| 966 | + if ( ! $joinTable->getInverseJoinColumns()) { |
|
| 967 | 967 | $referencedColumnName = $this->namingStrategy->referenceColumnName(); |
| 968 | 968 | $targetReferenceName = $selfReferencingEntityWithoutJoinColumns ? 'target' : $referencedColumnName; |
| 969 | 969 | $columnName = $this->namingStrategy->joinKeyColumnName($property->getTargetEntity(), $targetReferenceName); |
@@ -978,13 +978,13 @@ discard block |
||
| 978 | 978 | |
| 979 | 979 | foreach ($joinTable->getJoinColumns() as $joinColumn) { |
| 980 | 980 | /** @var JoinColumnMetadata $joinColumn */ |
| 981 | - if (! $joinColumn->getReferencedColumnName()) { |
|
| 981 | + if ( ! $joinColumn->getReferencedColumnName()) { |
|
| 982 | 982 | $joinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName()); |
| 983 | 983 | } |
| 984 | 984 | |
| 985 | 985 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 986 | 986 | |
| 987 | - if (! $joinColumn->getColumnName()) { |
|
| 987 | + if ( ! $joinColumn->getColumnName()) { |
|
| 988 | 988 | $columnName = $this->namingStrategy->joinKeyColumnName( |
| 989 | 989 | $property->getSourceEntity(), |
| 990 | 990 | $referencedColumnName |
@@ -996,13 +996,13 @@ discard block |
||
| 996 | 996 | |
| 997 | 997 | foreach ($joinTable->getInverseJoinColumns() as $inverseJoinColumn) { |
| 998 | 998 | /** @var JoinColumnMetadata $inverseJoinColumn */ |
| 999 | - if (! $inverseJoinColumn->getReferencedColumnName()) { |
|
| 999 | + if ( ! $inverseJoinColumn->getReferencedColumnName()) { |
|
| 1000 | 1000 | $inverseJoinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName()); |
| 1001 | 1001 | } |
| 1002 | 1002 | |
| 1003 | 1003 | $referencedColumnName = $inverseJoinColumn->getReferencedColumnName(); |
| 1004 | 1004 | |
| 1005 | - if (! $inverseJoinColumn->getColumnName()) { |
|
| 1005 | + if ( ! $inverseJoinColumn->getColumnName()) { |
|
| 1006 | 1006 | $columnName = $this->namingStrategy->joinKeyColumnName( |
| 1007 | 1007 | $property->getTargetEntity(), |
| 1008 | 1008 | $referencedColumnName |
@@ -1099,7 +1099,7 @@ discard block |
||
| 1099 | 1099 | // Association defined as Id field |
| 1100 | 1100 | $targetClass = $em->getClassMetadata($property->getTargetEntity()); |
| 1101 | 1101 | |
| 1102 | - if (! $property->isOwningSide()) { |
|
| 1102 | + if ( ! $property->isOwningSide()) { |
|
| 1103 | 1103 | $property = $targetClass->getProperty($property->getMappedBy()); |
| 1104 | 1104 | $targetClass = $em->getClassMetadata($property->getTargetEntity()); |
| 1105 | 1105 | } |
@@ -1114,7 +1114,7 @@ discard block |
||
| 1114 | 1114 | $columnName = $joinColumn->getColumnName(); |
| 1115 | 1115 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 1116 | 1116 | |
| 1117 | - if (! $joinColumn->getType()) { |
|
| 1117 | + if ( ! $joinColumn->getType()) { |
|
| 1118 | 1118 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $em)); |
| 1119 | 1119 | } |
| 1120 | 1120 | |
@@ -1154,11 +1154,11 @@ discard block |
||
| 1154 | 1154 | { |
| 1155 | 1155 | $schema = null === $this->getSchemaName() |
| 1156 | 1156 | ? '' |
| 1157 | - : $this->getSchemaName() . '_' |
|
| 1157 | + : $this->getSchemaName().'_' |
|
| 1158 | 1158 | ; |
| 1159 | 1159 | |
| 1160 | 1160 | // replace dots with underscores because PostgreSQL creates temporary tables in a special schema |
| 1161 | - return $schema . $this->getTableName() . '_id_tmp'; |
|
| 1161 | + return $schema.$this->getTableName().'_id_tmp'; |
|
| 1162 | 1162 | } |
| 1163 | 1163 | |
| 1164 | 1164 | /** |
@@ -1218,7 +1218,7 @@ discard block |
||
| 1218 | 1218 | { |
| 1219 | 1219 | $fieldName = $property->getName(); |
| 1220 | 1220 | |
| 1221 | - if (! isset($this->declaredProperties[$fieldName])) { |
|
| 1221 | + if ( ! isset($this->declaredProperties[$fieldName])) { |
|
| 1222 | 1222 | throw MappingException::invalidOverrideFieldName($this->className, $fieldName); |
| 1223 | 1223 | } |
| 1224 | 1224 | |
@@ -1427,7 +1427,7 @@ discard block |
||
| 1427 | 1427 | $declaringClass = $property->getDeclaringClass(); |
| 1428 | 1428 | |
| 1429 | 1429 | if ($inheritedProperty instanceof FieldMetadata) { |
| 1430 | - if (! $declaringClass->isMappedSuperclass) { |
|
| 1430 | + if ( ! $declaringClass->isMappedSuperclass) { |
|
| 1431 | 1431 | $inheritedProperty->setTableName($property->getTableName()); |
| 1432 | 1432 | } |
| 1433 | 1433 | |
@@ -1495,7 +1495,7 @@ discard block |
||
| 1495 | 1495 | throw MappingException::duplicateQueryMapping($this->className, $name); |
| 1496 | 1496 | } |
| 1497 | 1497 | |
| 1498 | - if (! isset($queryMapping['resultClass']) && ! isset($queryMapping['resultSetMapping'])) { |
|
| 1498 | + if ( ! isset($queryMapping['resultClass']) && ! isset($queryMapping['resultSetMapping'])) { |
|
| 1499 | 1499 | throw MappingException::missingQueryMapping($this->className, $name); |
| 1500 | 1500 | } |
| 1501 | 1501 | |
@@ -1514,7 +1514,7 @@ discard block |
||
| 1514 | 1514 | */ |
| 1515 | 1515 | public function addSqlResultSetMapping(array $resultMapping) |
| 1516 | 1516 | { |
| 1517 | - if (!isset($resultMapping['name'])) { |
|
| 1517 | + if ( ! isset($resultMapping['name'])) { |
|
| 1518 | 1518 | throw MappingException::nameIsMandatoryForSqlResultSetMapping($this->className); |
| 1519 | 1519 | } |
| 1520 | 1520 | |
@@ -1524,7 +1524,7 @@ discard block |
||
| 1524 | 1524 | |
| 1525 | 1525 | if (isset($resultMapping['entities'])) { |
| 1526 | 1526 | foreach ($resultMapping['entities'] as $key => $entityResult) { |
| 1527 | - if (! isset($entityResult['entityClass'])) { |
|
| 1527 | + if ( ! isset($entityResult['entityClass'])) { |
|
| 1528 | 1528 | throw MappingException::missingResultSetMappingEntity($this->className, $resultMapping['name']); |
| 1529 | 1529 | } |
| 1530 | 1530 | |
@@ -1533,11 +1533,11 @@ discard block |
||
| 1533 | 1533 | |
| 1534 | 1534 | if (isset($entityResult['fields'])) { |
| 1535 | 1535 | foreach ($entityResult['fields'] as $k => $field) { |
| 1536 | - if (! isset($field['name'])) { |
|
| 1536 | + if ( ! isset($field['name'])) { |
|
| 1537 | 1537 | throw MappingException::missingResultSetMappingFieldName($this->className, $resultMapping['name']); |
| 1538 | 1538 | } |
| 1539 | 1539 | |
| 1540 | - if (! isset($field['column'])) { |
|
| 1540 | + if ( ! isset($field['column'])) { |
|
| 1541 | 1541 | $fieldName = $field['name']; |
| 1542 | 1542 | |
| 1543 | 1543 | if (strpos($fieldName, '.')) { |
@@ -1646,11 +1646,11 @@ discard block |
||
| 1646 | 1646 | 'method' => $method, |
| 1647 | 1647 | ]; |
| 1648 | 1648 | |
| 1649 | - if (! class_exists($class)) { |
|
| 1649 | + if ( ! class_exists($class)) { |
|
| 1650 | 1650 | throw MappingException::entityListenerClassNotFound($class, $this->className); |
| 1651 | 1651 | } |
| 1652 | 1652 | |
| 1653 | - if (! method_exists($class, $method)) { |
|
| 1653 | + if ( ! method_exists($class, $method)) { |
|
| 1654 | 1654 | throw MappingException::entityListenerMethodNotFound($class, $method, $this->className); |
| 1655 | 1655 | } |
| 1656 | 1656 | |
@@ -1726,7 +1726,7 @@ discard block |
||
| 1726 | 1726 | return; |
| 1727 | 1727 | } |
| 1728 | 1728 | |
| 1729 | - if (! (class_exists($className) || interface_exists($className))) { |
|
| 1729 | + if ( ! (class_exists($className) || interface_exists($className))) { |
|
| 1730 | 1730 | throw MappingException::invalidClassInDiscriminatorMap($className, $this->className); |
| 1731 | 1731 | } |
| 1732 | 1732 | |
@@ -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 | |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | foreach ($data as $columnName => $value) { |
| 113 | - if (!is_array($id) || !isset($id[$columnName])) { |
|
| 113 | + if ( ! is_array($id) || ! isset($id[$columnName])) { |
|
| 114 | 114 | $type = $this->columns[$columnName]->getType(); |
| 115 | 115 | |
| 116 | 116 | $stmt->bindValue($paramIndex++, $value, $type); |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | |
| 236 | 236 | if ($filterSql = $this->generateFilterConditionSQL($rootClass, $tableAlias)) { |
| 237 | 237 | $conditionSql .= $conditionSql |
| 238 | - ? ' AND ' . $filterSql |
|
| 238 | + ? ' AND '.$filterSql |
|
| 239 | 239 | : $filterSql; |
| 240 | 240 | } |
| 241 | 241 | |
@@ -243,26 +243,26 @@ discard block |
||
| 243 | 243 | |
| 244 | 244 | switch ($lockMode) { |
| 245 | 245 | case LockMode::PESSIMISTIC_READ: |
| 246 | - $lockSql = ' ' . $this->platform->getReadLockSQL(); |
|
| 246 | + $lockSql = ' '.$this->platform->getReadLockSQL(); |
|
| 247 | 247 | break; |
| 248 | 248 | |
| 249 | 249 | case LockMode::PESSIMISTIC_WRITE: |
| 250 | - $lockSql = ' ' . $this->platform->getWriteLockSQL(); |
|
| 250 | + $lockSql = ' '.$this->platform->getWriteLockSQL(); |
|
| 251 | 251 | break; |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | 254 | $tableName = $this->class->table->getQuotedQualifiedName($this->platform); |
| 255 | - $from = ' FROM ' . $tableName . ' ' . $baseTableAlias; |
|
| 256 | - $where = $conditionSql !== '' ? ' WHERE ' . $conditionSql : ''; |
|
| 255 | + $from = ' FROM '.$tableName.' '.$baseTableAlias; |
|
| 256 | + $where = $conditionSql !== '' ? ' WHERE '.$conditionSql : ''; |
|
| 257 | 257 | $lock = $this->platform->appendLockHint($from, $lockMode); |
| 258 | 258 | $columnList = $this->getSelectColumnsSQL(); |
| 259 | - $query = 'SELECT ' . $columnList |
|
| 259 | + $query = 'SELECT '.$columnList |
|
| 260 | 260 | . $lock |
| 261 | 261 | . $joinSql |
| 262 | 262 | . $where |
| 263 | 263 | . $orderBySql; |
| 264 | 264 | |
| 265 | - return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql; |
|
| 265 | + return $this->platform->modifyLimitQuery($query, $limit, $offset).$lockSql; |
|
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | /** |
@@ -284,14 +284,14 @@ discard block |
||
| 284 | 284 | |
| 285 | 285 | if ('' !== $filterSql) { |
| 286 | 286 | $conditionSql = $conditionSql |
| 287 | - ? $conditionSql . ' AND ' . $filterSql |
|
| 287 | + ? $conditionSql.' AND '.$filterSql |
|
| 288 | 288 | : $filterSql; |
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | $sql = 'SELECT COUNT(*) ' |
| 292 | - . 'FROM ' . $tableName . ' ' . $baseTableAlias |
|
| 292 | + . 'FROM '.$tableName.' '.$baseTableAlias |
|
| 293 | 293 | . $joinSql |
| 294 | - . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql); |
|
| 294 | + . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql); |
|
| 295 | 295 | |
| 296 | 296 | return $sql; |
| 297 | 297 | } |
@@ -313,18 +313,18 @@ discard block |
||
| 313 | 313 | /** @var ClassMetadata $parentClass */ |
| 314 | 314 | $tableName = $parentClass->table->getQuotedQualifiedName($this->platform); |
| 315 | 315 | $tableAlias = $this->getSQLTableAlias($parentClass->getTableName()); |
| 316 | - $joinSql .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
| 316 | + $joinSql .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
| 317 | 317 | |
| 318 | 318 | foreach ($identifierColumns as $idColumn) { |
| 319 | 319 | $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName()); |
| 320 | 320 | |
| 321 | - $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
| 321 | + $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
| 322 | 322 | } |
| 323 | 323 | |
| 324 | 324 | $joinSql .= implode(' AND ', $conditions); |
| 325 | 325 | } |
| 326 | 326 | |
| 327 | - return parent::getLockTablesSql($lockMode) . $joinSql; |
|
| 327 | + return parent::getLockTablesSql($lockMode).$joinSql; |
|
| 328 | 328 | } |
| 329 | 329 | |
| 330 | 330 | /** |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | continue; |
| 352 | 352 | } |
| 353 | 353 | |
| 354 | - if (! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) { |
|
| 354 | + if ( ! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) { |
|
| 355 | 355 | continue; |
| 356 | 356 | } |
| 357 | 357 | |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | /** @var JoinColumnMetadata $joinColumn */ |
| 362 | 362 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 363 | 363 | |
| 364 | - if (! $joinColumn->getType()) { |
|
| 364 | + if ( ! $joinColumn->getType()) { |
|
| 365 | 365 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
| 366 | 366 | } |
| 367 | 367 | |
@@ -380,7 +380,7 @@ discard block |
||
| 380 | 380 | $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName); |
| 381 | 381 | $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumnName, false, $discrColumnType); |
| 382 | 382 | |
| 383 | - $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias . '.' . $quotedColumnName, $this->platform); |
|
| 383 | + $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias.'.'.$quotedColumnName, $this->platform); |
|
| 384 | 384 | |
| 385 | 385 | // sub tables |
| 386 | 386 | foreach ($this->class->getSubClasses() as $subClassName) { |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | /** @var JoinColumnMetadata $joinColumn */ |
| 405 | 405 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 406 | 406 | |
| 407 | - if (! $joinColumn->getType()) { |
|
| 407 | + if ( ! $joinColumn->getType()) { |
|
| 408 | 408 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
| 409 | 409 | } |
| 410 | 410 | |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | $columnName = $joinColumn->getColumnName(); |
| 455 | 455 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 456 | 456 | |
| 457 | - if (! $joinColumn->getType()) { |
|
| 457 | + if ( ! $joinColumn->getType()) { |
|
| 458 | 458 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
| 459 | 459 | } |
| 460 | 460 | |
@@ -512,12 +512,12 @@ discard block |
||
| 512 | 512 | /** @var ClassMetadata $parentClass */ |
| 513 | 513 | $tableName = $parentClass->table->getQuotedQualifiedName($this->platform); |
| 514 | 514 | $tableAlias = $this->getSQLTableAlias($parentClass->getTableName()); |
| 515 | - $joinSql .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
| 515 | + $joinSql .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
| 516 | 516 | |
| 517 | 517 | foreach ($identifierColumns as $idColumn) { |
| 518 | 518 | $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName()); |
| 519 | 519 | |
| 520 | - $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
| 520 | + $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
| 521 | 521 | } |
| 522 | 522 | |
| 523 | 523 | $joinSql .= implode(' AND ', $conditions); |
@@ -529,12 +529,12 @@ discard block |
||
| 529 | 529 | $subClass = $this->em->getClassMetadata($subClassName); |
| 530 | 530 | $tableName = $subClass->table->getQuotedQualifiedName($this->platform); |
| 531 | 531 | $tableAlias = $this->getSQLTableAlias($subClass->getTableName()); |
| 532 | - $joinSql .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
| 532 | + $joinSql .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
| 533 | 533 | |
| 534 | 534 | foreach ($identifierColumns as $idColumn) { |
| 535 | 535 | $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName()); |
| 536 | 536 | |
| 537 | - $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
| 537 | + $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
| 538 | 538 | } |
| 539 | 539 | |
| 540 | 540 | $joinSql .= implode(' AND ', $conditions); |