@@ -1237,7 +1237,7 @@ discard block |
||
1237 | 1237 | /** |
1238 | 1238 | * Schedules an entity for being updated. |
1239 | 1239 | * |
1240 | - * @param object $entity The entity to schedule for being updated. |
|
1240 | + * @param \Doctrine\Tests\Models\Forum\ForumUser $entity The entity to schedule for being updated. |
|
1241 | 1241 | * |
1242 | 1242 | * @return void |
1243 | 1243 | * |
@@ -1305,7 +1305,7 @@ discard block |
||
1305 | 1305 | /** |
1306 | 1306 | * Checks whether an entity is registered to be checked in the unit of work. |
1307 | 1307 | * |
1308 | - * @param object $entity |
|
1308 | + * @param \Doctrine\Tests\ORM\NotifyChangedEntity $entity |
|
1309 | 1309 | * |
1310 | 1310 | * @return boolean |
1311 | 1311 | */ |
@@ -3121,7 +3121,7 @@ discard block |
||
3121 | 3121 | * |
3122 | 3122 | * @param object $entity The entity that owns the property. |
3123 | 3123 | * @param string $propertyName The name of the property that changed. |
3124 | - * @param mixed $oldValue The old value of the property. |
|
3124 | + * @param null|integer $oldValue The old value of the property. |
|
3125 | 3125 | * @param mixed $newValue The new value of the property. |
3126 | 3126 | * |
3127 | 3127 | * @return void |
@@ -3321,7 +3321,7 @@ discard block |
||
3321 | 3321 | /** |
3322 | 3322 | * Verifies if two given entities actually are the same based on identifier comparison |
3323 | 3323 | * |
3324 | - * @param object $entity1 |
|
3324 | + * @param Proxy $entity1 |
|
3325 | 3325 | * @param object $entity2 |
3326 | 3326 | * |
3327 | 3327 | * @return bool |
@@ -28,7 +28,6 @@ |
||
28 | 28 | use Doctrine\ORM\Mapping\ManyToManyAssociationMetadata; |
29 | 29 | use Doctrine\ORM\Mapping\OneToManyAssociationMetadata; |
30 | 30 | use Doctrine\ORM\Mapping\OneToOneAssociationMetadata; |
31 | -use Doctrine\ORM\Mapping\Property; |
|
32 | 31 | use Doctrine\ORM\Mapping\ToManyAssociationMetadata; |
33 | 32 | use Doctrine\ORM\Mapping\ToOneAssociationMetadata; |
34 | 33 | use Doctrine\ORM\Mapping\VersionFieldMetadata; |
@@ -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; |
6 | 6 | |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | $oid = spl_object_hash($entity); |
451 | 451 | $data = []; |
452 | 452 | |
453 | - if (!isset($this->entityChangeSets[$oid])) { |
|
453 | + if ( ! isset($this->entityChangeSets[$oid])) { |
|
454 | 454 | return $data; |
455 | 455 | } |
456 | 456 | |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | || ! $class->getProperty($name) instanceof FieldMetadata |
534 | 534 | || ! $class->getProperty($name)->hasValueGenerator() |
535 | 535 | || $class->getProperty($name)->getValueGenerator()->getType() !== GeneratorType::IDENTITY |
536 | - ) && (! $class->isVersioned() || $name !== $class->versionProperty->getName())) { |
|
536 | + ) && ( ! $class->isVersioned() || $name !== $class->versionProperty->getName())) { |
|
537 | 537 | $actualData[$name] = $value; |
538 | 538 | } |
539 | 539 | } |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | if ($owner === null) { // cloned |
588 | 588 | $actualValue->setOwner($entity, $property); |
589 | 589 | } else if ($owner !== $entity) { // no clone, we have to fix |
590 | - if (! $actualValue->isInitialized()) { |
|
590 | + if ( ! $actualValue->isInitialized()) { |
|
591 | 591 | $actualValue->initialize(); // we have to do this otherwise the cols share state |
592 | 592 | } |
593 | 593 | |
@@ -627,7 +627,7 @@ discard block |
||
627 | 627 | // A PersistentCollection was de-referenced, so delete it. |
628 | 628 | $coid = spl_object_hash($orgValue); |
629 | 629 | |
630 | - if (!isset($this->collectionDeletions[$coid])) { |
|
630 | + if ( ! isset($this->collectionDeletions[$coid])) { |
|
631 | 631 | $this->collectionDeletions[$coid] = $orgValue; |
632 | 632 | $changeSet[$propName] = $orgValue; // Signal changeset, to-many associations will be ignored |
633 | 633 | } |
@@ -649,7 +649,7 @@ discard block |
||
649 | 649 | |
650 | 650 | // Look for changes in associations of the entity |
651 | 651 | foreach ($class->getDeclaredPropertiesIterator() as $property) { |
652 | - if (! ($property instanceof AssociationMetadata) || ($value = $property->getValue($entity)) === null) { |
|
652 | + if ( ! ($property instanceof AssociationMetadata) || ($value = $property->getValue($entity)) === null) { |
|
653 | 653 | continue; |
654 | 654 | } |
655 | 655 | |
@@ -753,13 +753,13 @@ discard block |
||
753 | 753 | $targetClass = $this->em->getClassMetadata($targetEntity); |
754 | 754 | |
755 | 755 | foreach ($unwrappedValue as $key => $entry) { |
756 | - if (! ($entry instanceof $targetEntity)) { |
|
756 | + if ( ! ($entry instanceof $targetEntity)) { |
|
757 | 757 | throw ORMInvalidArgumentException::invalidAssociation($targetClass, $association, $entry); |
758 | 758 | } |
759 | 759 | |
760 | 760 | $state = $this->getEntityState($entry, self::STATE_NEW); |
761 | 761 | |
762 | - if (! ($entry instanceof $targetEntity)) { |
|
762 | + if ( ! ($entry instanceof $targetEntity)) { |
|
763 | 763 | throw ORMException::unexpectedAssociationValue( |
764 | 764 | $association->getSourceEntity(), |
765 | 765 | $association->getName(), |
@@ -818,7 +818,7 @@ discard block |
||
818 | 818 | $persister = $this->getEntityPersister($class->getClassName()); |
819 | 819 | $generationPlan->executeImmediate($this->em, $entity); |
820 | 820 | |
821 | - if (! $generationPlan->containsDeferred()) { |
|
821 | + if ( ! $generationPlan->containsDeferred()) { |
|
822 | 822 | $id = $this->em->getIdentifierFlattener()->flattenIdentifier($class, $persister->getIdentifier($entity)); |
823 | 823 | $this->entityIdentifiers[$oid] = $id; |
824 | 824 | } |
@@ -851,7 +851,7 @@ discard block |
||
851 | 851 | { |
852 | 852 | $oid = spl_object_hash($entity); |
853 | 853 | |
854 | - if (! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) { |
|
854 | + if ( ! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) { |
|
855 | 855 | throw ORMInvalidArgumentException::entityNotManaged($entity); |
856 | 856 | } |
857 | 857 | |
@@ -873,7 +873,7 @@ discard block |
||
873 | 873 | break; |
874 | 874 | |
875 | 875 | case ($property instanceof FieldMetadata): |
876 | - if (! $property->isPrimaryKey() |
|
876 | + if ( ! $property->isPrimaryKey() |
|
877 | 877 | || ! $property->getValueGenerator() |
878 | 878 | || $property->getValueGenerator()->getType() !== GeneratorType::IDENTITY) { |
879 | 879 | $actualData[$name] = $property->getValue($entity); |
@@ -1026,7 +1026,7 @@ discard block |
||
1026 | 1026 | // Entity with this $oid after deletion treated as NEW, even if the $oid |
1027 | 1027 | // is obtained by a new entity because the old one went out of scope. |
1028 | 1028 | //$this->entityStates[$oid] = self::STATE_NEW; |
1029 | - if (! $class->isIdentifierComposite()) { |
|
1029 | + if ( ! $class->isIdentifierComposite()) { |
|
1030 | 1030 | $property = $class->getProperty($class->getSingleIdentifierFieldName()); |
1031 | 1031 | |
1032 | 1032 | if ($property instanceof FieldMetadata && $property->hasValueGenerator()) { |
@@ -1079,7 +1079,7 @@ discard block |
||
1079 | 1079 | // Calculate dependencies for new nodes |
1080 | 1080 | while ($class = array_pop($newNodes)) { |
1081 | 1081 | foreach ($class->getDeclaredPropertiesIterator() as $property) { |
1082 | - if (! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) { |
|
1082 | + if ( ! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) { |
|
1083 | 1083 | continue; |
1084 | 1084 | } |
1085 | 1085 | |
@@ -1094,7 +1094,7 @@ discard block |
||
1094 | 1094 | $weight = count( |
1095 | 1095 | array_filter( |
1096 | 1096 | $property->getJoinColumns(), |
1097 | - function (JoinColumnMetadata $joinColumn) { return $joinColumn->isNullable(); } |
|
1097 | + function(JoinColumnMetadata $joinColumn) { return $joinColumn->isNullable(); } |
|
1098 | 1098 | ) |
1099 | 1099 | ) === 0; |
1100 | 1100 | |
@@ -1389,7 +1389,7 @@ discard block |
||
1389 | 1389 | $persister = $this->getEntityPersister($class->getClassName()); |
1390 | 1390 | $id = $persister->getIdentifier($entity); |
1391 | 1391 | |
1392 | - if (! $id) { |
|
1392 | + if ( ! $id) { |
|
1393 | 1393 | return self::STATE_NEW; |
1394 | 1394 | } |
1395 | 1395 | |
@@ -1624,7 +1624,7 @@ discard block |
||
1624 | 1624 | throw ORMInvalidArgumentException::detachedEntityCannot($entity, "persisted"); |
1625 | 1625 | |
1626 | 1626 | default: |
1627 | - throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); |
|
1627 | + throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity)); |
|
1628 | 1628 | } |
1629 | 1629 | |
1630 | 1630 | $this->cascadePersist($entity, $visited); |
@@ -1694,7 +1694,7 @@ discard block |
||
1694 | 1694 | case self::STATE_DETACHED: |
1695 | 1695 | throw ORMInvalidArgumentException::detachedEntityCannot($entity, "removed"); |
1696 | 1696 | default: |
1697 | - throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); |
|
1697 | + throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity)); |
|
1698 | 1698 | } |
1699 | 1699 | |
1700 | 1700 | } |
@@ -1783,7 +1783,7 @@ discard block |
||
1783 | 1783 | if ($managedCopy === null) { |
1784 | 1784 | // If the identifier is ASSIGNED, it is NEW, otherwise an error |
1785 | 1785 | // since the managed entity was not found. |
1786 | - if (! $class->isIdentifierComposite() |
|
1786 | + if ( ! $class->isIdentifierComposite() |
|
1787 | 1787 | && $class->getProperty($class->getSingleIdentifierFieldName()) instanceof FieldMetadata |
1788 | 1788 | && $class->getProperty($class->getSingleIdentifierFieldName())->hasValueGenerator()) { |
1789 | 1789 | throw EntityNotFoundException::fromClassNameAndIdentifier( |
@@ -1834,7 +1834,7 @@ discard block |
||
1834 | 1834 | */ |
1835 | 1835 | private function ensureVersionMatch(ClassMetadata $class, $entity, $managedCopy) |
1836 | 1836 | { |
1837 | - if (! ($class->isVersioned() && $this->isLoaded($managedCopy) && $this->isLoaded($entity))) { |
|
1837 | + if ( ! ($class->isVersioned() && $this->isLoaded($managedCopy) && $this->isLoaded($entity))) { |
|
1838 | 1838 | return; |
1839 | 1839 | } |
1840 | 1840 | |
@@ -1858,7 +1858,7 @@ discard block |
||
1858 | 1858 | */ |
1859 | 1859 | private function isLoaded($entity) |
1860 | 1860 | { |
1861 | - return !($entity instanceof Proxy) || $entity->__isInitialized(); |
|
1861 | + return ! ($entity instanceof Proxy) || $entity->__isInitialized(); |
|
1862 | 1862 | } |
1863 | 1863 | |
1864 | 1864 | /** |
@@ -2020,7 +2020,7 @@ discard block |
||
2020 | 2020 | $class = $this->em->getClassMetadata(get_class($entity)); |
2021 | 2021 | |
2022 | 2022 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
2023 | - if (! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade()))) { |
|
2023 | + if ( ! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade()))) { |
|
2024 | 2024 | continue; |
2025 | 2025 | } |
2026 | 2026 | |
@@ -2062,7 +2062,7 @@ discard block |
||
2062 | 2062 | $class = $this->em->getClassMetadata(get_class($entity)); |
2063 | 2063 | |
2064 | 2064 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
2065 | - if (! ($association instanceof AssociationMetadata && in_array('detach', $association->getCascade()))) { |
|
2065 | + if ( ! ($association instanceof AssociationMetadata && in_array('detach', $association->getCascade()))) { |
|
2066 | 2066 | continue; |
2067 | 2067 | } |
2068 | 2068 | |
@@ -2105,7 +2105,7 @@ discard block |
||
2105 | 2105 | $class = $this->em->getClassMetadata(get_class($entity)); |
2106 | 2106 | |
2107 | 2107 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
2108 | - if (! ($association instanceof AssociationMetadata && in_array('merge', $association->getCascade()))) { |
|
2108 | + if ( ! ($association instanceof AssociationMetadata && in_array('merge', $association->getCascade()))) { |
|
2109 | 2109 | continue; |
2110 | 2110 | } |
2111 | 2111 | |
@@ -2144,7 +2144,7 @@ discard block |
||
2144 | 2144 | $class = $this->em->getClassMetadata(get_class($entity)); |
2145 | 2145 | |
2146 | 2146 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
2147 | - if (! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade()))) { |
|
2147 | + if ( ! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade()))) { |
|
2148 | 2148 | continue; |
2149 | 2149 | } |
2150 | 2150 | |
@@ -2160,7 +2160,7 @@ discard block |
||
2160 | 2160 | |
2161 | 2161 | case ($relatedEntities instanceof Collection): |
2162 | 2162 | case (is_array($relatedEntities)): |
2163 | - if (! ($association instanceof ToManyAssociationMetadata)) { |
|
2163 | + if ( ! ($association instanceof ToManyAssociationMetadata)) { |
|
2164 | 2164 | throw ORMInvalidArgumentException::invalidAssociation( |
2165 | 2165 | $this->em->getClassMetadata($targetEntity), |
2166 | 2166 | $association, |
@@ -2175,7 +2175,7 @@ discard block |
||
2175 | 2175 | break; |
2176 | 2176 | |
2177 | 2177 | case ($relatedEntities !== null): |
2178 | - if (! $relatedEntities instanceof $targetEntity) { |
|
2178 | + if ( ! $relatedEntities instanceof $targetEntity) { |
|
2179 | 2179 | throw ORMInvalidArgumentException::invalidAssociation( |
2180 | 2180 | $this->em->getClassMetadata($targetEntity), |
2181 | 2181 | $association, |
@@ -2206,7 +2206,7 @@ discard block |
||
2206 | 2206 | $class = $this->em->getClassMetadata(get_class($entity)); |
2207 | 2207 | |
2208 | 2208 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
2209 | - if (! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade()))) { |
|
2209 | + if ( ! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade()))) { |
|
2210 | 2210 | continue; |
2211 | 2211 | } |
2212 | 2212 | |
@@ -2289,7 +2289,7 @@ discard block |
||
2289 | 2289 | case LockMode::NONE === $lockMode: |
2290 | 2290 | case LockMode::PESSIMISTIC_READ === $lockMode: |
2291 | 2291 | case LockMode::PESSIMISTIC_WRITE === $lockMode: |
2292 | - if (!$this->em->getConnection()->isTransactionActive()) { |
|
2292 | + if ( ! $this->em->getConnection()->isTransactionActive()) { |
|
2293 | 2293 | throw TransactionRequiredException::transactionRequired(); |
2294 | 2294 | } |
2295 | 2295 | |
@@ -2533,7 +2533,7 @@ discard block |
||
2533 | 2533 | } |
2534 | 2534 | |
2535 | 2535 | foreach ($class->getDeclaredPropertiesIterator() as $field => $association) { |
2536 | - if (! ($association instanceof AssociationMetadata)) { |
|
2536 | + if ( ! ($association instanceof AssociationMetadata)) { |
|
2537 | 2537 | continue; |
2538 | 2538 | } |
2539 | 2539 | |
@@ -2582,7 +2582,7 @@ discard block |
||
2582 | 2582 | continue; |
2583 | 2583 | } |
2584 | 2584 | |
2585 | - if (! $association->isOwningSide()) { |
|
2585 | + if ( ! $association->isOwningSide()) { |
|
2586 | 2586 | // use the given entity association |
2587 | 2587 | if (isset($data[$field]) && is_object($data[$field]) && |
2588 | 2588 | isset($this->entityStates[spl_object_hash($data[$field])])) { |
@@ -2632,7 +2632,7 @@ discard block |
||
2632 | 2632 | $associatedId[$targetField] = $joinColumnValue; |
2633 | 2633 | } |
2634 | 2634 | |
2635 | - if (! $associatedId) { |
|
2635 | + if ( ! $associatedId) { |
|
2636 | 2636 | // Foreign key is NULL |
2637 | 2637 | $association->setValue($entity, null); |
2638 | 2638 | $this->originalEntityData[$oid][$field] = null; |
@@ -2641,7 +2641,7 @@ discard block |
||
2641 | 2641 | } |
2642 | 2642 | |
2643 | 2643 | // @todo guilhermeblanco Can we remove the need of this somehow? |
2644 | - if (!isset($hints['fetchMode'][$class->getClassName()][$field])) { |
|
2644 | + if ( ! isset($hints['fetchMode'][$class->getClassName()][$field])) { |
|
2645 | 2645 | $hints['fetchMode'][$class->getClassName()][$field] = $association->getFetchMode(); |
2646 | 2646 | } |
2647 | 2647 | |
@@ -2658,7 +2658,7 @@ discard block |
||
2658 | 2658 | // If this is an uninitialized proxy, we are deferring eager loads, |
2659 | 2659 | // this association is marked as eager fetch, and its an uninitialized proxy (wtf!) |
2660 | 2660 | // then we can append this entity for eager loading! |
2661 | - if (!$targetClass->isIdentifierComposite() && |
|
2661 | + if ( ! $targetClass->isIdentifierComposite() && |
|
2662 | 2662 | $newValue instanceof Proxy && |
2663 | 2663 | isset($hints[self::HINT_DEFEREAGERLOAD]) && |
2664 | 2664 | $hints['fetchMode'][$class->getClassName()][$field] === FetchMode::EAGER && |
@@ -2689,7 +2689,7 @@ discard block |
||
2689 | 2689 | break; |
2690 | 2690 | |
2691 | 2691 | // Deferred eager load only works for single identifier classes |
2692 | - case (isset($hints[self::HINT_DEFEREAGERLOAD]) && !$targetClass->isIdentifierComposite()): |
|
2692 | + case (isset($hints[self::HINT_DEFEREAGERLOAD]) && ! $targetClass->isIdentifierComposite()): |
|
2693 | 2693 | // TODO: Is there a faster approach? |
2694 | 2694 | $this->eagerLoadingEntities[$targetClass->getRootClassName()][$relatedIdHash] = current($associatedId); |
2695 | 2695 | |
@@ -3061,7 +3061,7 @@ discard block |
||
3061 | 3061 | { |
3062 | 3062 | $class = $this->em->getClassMetadata(get_class($entity)); |
3063 | 3063 | |
3064 | - if (! $class->getProperty($propertyName)) { |
|
3064 | + if ( ! $class->getProperty($propertyName)) { |
|
3065 | 3065 | return; // ignore non-persistent fields |
3066 | 3066 | } |
3067 | 3067 | |
@@ -3201,7 +3201,7 @@ discard block |
||
3201 | 3201 | */ |
3202 | 3202 | private function afterTransactionComplete() |
3203 | 3203 | { |
3204 | - $this->performCallbackOnCachedPersister(function (CachedPersister $persister) { |
|
3204 | + $this->performCallbackOnCachedPersister(function(CachedPersister $persister) { |
|
3205 | 3205 | $persister->afterTransactionComplete(); |
3206 | 3206 | }); |
3207 | 3207 | } |
@@ -3211,7 +3211,7 @@ discard block |
||
3211 | 3211 | */ |
3212 | 3212 | private function afterTransactionRolledBack() |
3213 | 3213 | { |
3214 | - $this->performCallbackOnCachedPersister(function (CachedPersister $persister) { |
|
3214 | + $this->performCallbackOnCachedPersister(function(CachedPersister $persister) { |
|
3215 | 3215 | $persister->afterTransactionRolledBack(); |
3216 | 3216 | }); |
3217 | 3217 | } |
@@ -3294,11 +3294,11 @@ discard block |
||
3294 | 3294 | */ |
3295 | 3295 | private function mergeEntityStateIntoManagedCopy($entity, $managedCopy) |
3296 | 3296 | { |
3297 | - if (! $this->isLoaded($entity)) { |
|
3297 | + if ( ! $this->isLoaded($entity)) { |
|
3298 | 3298 | return; |
3299 | 3299 | } |
3300 | 3300 | |
3301 | - if (! $this->isLoaded($managedCopy)) { |
|
3301 | + if ( ! $this->isLoaded($managedCopy)) { |
|
3302 | 3302 | $managedCopy->__load(); |
3303 | 3303 | } |
3304 | 3304 | |
@@ -3307,7 +3307,7 @@ discard block |
||
3307 | 3307 | foreach ($class->getDeclaredPropertiesIterator() as $property) { |
3308 | 3308 | switch (true) { |
3309 | 3309 | case ($property instanceof FieldMetadata): |
3310 | - if (! $property->isPrimaryKey()) { |
|
3310 | + if ( ! $property->isPrimaryKey()) { |
|
3311 | 3311 | $property->setValue($managedCopy, $property->getValue($entity)); |
3312 | 3312 | } |
3313 | 3313 | |
@@ -3329,7 +3329,7 @@ discard block |
||
3329 | 3329 | continue 2; |
3330 | 3330 | } |
3331 | 3331 | |
3332 | - if (! in_array('merge', $property->getCascade())) { |
|
3332 | + if ( ! in_array('merge', $property->getCascade())) { |
|
3333 | 3333 | if ($this->getEntityState($other) === self::STATE_DETACHED) { |
3334 | 3334 | $targetEntity = $property->getTargetEntity(); |
3335 | 3335 | $targetClass = $this->em->getClassMetadata($targetEntity); |
@@ -3361,7 +3361,7 @@ discard block |
||
3361 | 3361 | |
3362 | 3362 | $managedCol = $property->getValue($managedCopy); |
3363 | 3363 | |
3364 | - if (! $managedCol) { |
|
3364 | + if ( ! $managedCol) { |
|
3365 | 3365 | $managedCol = $property->wrap($managedCopy, [], $this->em); |
3366 | 3366 | |
3367 | 3367 | $property->setValue($managedCopy, $managedCol); |
@@ -3371,7 +3371,7 @@ discard block |
||
3371 | 3371 | $managedCol->initialize(); |
3372 | 3372 | |
3373 | 3373 | // clear and set dirty a managed collection if its not also the same collection to merge from. |
3374 | - if (! $managedCol->isEmpty() && $managedCol !== $mergeCol) { |
|
3374 | + if ( ! $managedCol->isEmpty() && $managedCol !== $mergeCol) { |
|
3375 | 3375 | $managedCol->unwrap()->clear(); |
3376 | 3376 | $managedCol->setDirty(true); |
3377 | 3377 |
@@ -38,7 +38,6 @@ |
||
38 | 38 | * Dequeue an exception for a specific method invocation |
39 | 39 | * |
40 | 40 | * @param string $method |
41 | - * @param mixed $default |
|
42 | 41 | * |
43 | 42 | * @return mixed |
44 | 43 | */ |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\Mocks; |
6 | 6 |
@@ -29,6 +29,9 @@ |
||
29 | 29 | */ |
30 | 30 | public $tokens; |
31 | 31 | |
32 | + /** |
|
33 | + * @param string $name |
|
34 | + */ |
|
32 | 35 | public function __construct($name) |
33 | 36 | { |
34 | 37 | $this->name = $name; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\Models\Cache; |
6 | 6 |
@@ -51,6 +51,9 @@ |
||
51 | 51 | */ |
52 | 52 | public $complexAction; |
53 | 53 | |
54 | + /** |
|
55 | + * @param string $token |
|
56 | + */ |
|
54 | 57 | public function __construct($token, Client $client = null) |
55 | 58 | { |
56 | 59 | $this->logins = new ArrayCollection(); |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\Models\Cache; |
6 | 6 |
@@ -19,6 +19,9 @@ |
||
19 | 19 | */ |
20 | 20 | private $brand; |
21 | 21 | |
22 | + /** |
|
23 | + * @param string $brand |
|
24 | + */ |
|
22 | 25 | public function __construct($brand = null) { |
23 | 26 | $this->brand = $brand; |
24 | 27 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\Models\Company; |
6 | 6 |
@@ -79,6 +79,9 @@ discard block |
||
79 | 79 | return $this->hoursWorked; |
80 | 80 | } |
81 | 81 | |
82 | + /** |
|
83 | + * @param integer $hoursWorked |
|
84 | + */ |
|
82 | 85 | public function setHoursWorked($hoursWorked) |
83 | 86 | { |
84 | 87 | $this->hoursWorked = $hoursWorked; |
@@ -89,6 +92,9 @@ discard block |
||
89 | 92 | return $this->pricePerHour; |
90 | 93 | } |
91 | 94 | |
95 | + /** |
|
96 | + * @param integer $pricePerHour |
|
97 | + */ |
|
92 | 98 | public function setPricePerHour($pricePerHour) |
93 | 99 | { |
94 | 100 | $this->pricePerHour = $pricePerHour; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\Models\Company; |
6 | 6 |
@@ -4,9 +4,7 @@ |
||
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\Models\Company; |
6 | 6 | |
7 | -use Doctrine\DBAL\Types\Type; |
|
8 | 7 | use Doctrine\ORM\Annotation as ORM; |
9 | -use Doctrine\ORM\Mapping; |
|
10 | 8 | |
11 | 9 | /** |
12 | 10 | * @ORM\Entity |
@@ -33,6 +33,9 @@ discard block |
||
33 | 33 | */ |
34 | 34 | private $links; |
35 | 35 | |
36 | + /** |
|
37 | + * @param string $title |
|
38 | + */ |
|
36 | 39 | public function __construct($title) |
37 | 40 | { |
38 | 41 | $this->title = $title; |
@@ -60,6 +63,10 @@ discard block |
||
60 | 63 | return $this->references; |
61 | 64 | } |
62 | 65 | |
66 | + /** |
|
67 | + * @param string $language |
|
68 | + * @param string $title |
|
69 | + */ |
|
63 | 70 | public function addTranslation($language, $title) |
64 | 71 | { |
65 | 72 | $this->translations[] = new DDC117Translation($this, $language, $title); |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\Models\DDC117; |
6 | 6 |
@@ -23,6 +23,11 @@ |
||
23 | 23 | */ |
24 | 24 | public $target; |
25 | 25 | |
26 | + /** |
|
27 | + * @param DDC117Article $source |
|
28 | + * @param DDC117Article $target |
|
29 | + * @param string $description |
|
30 | + */ |
|
26 | 31 | public function __construct($source, $target, $description) |
27 | 32 | { |
28 | 33 | $this->source = $source; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\Models\DDC117; |
6 | 6 |
@@ -59,7 +59,7 @@ |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
62 | - * @return ArrayCollection |
|
62 | + * @return DDC3579Admin[] |
|
63 | 63 | */ |
64 | 64 | public function getAdmins() |
65 | 65 | { |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\Models\DDC3579; |
6 | 6 |