@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | |
340 | 340 | $this->computeChangeSets(); |
341 | 341 | |
342 | - if (! ($this->entityInsertions || |
|
342 | + if ( ! ($this->entityInsertions || |
|
343 | 343 | $this->entityDeletions || |
344 | 344 | $this->entityUpdates || |
345 | 345 | $this->collectionUpdates || |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | // Entity deletions come last and need to be in reverse commit order |
401 | 401 | if ($this->entityDeletions) { |
402 | 402 | foreach (array_reverse($commitOrder) as $committedEntityName) { |
403 | - if (! $this->entityDeletions) { |
|
403 | + if ( ! $this->entityDeletions) { |
|
404 | 404 | break; // just a performance optimisation |
405 | 405 | } |
406 | 406 | |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | $oid = spl_object_id($entity); |
485 | 485 | $data = []; |
486 | 486 | |
487 | - if (! isset($this->entityChangeSets[$oid])) { |
|
487 | + if ( ! isset($this->entityChangeSets[$oid])) { |
|
488 | 488 | return $data; |
489 | 489 | } |
490 | 490 | |
@@ -564,12 +564,12 @@ discard block |
||
564 | 564 | || ! $class->getProperty($name) instanceof FieldMetadata |
565 | 565 | || ! $class->getProperty($name)->hasValueGenerator() |
566 | 566 | || $class->getProperty($name)->getValueGenerator()->getType() !== GeneratorType::IDENTITY |
567 | - ) && (! $class->isVersioned() || $name !== $class->versionProperty->getName())) { |
|
567 | + ) && ( ! $class->isVersioned() || $name !== $class->versionProperty->getName())) { |
|
568 | 568 | $actualData[$name] = $value; |
569 | 569 | } |
570 | 570 | } |
571 | 571 | |
572 | - if (! isset($this->originalEntityData[$oid])) { |
|
572 | + if ( ! isset($this->originalEntityData[$oid])) { |
|
573 | 573 | // Entity is either NEW or MANAGED but not yet fully persisted (only has an id). |
574 | 574 | // These result in an INSERT. |
575 | 575 | $this->originalEntityData[$oid] = $actualData; |
@@ -596,7 +596,7 @@ discard block |
||
596 | 596 | |
597 | 597 | foreach ($actualData as $propName => $actualValue) { |
598 | 598 | // skip field, its a partially omitted one! |
599 | - if (! (isset($originalData[$propName]) || array_key_exists($propName, $originalData))) { |
|
599 | + if ( ! (isset($originalData[$propName]) || array_key_exists($propName, $originalData))) { |
|
600 | 600 | continue; |
601 | 601 | } |
602 | 602 | |
@@ -618,7 +618,7 @@ discard block |
||
618 | 618 | if ($owner === null) { // cloned |
619 | 619 | $actualValue->setOwner($entity, $property); |
620 | 620 | } elseif ($owner !== $entity) { // no clone, we have to fix |
621 | - if (! $actualValue->isInitialized()) { |
|
621 | + if ( ! $actualValue->isInitialized()) { |
|
622 | 622 | $actualValue->initialize(); // we have to do this otherwise the cols share state |
623 | 623 | } |
624 | 624 | |
@@ -656,7 +656,7 @@ discard block |
||
656 | 656 | // Check if original value exists |
657 | 657 | if ($orgValue instanceof PersistentCollection) { |
658 | 658 | // A PersistentCollection was de-referenced, so delete it. |
659 | - if (! $this->isCollectionScheduledForDeletion($orgValue)) { |
|
659 | + if ( ! $this->isCollectionScheduledForDeletion($orgValue)) { |
|
660 | 660 | $this->scheduleCollectionDeletion($orgValue); |
661 | 661 | |
662 | 662 | $changeSet[$propName] = $orgValue; // Signal changeset, to-many associations will be ignored |
@@ -679,7 +679,7 @@ discard block |
||
679 | 679 | |
680 | 680 | // Look for changes in associations of the entity |
681 | 681 | foreach ($class->getPropertiesIterator() as $property) { |
682 | - if (! $property instanceof AssociationMetadata) { |
|
682 | + if ( ! $property instanceof AssociationMetadata) { |
|
683 | 683 | continue; |
684 | 684 | } |
685 | 685 | |
@@ -746,7 +746,7 @@ discard block |
||
746 | 746 | // Only MANAGED entities that are NOT SCHEDULED FOR INSERTION OR DELETION are processed here. |
747 | 747 | $oid = spl_object_id($entity); |
748 | 748 | |
749 | - if (! isset($this->entityInsertions[$oid]) && ! isset($this->entityDeletions[$oid]) && isset($this->entityStates[$oid])) { |
|
749 | + if ( ! isset($this->entityInsertions[$oid]) && ! isset($this->entityDeletions[$oid]) && isset($this->entityStates[$oid])) { |
|
750 | 750 | $this->computeChangeSet($class, $entity); |
751 | 751 | } |
752 | 752 | } |
@@ -783,13 +783,13 @@ discard block |
||
783 | 783 | $targetClass = $this->em->getClassMetadata($targetEntity); |
784 | 784 | |
785 | 785 | foreach ($unwrappedValue as $key => $entry) { |
786 | - if (! ($entry instanceof $targetEntity)) { |
|
786 | + if ( ! ($entry instanceof $targetEntity)) { |
|
787 | 787 | throw ORMInvalidArgumentException::invalidAssociation($targetClass, $association, $entry); |
788 | 788 | } |
789 | 789 | |
790 | 790 | $state = $this->getEntityState($entry, self::STATE_NEW); |
791 | 791 | |
792 | - if (! ($entry instanceof $targetEntity)) { |
|
792 | + if ( ! ($entry instanceof $targetEntity)) { |
|
793 | 793 | throw UnexpectedAssociationValue::create( |
794 | 794 | $association->getSourceEntity(), |
795 | 795 | $association->getName(), |
@@ -800,7 +800,7 @@ discard block |
||
800 | 800 | |
801 | 801 | switch ($state) { |
802 | 802 | case self::STATE_NEW: |
803 | - if (! in_array('persist', $association->getCascade(), true)) { |
|
803 | + if ( ! in_array('persist', $association->getCascade(), true)) { |
|
804 | 804 | $this->nonCascadedNewDetectedEntities[spl_object_id($entry)] = [$association, $entry]; |
805 | 805 | |
806 | 806 | break; |
@@ -849,12 +849,12 @@ discard block |
||
849 | 849 | $persister = $this->getEntityPersister($class->getClassName()); |
850 | 850 | $generationPlan->executeImmediate($this->em, $entity); |
851 | 851 | |
852 | - if (! $generationPlan->containsDeferred()) { |
|
852 | + if ( ! $generationPlan->containsDeferred()) { |
|
853 | 853 | $id = $this->em->getIdentifierFlattener()->flattenIdentifier($class, $persister->getIdentifier($entity)); |
854 | 854 | |
855 | 855 | // Some identifiers may be foreign keys to new entities. |
856 | 856 | // In this case, we don't have the value yet and should treat it as if we have a post-insert generator |
857 | - if (! $this->hasMissingIdsWhichAreForeignKeys($class, $id)) { |
|
857 | + if ( ! $this->hasMissingIdsWhichAreForeignKeys($class, $id)) { |
|
858 | 858 | $this->entityIdentifiers[$oid] = $id; |
859 | 859 | } |
860 | 860 | } |
@@ -899,7 +899,7 @@ discard block |
||
899 | 899 | { |
900 | 900 | $oid = spl_object_id($entity); |
901 | 901 | |
902 | - if (! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) { |
|
902 | + if ( ! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) { |
|
903 | 903 | throw ORMInvalidArgumentException::entityNotManaged($entity); |
904 | 904 | } |
905 | 905 | |
@@ -922,7 +922,7 @@ discard block |
||
922 | 922 | break; |
923 | 923 | } |
924 | 924 | |
925 | - if (! $property->isPrimaryKey() |
|
925 | + if ( ! $property->isPrimaryKey() |
|
926 | 926 | || ! $property->getValueGenerator() |
927 | 927 | || $property->getValueGenerator()->getType() !== GeneratorType::IDENTITY) { |
928 | 928 | $actualData[$name] = $property->getValue($entity); |
@@ -936,7 +936,7 @@ discard block |
||
936 | 936 | } |
937 | 937 | } |
938 | 938 | |
939 | - if (! isset($this->originalEntityData[$oid])) { |
|
939 | + if ( ! isset($this->originalEntityData[$oid])) { |
|
940 | 940 | throw new RuntimeException('Cannot call recomputeSingleEntityChangeSet before computeChangeSet on an entity.'); |
941 | 941 | } |
942 | 942 | |
@@ -954,7 +954,7 @@ discard block |
||
954 | 954 | if ($changeSet) { |
955 | 955 | if (isset($this->entityChangeSets[$oid])) { |
956 | 956 | $this->entityChangeSets[$oid] = array_merge($this->entityChangeSets[$oid], $changeSet); |
957 | - } elseif (! isset($this->entityInsertions[$oid])) { |
|
957 | + } elseif ( ! isset($this->entityInsertions[$oid])) { |
|
958 | 958 | $this->entityChangeSets[$oid] = $changeSet; |
959 | 959 | $this->entityUpdates[$oid] = $entity; |
960 | 960 | } |
@@ -1024,7 +1024,7 @@ discard block |
||
1024 | 1024 | $this->recomputeSingleEntityChangeSet($class, $entity); |
1025 | 1025 | } |
1026 | 1026 | |
1027 | - if (! empty($this->entityChangeSets[$oid])) { |
|
1027 | + if ( ! empty($this->entityChangeSets[$oid])) { |
|
1028 | 1028 | $persister->update($entity); |
1029 | 1029 | } |
1030 | 1030 | |
@@ -1063,7 +1063,7 @@ discard block |
||
1063 | 1063 | |
1064 | 1064 | // Entity with this $oid after deletion treated as NEW, even if the $oid |
1065 | 1065 | // is obtained by a new entity because the old one went out of scope. |
1066 | - if (! $class->isIdentifierComposite()) { |
|
1066 | + if ( ! $class->isIdentifierComposite()) { |
|
1067 | 1067 | $property = $class->getProperty($class->getSingleIdentifierFieldName()); |
1068 | 1068 | |
1069 | 1069 | if ($property instanceof FieldMetadata && $property->hasValueGenerator()) { |
@@ -1110,13 +1110,13 @@ discard block |
||
1110 | 1110 | // Calculate dependencies for new nodes |
1111 | 1111 | while ($class = array_pop($newNodes)) { |
1112 | 1112 | foreach ($class->getPropertiesIterator() as $property) { |
1113 | - if (! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) { |
|
1113 | + if ( ! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) { |
|
1114 | 1114 | continue; |
1115 | 1115 | } |
1116 | 1116 | |
1117 | 1117 | $targetClass = $this->em->getClassMetadata($property->getTargetEntity()); |
1118 | 1118 | |
1119 | - if (! $calc->hasNode($targetClass->getClassName())) { |
|
1119 | + if ( ! $calc->hasNode($targetClass->getClassName())) { |
|
1120 | 1120 | $calc->addNode($targetClass->getClassName(), $targetClass); |
1121 | 1121 | |
1122 | 1122 | $newNodes[] = $targetClass; |
@@ -1124,7 +1124,7 @@ discard block |
||
1124 | 1124 | |
1125 | 1125 | $weight = ! array_filter( |
1126 | 1126 | $property->getJoinColumns(), |
1127 | - static function (JoinColumnMetadata $joinColumn) { |
|
1127 | + static function(JoinColumnMetadata $joinColumn) { |
|
1128 | 1128 | return $joinColumn->isNullable(); |
1129 | 1129 | } |
1130 | 1130 | ); |
@@ -1132,14 +1132,14 @@ discard block |
||
1132 | 1132 | $calc->addDependency($targetClass->getClassName(), $class->getClassName(), $weight); |
1133 | 1133 | |
1134 | 1134 | // If the target class has mapped subclasses, these share the same dependency. |
1135 | - if (! $targetClass->getSubClasses()) { |
|
1135 | + if ( ! $targetClass->getSubClasses()) { |
|
1136 | 1136 | continue; |
1137 | 1137 | } |
1138 | 1138 | |
1139 | 1139 | foreach ($targetClass->getSubClasses() as $subClassName) { |
1140 | 1140 | $targetSubClass = $this->em->getClassMetadata($subClassName); |
1141 | 1141 | |
1142 | - if (! $calc->hasNode($subClassName)) { |
|
1142 | + if ( ! $calc->hasNode($subClassName)) { |
|
1143 | 1143 | $calc->addNode($targetSubClass->getClassName(), $targetSubClass); |
1144 | 1144 | |
1145 | 1145 | $newNodes[] = $targetSubClass; |
@@ -1215,7 +1215,7 @@ discard block |
||
1215 | 1215 | { |
1216 | 1216 | $oid = spl_object_id($entity); |
1217 | 1217 | |
1218 | - if (! isset($this->entityIdentifiers[$oid])) { |
|
1218 | + if ( ! isset($this->entityIdentifiers[$oid])) { |
|
1219 | 1219 | throw ORMInvalidArgumentException::entityHasNoIdentity($entity, 'scheduling for update'); |
1220 | 1220 | } |
1221 | 1221 | |
@@ -1223,7 +1223,7 @@ discard block |
||
1223 | 1223 | throw ORMInvalidArgumentException::entityIsRemoved($entity, 'schedule for update'); |
1224 | 1224 | } |
1225 | 1225 | |
1226 | - if (! isset($this->entityUpdates[$oid]) && ! isset($this->entityInsertions[$oid])) { |
|
1226 | + if ( ! isset($this->entityUpdates[$oid]) && ! isset($this->entityInsertions[$oid])) { |
|
1227 | 1227 | $this->entityUpdates[$oid] = $entity; |
1228 | 1228 | } |
1229 | 1229 | } |
@@ -1298,7 +1298,7 @@ discard block |
||
1298 | 1298 | return; // entity has not been persisted yet, so nothing more to do. |
1299 | 1299 | } |
1300 | 1300 | |
1301 | - if (! $this->isInIdentityMap($entity)) { |
|
1301 | + if ( ! $this->isInIdentityMap($entity)) { |
|
1302 | 1302 | return; |
1303 | 1303 | } |
1304 | 1304 | |
@@ -1306,7 +1306,7 @@ discard block |
||
1306 | 1306 | |
1307 | 1307 | unset($this->entityUpdates[$oid]); |
1308 | 1308 | |
1309 | - if (! isset($this->entityDeletions[$oid])) { |
|
1309 | + if ( ! isset($this->entityDeletions[$oid])) { |
|
1310 | 1310 | $this->entityDeletions[$oid] = $entity; |
1311 | 1311 | $this->entityStates[$oid] = self::STATE_REMOVED; |
1312 | 1312 | } |
@@ -1408,7 +1408,7 @@ discard block |
||
1408 | 1408 | $persister = $this->getEntityPersister($class->getClassName()); |
1409 | 1409 | $id = $persister->getIdentifier($entity); |
1410 | 1410 | |
1411 | - if (! $id) { |
|
1411 | + if ( ! $id) { |
|
1412 | 1412 | return self::STATE_NEW; |
1413 | 1413 | } |
1414 | 1414 | |
@@ -1766,7 +1766,7 @@ discard block |
||
1766 | 1766 | $class = $this->em->getClassMetadata(get_class($entity)); |
1767 | 1767 | |
1768 | 1768 | foreach ($class->getPropertiesIterator() as $association) { |
1769 | - if (! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade(), true))) { |
|
1769 | + if ( ! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade(), true))) { |
|
1770 | 1770 | continue; |
1771 | 1771 | } |
1772 | 1772 | |
@@ -1813,7 +1813,7 @@ discard block |
||
1813 | 1813 | } |
1814 | 1814 | |
1815 | 1815 | foreach ($class->getPropertiesIterator() as $association) { |
1816 | - if (! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade(), true))) { |
|
1816 | + if ( ! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade(), true))) { |
|
1817 | 1817 | continue; |
1818 | 1818 | } |
1819 | 1819 | |
@@ -1829,7 +1829,7 @@ discard block |
||
1829 | 1829 | |
1830 | 1830 | case $relatedEntities instanceof Collection: |
1831 | 1831 | case is_array($relatedEntities): |
1832 | - if (! ($association instanceof ToManyAssociationMetadata)) { |
|
1832 | + if ( ! ($association instanceof ToManyAssociationMetadata)) { |
|
1833 | 1833 | throw ORMInvalidArgumentException::invalidAssociation( |
1834 | 1834 | $this->em->getClassMetadata($targetEntity), |
1835 | 1835 | $association, |
@@ -1844,7 +1844,7 @@ discard block |
||
1844 | 1844 | break; |
1845 | 1845 | |
1846 | 1846 | case $relatedEntities !== null: |
1847 | - if (! $relatedEntities instanceof $targetEntity) { |
|
1847 | + if ( ! $relatedEntities instanceof $targetEntity) { |
|
1848 | 1848 | throw ORMInvalidArgumentException::invalidAssociation( |
1849 | 1849 | $this->em->getClassMetadata($targetEntity), |
1850 | 1850 | $association, |
@@ -1873,7 +1873,7 @@ discard block |
||
1873 | 1873 | $class = $this->em->getClassMetadata(get_class($entity)); |
1874 | 1874 | |
1875 | 1875 | foreach ($class->getPropertiesIterator() as $association) { |
1876 | - if (! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade(), true))) { |
|
1876 | + if ( ! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade(), true))) { |
|
1877 | 1877 | continue; |
1878 | 1878 | } |
1879 | 1879 | |
@@ -1932,7 +1932,7 @@ discard block |
||
1932 | 1932 | |
1933 | 1933 | switch (true) { |
1934 | 1934 | case $lockMode === LockMode::OPTIMISTIC: |
1935 | - if (! $class->isVersioned()) { |
|
1935 | + if ( ! $class->isVersioned()) { |
|
1936 | 1936 | throw OptimisticLockException::notVersioned($class->getClassName()); |
1937 | 1937 | } |
1938 | 1938 | |
@@ -1955,7 +1955,7 @@ discard block |
||
1955 | 1955 | case $lockMode === LockMode::NONE: |
1956 | 1956 | case $lockMode === LockMode::PESSIMISTIC_READ: |
1957 | 1957 | case $lockMode === LockMode::PESSIMISTIC_WRITE: |
1958 | - if (! $this->em->getConnection()->isTransactionActive()) { |
|
1958 | + if ( ! $this->em->getConnection()->isTransactionActive()) { |
|
1959 | 1959 | throw TransactionRequiredException::transactionRequired(); |
1960 | 1960 | } |
1961 | 1961 | |
@@ -2113,7 +2113,7 @@ discard block |
||
2113 | 2113 | $entity->addPropertyChangedListener($this); |
2114 | 2114 | } |
2115 | 2115 | } else { |
2116 | - if (! isset($hints[Query::HINT_REFRESH]) |
|
2116 | + if ( ! isset($hints[Query::HINT_REFRESH]) |
|
2117 | 2117 | || (isset($hints[Query::HINT_REFRESH_ENTITY]) && $hints[Query::HINT_REFRESH_ENTITY] !== $entity)) { |
2118 | 2118 | return $entity; |
2119 | 2119 | } |
@@ -2161,7 +2161,7 @@ discard block |
||
2161 | 2161 | } |
2162 | 2162 | |
2163 | 2163 | foreach ($class->getPropertiesIterator() as $field => $association) { |
2164 | - if (! ($association instanceof AssociationMetadata)) { |
|
2164 | + if ( ! ($association instanceof AssociationMetadata)) { |
|
2165 | 2165 | continue; |
2166 | 2166 | } |
2167 | 2167 | |
@@ -2210,7 +2210,7 @@ discard block |
||
2210 | 2210 | continue; |
2211 | 2211 | } |
2212 | 2212 | |
2213 | - if (! $association->isOwningSide()) { |
|
2213 | + if ( ! $association->isOwningSide()) { |
|
2214 | 2214 | // use the given entity association |
2215 | 2215 | if (isset($data[$field]) && is_object($data[$field]) && |
2216 | 2216 | isset($this->entityStates[spl_object_id($data[$field])])) { |
@@ -2260,7 +2260,7 @@ discard block |
||
2260 | 2260 | $associatedId[$targetField] = $joinColumnValue; |
2261 | 2261 | } |
2262 | 2262 | |
2263 | - if (! $associatedId) { |
|
2263 | + if ( ! $associatedId) { |
|
2264 | 2264 | // Foreign key is NULL |
2265 | 2265 | $association->setValue($entity, null); |
2266 | 2266 | $this->originalEntityData[$oid][$field] = null; |
@@ -2269,7 +2269,7 @@ discard block |
||
2269 | 2269 | } |
2270 | 2270 | |
2271 | 2271 | // @todo guilhermeblanco Can we remove the need of this somehow? |
2272 | - if (! isset($hints['fetchMode'][$class->getClassName()][$field])) { |
|
2272 | + if ( ! isset($hints['fetchMode'][$class->getClassName()][$field])) { |
|
2273 | 2273 | $hints['fetchMode'][$class->getClassName()][$field] = $association->getFetchMode(); |
2274 | 2274 | } |
2275 | 2275 | |
@@ -2286,7 +2286,7 @@ discard block |
||
2286 | 2286 | // If this is an uninitialized proxy, we are deferring eager loads, |
2287 | 2287 | // this association is marked as eager fetch, and its an uninitialized proxy (wtf!) |
2288 | 2288 | // then we can append this entity for eager loading! |
2289 | - if (! $targetClass->isIdentifierComposite() && |
|
2289 | + if ( ! $targetClass->isIdentifierComposite() && |
|
2290 | 2290 | $newValue instanceof GhostObjectInterface && |
2291 | 2291 | isset($hints[self::HINT_DEFEREAGERLOAD]) && |
2292 | 2292 | $hints['fetchMode'][$class->getClassName()][$field] === FetchMode::EAGER && |
@@ -2369,7 +2369,7 @@ discard block |
||
2369 | 2369 | |
2370 | 2370 | public function triggerEagerLoads() |
2371 | 2371 | { |
2372 | - if (! $this->eagerLoadingEntities) { |
|
2372 | + if ( ! $this->eagerLoadingEntities) { |
|
2373 | 2373 | return; |
2374 | 2374 | } |
2375 | 2375 | |
@@ -2378,7 +2378,7 @@ discard block |
||
2378 | 2378 | $this->eagerLoadingEntities = []; |
2379 | 2379 | |
2380 | 2380 | foreach ($eagerLoadingEntities as $entityName => $ids) { |
2381 | - if (! $ids) { |
|
2381 | + if ( ! $ids) { |
|
2382 | 2382 | continue; |
2383 | 2383 | } |
2384 | 2384 | |
@@ -2676,7 +2676,7 @@ discard block |
||
2676 | 2676 | { |
2677 | 2677 | $class = $this->em->getClassMetadata(get_class($entity)); |
2678 | 2678 | |
2679 | - if (! $class->getProperty($propertyName)) { |
|
2679 | + if ( ! $class->getProperty($propertyName)) { |
|
2680 | 2680 | return; // ignore non-persistent fields |
2681 | 2681 | } |
2682 | 2682 | |
@@ -2685,7 +2685,7 @@ discard block |
||
2685 | 2685 | // Update changeset and mark entity for synchronization |
2686 | 2686 | $this->entityChangeSets[$oid][$propertyName] = [$oldValue, $newValue]; |
2687 | 2687 | |
2688 | - if (! isset($this->scheduledForSynchronization[$class->getRootClassName()][$oid])) { |
|
2688 | + if ( ! isset($this->scheduledForSynchronization[$class->getRootClassName()][$oid])) { |
|
2689 | 2689 | $this->scheduleForSynchronization($entity); |
2690 | 2690 | } |
2691 | 2691 | } |
@@ -2767,7 +2767,7 @@ discard block |
||
2767 | 2767 | */ |
2768 | 2768 | private static function objToStr($obj) |
2769 | 2769 | { |
2770 | - return method_exists($obj, '__toString') ? (string) $obj : get_class($obj) . '@' . spl_object_id($obj); |
|
2770 | + return method_exists($obj, '__toString') ? (string) $obj : get_class($obj).'@'.spl_object_id($obj); |
|
2771 | 2771 | } |
2772 | 2772 | |
2773 | 2773 | /** |
@@ -2782,7 +2782,7 @@ discard block |
||
2782 | 2782 | */ |
2783 | 2783 | public function markReadOnly($object) |
2784 | 2784 | { |
2785 | - if (! is_object($object) || ! $this->isInIdentityMap($object)) { |
|
2785 | + if ( ! is_object($object) || ! $this->isInIdentityMap($object)) { |
|
2786 | 2786 | throw ORMInvalidArgumentException::readOnlyRequiresManagedEntity($object); |
2787 | 2787 | } |
2788 | 2788 | |
@@ -2800,7 +2800,7 @@ discard block |
||
2800 | 2800 | */ |
2801 | 2801 | public function isReadOnly($object) |
2802 | 2802 | { |
2803 | - if (! is_object($object)) { |
|
2803 | + if ( ! is_object($object)) { |
|
2804 | 2804 | throw ORMInvalidArgumentException::readOnlyRequiresManagedEntity($object); |
2805 | 2805 | } |
2806 | 2806 | |
@@ -2812,7 +2812,7 @@ discard block |
||
2812 | 2812 | */ |
2813 | 2813 | private function afterTransactionComplete() |
2814 | 2814 | { |
2815 | - $this->performCallbackOnCachedPersister(static function (CachedPersister $persister) { |
|
2815 | + $this->performCallbackOnCachedPersister(static function(CachedPersister $persister) { |
|
2816 | 2816 | $persister->afterTransactionComplete(); |
2817 | 2817 | }); |
2818 | 2818 | } |
@@ -2822,7 +2822,7 @@ discard block |
||
2822 | 2822 | */ |
2823 | 2823 | private function afterTransactionRolledBack() |
2824 | 2824 | { |
2825 | - $this->performCallbackOnCachedPersister(static function (CachedPersister $persister) { |
|
2825 | + $this->performCallbackOnCachedPersister(static function(CachedPersister $persister) { |
|
2826 | 2826 | $persister->afterTransactionRolledBack(); |
2827 | 2827 | }); |
2828 | 2828 | } |
@@ -2832,7 +2832,7 @@ discard block |
||
2832 | 2832 | */ |
2833 | 2833 | private function performCallbackOnCachedPersister(callable $callback) |
2834 | 2834 | { |
2835 | - if (! $this->hasCache) { |
|
2835 | + if ( ! $this->hasCache) { |
|
2836 | 2836 | return; |
2837 | 2837 | } |
2838 | 2838 |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $metadata = $this->em->getClassMetadata($className); |
56 | 56 | $persister = $this->uow->getEntityPersister($metadata->getRootClassName()); |
57 | 57 | |
58 | - if (! ($persister instanceof CachedPersister)) { |
|
58 | + if ( ! ($persister instanceof CachedPersister)) { |
|
59 | 59 | return null; |
60 | 60 | } |
61 | 61 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $metadata = $this->em->getClassMetadata($className); |
71 | 71 | $persister = $this->uow->getCollectionPersister($metadata->getProperty($association)); |
72 | 72 | |
73 | - if (! ($persister instanceof CachedPersister)) { |
|
73 | + if ( ! ($persister instanceof CachedPersister)) { |
|
74 | 74 | return null; |
75 | 75 | } |
76 | 76 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $metadata = $this->em->getClassMetadata($className); |
86 | 86 | $persister = $this->uow->getEntityPersister($metadata->getRootClassName()); |
87 | 87 | |
88 | - if (! ($persister instanceof CachedPersister)) { |
|
88 | + if ( ! ($persister instanceof CachedPersister)) { |
|
89 | 89 | return false; |
90 | 90 | } |
91 | 91 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $metadata = $this->em->getClassMetadata($className); |
101 | 101 | $persister = $this->uow->getEntityPersister($metadata->getRootClassName()); |
102 | 102 | |
103 | - if (! ($persister instanceof CachedPersister)) { |
|
103 | + if ( ! ($persister instanceof CachedPersister)) { |
|
104 | 104 | return; |
105 | 105 | } |
106 | 106 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $metadata = $this->em->getClassMetadata($className); |
116 | 116 | $persister = $this->uow->getEntityPersister($metadata->getRootClassName()); |
117 | 117 | |
118 | - if (! ($persister instanceof CachedPersister)) { |
|
118 | + if ( ! ($persister instanceof CachedPersister)) { |
|
119 | 119 | return; |
120 | 120 | } |
121 | 121 | |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | foreach ($metadatas as $metadata) { |
133 | 133 | $persister = $this->uow->getEntityPersister($metadata->getRootClassName()); |
134 | 134 | |
135 | - if (! ($persister instanceof CachedPersister)) { |
|
135 | + if ( ! ($persister instanceof CachedPersister)) { |
|
136 | 136 | continue; |
137 | 137 | } |
138 | 138 | |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | $metadata = $this->em->getClassMetadata($className); |
149 | 149 | $persister = $this->uow->getCollectionPersister($metadata->getProperty($association)); |
150 | 150 | |
151 | - if (! ($persister instanceof CachedPersister)) { |
|
151 | + if ( ! ($persister instanceof CachedPersister)) { |
|
152 | 152 | return false; |
153 | 153 | } |
154 | 154 | |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | $metadata = $this->em->getClassMetadata($className); |
164 | 164 | $persister = $this->uow->getCollectionPersister($metadata->getProperty($association)); |
165 | 165 | |
166 | - if (! ($persister instanceof CachedPersister)) { |
|
166 | + if ( ! ($persister instanceof CachedPersister)) { |
|
167 | 167 | return; |
168 | 168 | } |
169 | 169 | |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | $metadata = $this->em->getClassMetadata($className); |
179 | 179 | $persister = $this->uow->getCollectionPersister($metadata->getProperty($association)); |
180 | 180 | |
181 | - if (! ($persister instanceof CachedPersister)) { |
|
181 | + if ( ! ($persister instanceof CachedPersister)) { |
|
182 | 182 | return; |
183 | 183 | } |
184 | 184 | |
@@ -194,13 +194,13 @@ discard block |
||
194 | 194 | |
195 | 195 | foreach ($metadatas as $metadata) { |
196 | 196 | foreach ($metadata->getPropertiesIterator() as $association) { |
197 | - if (! $association instanceof ToManyAssociationMetadata) { |
|
197 | + if ( ! $association instanceof ToManyAssociationMetadata) { |
|
198 | 198 | continue; |
199 | 199 | } |
200 | 200 | |
201 | 201 | $persister = $this->uow->getCollectionPersister($association); |
202 | 202 | |
203 | - if (! ($persister instanceof CachedPersister)) { |
|
203 | + if ( ! ($persister instanceof CachedPersister)) { |
|
204 | 204 | continue; |
205 | 205 | } |
206 | 206 | |
@@ -251,11 +251,10 @@ discard block |
||
251 | 251 | public function getQueryCache($regionName = null) |
252 | 252 | { |
253 | 253 | if ($regionName === null) { |
254 | - return $this->defaultQueryCache ?: |
|
255 | - $this->defaultQueryCache = $this->cacheFactory->buildQueryCache($this->em); |
|
254 | + return $this->defaultQueryCache ?: $this->defaultQueryCache = $this->cacheFactory->buildQueryCache($this->em); |
|
256 | 255 | } |
257 | 256 | |
258 | - if (! isset($this->queryCaches[$regionName])) { |
|
257 | + if ( ! isset($this->queryCaches[$regionName])) { |
|
259 | 258 | $this->queryCaches[$regionName] = $this->cacheFactory->buildQueryCache($this->em, $regionName); |
260 | 259 | } |
261 | 260 | |
@@ -270,7 +269,7 @@ discard block |
||
270 | 269 | */ |
271 | 270 | private function buildEntityCacheKey(ClassMetadata $metadata, $identifier) |
272 | 271 | { |
273 | - if (! is_array($identifier)) { |
|
272 | + if ( ! is_array($identifier)) { |
|
274 | 273 | $identifier = $this->toIdentifierArray($metadata, $identifier); |
275 | 274 | } |
276 | 275 | |
@@ -286,7 +285,7 @@ discard block |
||
286 | 285 | */ |
287 | 286 | private function buildCollectionCacheKey(ClassMetadata $metadata, $association, $ownerIdentifier) |
288 | 287 | { |
289 | - if (! is_array($ownerIdentifier)) { |
|
288 | + if ( ! is_array($ownerIdentifier)) { |
|
290 | 289 | $ownerIdentifier = $this->toIdentifierArray($metadata, $ownerIdentifier); |
291 | 290 | } |
292 | 291 |
@@ -54,11 +54,11 @@ discard block |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | foreach ($metadata->getPropertiesIterator() as $name => $association) { |
57 | - if (! isset($data[$name]) || $association instanceof FieldMetadata) { |
|
57 | + if ( ! isset($data[$name]) || $association instanceof FieldMetadata) { |
|
58 | 58 | continue; |
59 | 59 | } |
60 | 60 | |
61 | - if (! $association instanceof ToOneAssociationMetadata) { |
|
61 | + if ( ! $association instanceof ToOneAssociationMetadata) { |
|
62 | 62 | unset($data[$name]); |
63 | 63 | |
64 | 64 | continue; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $targetClassMetadata = $this->em->getClassMetadata($targetEntity); |
69 | 69 | $targetPersister = $this->uow->getEntityPersister($targetEntity); |
70 | 70 | |
71 | - if (! $association->getCache()) { |
|
71 | + if ( ! $association->getCache()) { |
|
72 | 72 | $owningAssociation = ! $association->isOwningSide() |
73 | 73 | ? $targetClassMetadata->getProperty($association->getMappedBy()) |
74 | 74 | : $association; |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | continue; |
117 | 117 | } |
118 | 118 | |
119 | - if (! $association->isPrimaryKey()) { |
|
119 | + if ( ! $association->isPrimaryKey()) { |
|
120 | 120 | $targetClass = StaticClassNameConverter::getClass($data[$name]); |
121 | 121 | $targetId = $this->uow->getEntityIdentifier($data[$name]); |
122 | 122 | $data[$name] = new AssociationCacheEntry($targetClass, $targetId); |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | ($association instanceof OneToOneAssociationMetadata && ! $association->isOwningSide()) |
166 | 166 | ); |
167 | 167 | |
168 | - if (! $isEagerLoad) { |
|
168 | + if ( ! $isEagerLoad) { |
|
169 | 169 | $data[$name] = $this->em->getReference($assocClass, $assocId); |
170 | 170 | |
171 | 171 | continue; |
@@ -82,11 +82,11 @@ discard block |
||
82 | 82 | $joinTableMetadata->setName($namingStrategy->joinTableName($souceEntity, $this->targetEntity, $this->fieldName)); |
83 | 83 | |
84 | 84 | if ($this->joinTableAnnotation !== null) { |
85 | - if (! empty($this->joinTableAnnotation->name)) { |
|
85 | + if ( ! empty($this->joinTableAnnotation->name)) { |
|
86 | 86 | $joinTableMetadata->setName($this->joinTableAnnotation->name); |
87 | 87 | } |
88 | 88 | |
89 | - if (! empty($this->joinTableAnnotation->schema)) { |
|
89 | + if ( ! empty($this->joinTableAnnotation->schema)) { |
|
90 | 90 | $joinTableMetadata->setSchema($this->joinTableAnnotation->schema); |
91 | 91 | } |
92 | 92 | |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | |
123 | 123 | $selfReferenceEntity = $souceEntity === $this->targetEntity; |
124 | 124 | |
125 | - if (! $joinTableMetadata->getJoinColumns()) { |
|
125 | + if ( ! $joinTableMetadata->getJoinColumns()) { |
|
126 | 126 | $joinColumnAnnotation = new Annotation\JoinColumn(); |
127 | 127 | |
128 | 128 | $joinColumnAnnotation->onDelete = 'CASCADE'; |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | $joinTableMetadata->addJoinColumn($this->joinColumnMetadataBuilder->build()); |
138 | 138 | } |
139 | 139 | |
140 | - if (! $joinTableMetadata->getInverseJoinColumns()) { |
|
140 | + if ( ! $joinTableMetadata->getInverseJoinColumns()) { |
|
141 | 141 | $joinColumnAnnotation = new Annotation\JoinColumn(); |
142 | 142 | |
143 | 143 | $joinColumnAnnotation->onDelete = 'CASCADE'; |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | */ |
131 | 131 | public function isTransient($className) : bool |
132 | 132 | { |
133 | - if (! $this->initialized) { |
|
133 | + if ( ! $this->initialized) { |
|
134 | 134 | $this->initialize(); |
135 | 135 | } |
136 | 136 | |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | */ |
179 | 179 | public function getAllMetadata() : array |
180 | 180 | { |
181 | - if (! $this->initialized) { |
|
181 | + if ( ! $this->initialized) { |
|
182 | 182 | $this->initialize(); |
183 | 183 | } |
184 | 184 | |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | |
215 | 215 | public function getTargetPlatform() : Platforms\AbstractPlatform |
216 | 216 | { |
217 | - if (! $this->targetPlatform) { |
|
217 | + if ( ! $this->targetPlatform) { |
|
218 | 218 | $this->targetPlatform = $this->em->getConnection()->getDatabasePlatform(); |
219 | 219 | } |
220 | 220 | |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | |
257 | 257 | try { |
258 | 258 | if ($this->cacheDriver) { |
259 | - $cached = $this->cacheDriver->fetch($entityClassName . $this->cacheSalt); |
|
259 | + $cached = $this->cacheDriver->fetch($entityClassName.$this->cacheSalt); |
|
260 | 260 | |
261 | 261 | if ($cached instanceof ClassMetadata) { |
262 | 262 | $this->loadedMetadata[$entityClassName] = $cached; |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | foreach ($this->loadMetadata($entityClassName, $metadataBuildingContext) as $loadedClass) { |
267 | 267 | $loadedClassName = $loadedClass->getClassName(); |
268 | 268 | |
269 | - $this->cacheDriver->save($loadedClassName . $this->cacheSalt, $loadedClass, null); |
|
269 | + $this->cacheDriver->save($loadedClassName.$this->cacheSalt, $loadedClass, null); |
|
270 | 270 | } |
271 | 271 | } |
272 | 272 | } else { |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | } catch (PersistenceMappingException $loadingException) { |
276 | 276 | $fallbackMetadataResponse = $this->onNotFoundMetadata($entityClassName, $metadataBuildingContext); |
277 | 277 | |
278 | - if (! $fallbackMetadataResponse) { |
|
278 | + if ( ! $fallbackMetadataResponse) { |
|
279 | 279 | throw $loadingException; |
280 | 280 | } |
281 | 281 | |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | */ |
312 | 312 | protected function loadMetadata(string $name, ClassMetadataBuildingContext $metadataBuildingContext) : array |
313 | 313 | { |
314 | - if (! $this->initialized) { |
|
314 | + if ( ! $this->initialized) { |
|
315 | 315 | $this->initialize(); |
316 | 316 | } |
317 | 317 | |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | $parentClasses = []; |
358 | 358 | |
359 | 359 | foreach (array_reverse($this->getReflectionService()->getParentClasses($name)) as $parentClass) { |
360 | - if (! $this->getDriver()->isTransient($parentClass)) { |
|
360 | + if ( ! $this->getDriver()->isTransient($parentClass)) { |
|
361 | 361 | $parentClasses[] = $parentClass; |
362 | 362 | } |
363 | 363 | } |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | string $className, |
373 | 373 | ClassMetadataBuildingContext $metadataBuildingContext |
374 | 374 | ) : ?ClassMetadata { |
375 | - if (! $this->evm->hasListeners(Events::onClassMetadataNotFound)) { |
|
375 | + if ( ! $this->evm->hasListeners(Events::onClassMetadataNotFound)) { |
|
376 | 376 | return null; |
377 | 377 | } |
378 | 378 | |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | */ |
417 | 417 | protected function validateRuntimeMetadata(ClassMetadata $class, ?ClassMetadata $parent = null) : void |
418 | 418 | { |
419 | - if (! $class->getReflectionClass()) { |
|
419 | + if ( ! $class->getReflectionClass()) { |
|
420 | 420 | // only validate if there is a reflection class instance |
421 | 421 | return; |
422 | 422 | } |
@@ -426,13 +426,13 @@ discard block |
||
426 | 426 | $class->validateLifecycleCallbacks($this->getReflectionService()); |
427 | 427 | |
428 | 428 | // verify inheritance |
429 | - if (! $class->isMappedSuperclass && $class->inheritanceType !== InheritanceType::NONE) { |
|
430 | - if (! $parent) { |
|
431 | - if (! $class->discriminatorMap) { |
|
429 | + if ( ! $class->isMappedSuperclass && $class->inheritanceType !== InheritanceType::NONE) { |
|
430 | + if ( ! $parent) { |
|
431 | + if ( ! $class->discriminatorMap) { |
|
432 | 432 | throw MappingException::missingDiscriminatorMap($class->getClassName()); |
433 | 433 | } |
434 | 434 | |
435 | - if (! $class->discriminatorColumn) { |
|
435 | + if ( ! $class->discriminatorColumn) { |
|
436 | 436 | throw MappingException::missingDiscriminatorColumn($class->getClassName()); |
437 | 437 | } |
438 | 438 | } |
@@ -180,11 +180,11 @@ discard block |
||
180 | 180 | $pkColumns = []; |
181 | 181 | |
182 | 182 | foreach ($class->getPropertiesIterator() as $fieldName => $property) { |
183 | - if (! ($property instanceof FieldMetadata)) { |
|
183 | + if ( ! ($property instanceof FieldMetadata)) { |
|
184 | 184 | continue; |
185 | 185 | } |
186 | 186 | |
187 | - if (! $class->isInheritedProperty($fieldName)) { |
|
187 | + if ( ! $class->isInheritedProperty($fieldName)) { |
|
188 | 188 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
189 | 189 | |
190 | 190 | $this->gatherColumn($class, $property, $table); |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | } |
220 | 220 | } |
221 | 221 | |
222 | - if (! empty($inheritedKeyColumns)) { |
|
222 | + if ( ! empty($inheritedKeyColumns)) { |
|
223 | 223 | // Add a FK constraint on the ID column |
224 | 224 | $rootClass = $this->em->getClassMetadata($class->getRootClassName()); |
225 | 225 | |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | } |
265 | 265 | } |
266 | 266 | |
267 | - if (! $table->hasIndex('primary')) { |
|
267 | + if ( ! $table->hasIndex('primary')) { |
|
268 | 268 | $table->setPrimaryKey($pkColumns); |
269 | 269 | } |
270 | 270 | |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | $processedClasses[$class->getClassName()] = true; |
325 | 325 | |
326 | 326 | foreach ($class->getPropertiesIterator() as $property) { |
327 | - if (! $property instanceof FieldMetadata |
|
327 | + if ( ! $property instanceof FieldMetadata |
|
328 | 328 | || ! $property->hasValueGenerator() |
329 | 329 | || $property->getValueGenerator()->getType() !== GeneratorType::SEQUENCE |
330 | 330 | || $class->getClassName() !== $class->getRootClassName()) { |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | $generator = $property->getValueGenerator()->getGenerator(); |
335 | 335 | $quotedName = $generator->getSequenceName(); |
336 | 336 | |
337 | - if (! $schema->hasSequence($quotedName)) { |
|
337 | + if ( ! $schema->hasSequence($quotedName)) { |
|
338 | 338 | $schema->createSequence($quotedName, $generator->getAllocationSize()); |
339 | 339 | } |
340 | 340 | } |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | } |
348 | 348 | } |
349 | 349 | |
350 | - if (! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) { |
|
350 | + if ( ! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) { |
|
351 | 351 | $schema->visit(new RemoveNamespacedAssets()); |
352 | 352 | } |
353 | 353 | |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | break; |
387 | 387 | } |
388 | 388 | |
389 | - if (! empty($discrColumn->getColumnDefinition())) { |
|
389 | + if ( ! empty($discrColumn->getColumnDefinition())) { |
|
390 | 390 | $options['columnDefinition'] = $discrColumn->getColumnDefinition(); |
391 | 391 | } |
392 | 392 | |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | $pkColumns = []; |
405 | 405 | |
406 | 406 | foreach ($class->getPropertiesIterator() as $fieldName => $property) { |
407 | - if (! ($property instanceof FieldMetadata)) { |
|
407 | + if ( ! ($property instanceof FieldMetadata)) { |
|
408 | 408 | continue; |
409 | 409 | } |
410 | 410 | |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | private function gatherRelationsSql($class, $table, $schema, &$addedFks, &$blacklistedFks) |
509 | 509 | { |
510 | 510 | foreach ($class->getPropertiesIterator() as $fieldName => $property) { |
511 | - if (! ($property instanceof AssociationMetadata)) { |
|
511 | + if ( ! ($property instanceof AssociationMetadata)) { |
|
512 | 512 | continue; |
513 | 513 | } |
514 | 514 | |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | continue; |
517 | 517 | } |
518 | 518 | |
519 | - if (! $property->isOwningSide()) { |
|
519 | + if ( ! $property->isOwningSide()) { |
|
520 | 520 | continue; |
521 | 521 | } |
522 | 522 | |
@@ -606,7 +606,7 @@ discard block |
||
606 | 606 | $idColumns = $class->getIdentifierColumns($this->em); |
607 | 607 | $idColumnNameList = array_keys($idColumns); |
608 | 608 | |
609 | - if (! in_array($referencedColumnName, $idColumnNameList, true)) { |
|
609 | + if ( ! in_array($referencedColumnName, $idColumnNameList, true)) { |
|
610 | 610 | return null; |
611 | 611 | } |
612 | 612 | |
@@ -614,7 +614,7 @@ discard block |
||
614 | 614 | foreach ($class->getIdentifierFieldNames() as $fieldName) { |
615 | 615 | $property = $class->getProperty($fieldName); |
616 | 616 | |
617 | - if (! ($property instanceof AssociationMetadata)) { |
|
617 | + if ( ! ($property instanceof AssociationMetadata)) { |
|
618 | 618 | continue; |
619 | 619 | } |
620 | 620 | |
@@ -670,7 +670,7 @@ discard block |
||
670 | 670 | $joinColumn->getReferencedColumnName() |
671 | 671 | ); |
672 | 672 | |
673 | - if (! $definingClass) { |
|
673 | + if ( ! $definingClass) { |
|
674 | 674 | throw MissingColumnException::fromColumnSourceAndTarget( |
675 | 675 | $joinColumn->getReferencedColumnName(), |
676 | 676 | $mapping->getSourceEntity(), |
@@ -685,14 +685,14 @@ discard block |
||
685 | 685 | $localColumns[] = $quotedColumnName; |
686 | 686 | $foreignColumns[] = $quotedReferencedColumnName; |
687 | 687 | |
688 | - if (! $theJoinTable->hasColumn($quotedColumnName)) { |
|
688 | + if ( ! $theJoinTable->hasColumn($quotedColumnName)) { |
|
689 | 689 | // Only add the column to the table if it does not exist already. |
690 | 690 | // It might exist already if the foreign key is mapped into a regular |
691 | 691 | // property as well. |
692 | 692 | $property = $definingClass->getProperty($referencedFieldName); |
693 | 693 | $columnDef = null; |
694 | 694 | |
695 | - if (! empty($joinColumn->getColumnDefinition())) { |
|
695 | + if ( ! empty($joinColumn->getColumnDefinition())) { |
|
696 | 696 | $columnDef = $joinColumn->getColumnDefinition(); |
697 | 697 | } elseif ($property->getColumnDefinition()) { |
698 | 698 | $columnDef = $property->getColumnDefinition(); |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | $uniqueConstraints[] = ['columns' => [$quotedColumnName]]; |
725 | 725 | } |
726 | 726 | |
727 | - if (! empty($joinColumn->getOnDelete())) { |
|
727 | + if ( ! empty($joinColumn->getOnDelete())) { |
|
728 | 728 | $fkOptions['onDelete'] = $joinColumn->getOnDelete(); |
729 | 729 | } |
730 | 730 | } |
@@ -735,7 +735,7 @@ discard block |
||
735 | 735 | $theJoinTable->addUniqueIndex($unique['columns'], is_numeric($indexName) ? null : $indexName); |
736 | 736 | } |
737 | 737 | |
738 | - $compositeName = $theJoinTable->getName() . '.' . implode('', $localColumns); |
|
738 | + $compositeName = $theJoinTable->getName().'.'.implode('', $localColumns); |
|
739 | 739 | |
740 | 740 | if (isset($addedFks[$compositeName]) |
741 | 741 | && ($foreignTableName !== $addedFks[$compositeName]['foreignTableName'] |
@@ -752,7 +752,7 @@ discard block |
||
752 | 752 | } |
753 | 753 | |
754 | 754 | $blacklistedFks[$compositeName] = true; |
755 | - } elseif (! isset($blacklistedFks[$compositeName])) { |
|
755 | + } elseif ( ! isset($blacklistedFks[$compositeName])) { |
|
756 | 756 | $addedFks[$compositeName] = [ |
757 | 757 | 'foreignTableName' => $foreignTableName, |
758 | 758 | 'foreignColumns' => $foreignColumns, |
@@ -851,7 +851,7 @@ discard block |
||
851 | 851 | $fullSchema = $sm->createSchema(); |
852 | 852 | |
853 | 853 | foreach ($fullSchema->getTables() as $table) { |
854 | - if (! $schema->hasTable($table->getName())) { |
|
854 | + if ( ! $schema->hasTable($table->getName())) { |
|
855 | 855 | foreach ($table->getForeignKeys() as $foreignKey) { |
856 | 856 | /** @var $foreignKey ForeignKeyConstraint */ |
857 | 857 | if ($schema->hasTable($foreignKey->getForeignTableName())) { |
@@ -876,7 +876,7 @@ discard block |
||
876 | 876 | if ($table->hasPrimaryKey()) { |
877 | 877 | $columns = $table->getPrimaryKey()->getColumns(); |
878 | 878 | if (count($columns) === 1) { |
879 | - $checkSequence = $table->getName() . '_' . $columns[0] . '_seq'; |
|
879 | + $checkSequence = $table->getName().'_'.$columns[0].'_seq'; |
|
880 | 880 | if ($fullSchema->hasSequence($checkSequence)) { |
881 | 881 | $visitor->acceptSequence($fullSchema->getSequence($checkSequence)); |
882 | 882 | } |
@@ -58,7 +58,7 @@ |
||
58 | 58 | $this->allocationSize |
59 | 59 | ); |
60 | 60 | |
61 | - if ($conn->executeUpdate($updateSql, [1 => $currentLevel, 2 => $currentLevel+1]) !== 1) { |
|
61 | + if ($conn->executeUpdate($updateSql, [1 => $currentLevel, 2 => $currentLevel + 1]) !== 1) { |
|
62 | 62 | // no affected rows, concurrency issue, throw exception |
63 | 63 | } |
64 | 64 | } else { |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | { |
157 | 157 | $this->addresses = $addresses; |
158 | 158 | |
159 | - $addresses->map(function ($address) { |
|
159 | + $addresses->map(function($address) { |
|
160 | 160 | $address->user = $this; |
161 | 161 | }); |
162 | 162 | } |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | { |
166 | 166 | $this->pets = $pets; |
167 | 167 | |
168 | - $pets->map(function ($pet) { |
|
168 | + $pets->map(function($pet) { |
|
169 | 169 | $pet->owner = $this; |
170 | 170 | }); |
171 | 171 | } |