@@ -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 | |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | // Entity deletions come last and need to be in reverse commit order |
370 | 370 | if ($this->entityDeletions) { |
371 | 371 | foreach (array_reverse($commitOrder) as $committedEntityName) { |
372 | - if (! $this->entityDeletions) { |
|
372 | + if ( ! $this->entityDeletions) { |
|
373 | 373 | break; // just a performance optimisation |
374 | 374 | } |
375 | 375 | |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | $oid = spl_object_hash($entity); |
455 | 455 | $data = []; |
456 | 456 | |
457 | - if (!isset($this->entityChangeSets[$oid])) { |
|
457 | + if ( ! isset($this->entityChangeSets[$oid])) { |
|
458 | 458 | return $data; |
459 | 459 | } |
460 | 460 | |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | || ! $class->getProperty($name) instanceof FieldMetadata |
538 | 538 | || ! $class->getProperty($name)->hasValueGenerator() |
539 | 539 | || $class->getProperty($name)->getValueGenerator()->getType() !== GeneratorType::IDENTITY |
540 | - ) && (! $class->isVersioned() || $name !== $class->versionProperty->getName())) { |
|
540 | + ) && ( ! $class->isVersioned() || $name !== $class->versionProperty->getName())) { |
|
541 | 541 | $actualData[$name] = $value; |
542 | 542 | } |
543 | 543 | } |
@@ -591,7 +591,7 @@ discard block |
||
591 | 591 | if ($owner === null) { // cloned |
592 | 592 | $actualValue->setOwner($entity, $property); |
593 | 593 | } else if ($owner !== $entity) { // no clone, we have to fix |
594 | - if (! $actualValue->isInitialized()) { |
|
594 | + if ( ! $actualValue->isInitialized()) { |
|
595 | 595 | $actualValue->initialize(); // we have to do this otherwise the cols share state |
596 | 596 | } |
597 | 597 | |
@@ -631,7 +631,7 @@ discard block |
||
631 | 631 | // A PersistentCollection was de-referenced, so delete it. |
632 | 632 | $coid = spl_object_hash($orgValue); |
633 | 633 | |
634 | - if (!isset($this->collectionDeletions[$coid])) { |
|
634 | + if ( ! isset($this->collectionDeletions[$coid])) { |
|
635 | 635 | $this->collectionDeletions[$coid] = $orgValue; |
636 | 636 | $changeSet[$propName] = $orgValue; // Signal changeset, to-many associations will be ignored |
637 | 637 | } |
@@ -653,7 +653,7 @@ discard block |
||
653 | 653 | |
654 | 654 | // Look for changes in associations of the entity |
655 | 655 | foreach ($class->getDeclaredPropertiesIterator() as $property) { |
656 | - if (! ($property instanceof AssociationMetadata) || ($value = $property->getValue($entity)) === null) { |
|
656 | + if ( ! ($property instanceof AssociationMetadata) || ($value = $property->getValue($entity)) === null) { |
|
657 | 657 | continue; |
658 | 658 | } |
659 | 659 | |
@@ -757,13 +757,13 @@ discard block |
||
757 | 757 | $targetClass = $this->em->getClassMetadata($targetEntity); |
758 | 758 | |
759 | 759 | foreach ($unwrappedValue as $key => $entry) { |
760 | - if (! ($entry instanceof $targetEntity)) { |
|
760 | + if ( ! ($entry instanceof $targetEntity)) { |
|
761 | 761 | throw ORMInvalidArgumentException::invalidAssociation($targetClass, $association, $entry); |
762 | 762 | } |
763 | 763 | |
764 | 764 | $state = $this->getEntityState($entry, self::STATE_NEW); |
765 | 765 | |
766 | - if (! ($entry instanceof $targetEntity)) { |
|
766 | + if ( ! ($entry instanceof $targetEntity)) { |
|
767 | 767 | throw ORMException::unexpectedAssociationValue( |
768 | 768 | $association->getSourceEntity(), |
769 | 769 | $association->getName(), |
@@ -822,7 +822,7 @@ discard block |
||
822 | 822 | $persister = $this->getEntityPersister($class->getClassName()); |
823 | 823 | $generationPlan->executeImmediate($this->em, $entity); |
824 | 824 | |
825 | - if (! $generationPlan->containsDeferred()) { |
|
825 | + if ( ! $generationPlan->containsDeferred()) { |
|
826 | 826 | $id = $this->em->getIdentifierFlattener()->flattenIdentifier($class, $persister->getIdentifier($entity)); |
827 | 827 | $this->entityIdentifiers[$oid] = $id; |
828 | 828 | } |
@@ -855,7 +855,7 @@ discard block |
||
855 | 855 | { |
856 | 856 | $oid = spl_object_hash($entity); |
857 | 857 | |
858 | - if (! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) { |
|
858 | + if ( ! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) { |
|
859 | 859 | throw ORMInvalidArgumentException::entityNotManaged($entity); |
860 | 860 | } |
861 | 861 | |
@@ -877,7 +877,7 @@ discard block |
||
877 | 877 | break; |
878 | 878 | |
879 | 879 | case ($property instanceof FieldMetadata): |
880 | - if (! $property->isPrimaryKey() |
|
880 | + if ( ! $property->isPrimaryKey() |
|
881 | 881 | || ! $property->getValueGenerator() |
882 | 882 | || $property->getValueGenerator()->getType() !== GeneratorType::IDENTITY) { |
883 | 883 | $actualData[$name] = $property->getValue($entity); |
@@ -1030,7 +1030,7 @@ discard block |
||
1030 | 1030 | // Entity with this $oid after deletion treated as NEW, even if the $oid |
1031 | 1031 | // is obtained by a new entity because the old one went out of scope. |
1032 | 1032 | //$this->entityStates[$oid] = self::STATE_NEW; |
1033 | - if (! $class->isIdentifierComposite()) { |
|
1033 | + if ( ! $class->isIdentifierComposite()) { |
|
1034 | 1034 | $property = $class->getProperty($class->getSingleIdentifierFieldName()); |
1035 | 1035 | |
1036 | 1036 | if ($property instanceof FieldMetadata && $property->hasValueGenerator()) { |
@@ -1083,7 +1083,7 @@ discard block |
||
1083 | 1083 | // Calculate dependencies for new nodes |
1084 | 1084 | while ($class = array_pop($newNodes)) { |
1085 | 1085 | foreach ($class->getDeclaredPropertiesIterator() as $property) { |
1086 | - if (! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) { |
|
1086 | + if ( ! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) { |
|
1087 | 1087 | continue; |
1088 | 1088 | } |
1089 | 1089 | |
@@ -1097,7 +1097,7 @@ discard block |
||
1097 | 1097 | |
1098 | 1098 | $weight = ! array_filter( |
1099 | 1099 | $property->getJoinColumns(), |
1100 | - function (JoinColumnMetadata $joinColumn) { return $joinColumn->isNullable(); } |
|
1100 | + function(JoinColumnMetadata $joinColumn) { return $joinColumn->isNullable(); } |
|
1101 | 1101 | ); |
1102 | 1102 | |
1103 | 1103 | $calc->addDependency($targetClass->getClassName(), $class->getClassName(), $weight); |
@@ -1391,7 +1391,7 @@ discard block |
||
1391 | 1391 | $persister = $this->getEntityPersister($class->getClassName()); |
1392 | 1392 | $id = $persister->getIdentifier($entity); |
1393 | 1393 | |
1394 | - if (! $id) { |
|
1394 | + if ( ! $id) { |
|
1395 | 1395 | return self::STATE_NEW; |
1396 | 1396 | } |
1397 | 1397 | |
@@ -1626,7 +1626,7 @@ discard block |
||
1626 | 1626 | throw ORMInvalidArgumentException::detachedEntityCannot($entity, "persisted"); |
1627 | 1627 | |
1628 | 1628 | default: |
1629 | - throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); |
|
1629 | + throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity)); |
|
1630 | 1630 | } |
1631 | 1631 | |
1632 | 1632 | $this->cascadePersist($entity, $visited); |
@@ -1696,7 +1696,7 @@ discard block |
||
1696 | 1696 | case self::STATE_DETACHED: |
1697 | 1697 | throw ORMInvalidArgumentException::detachedEntityCannot($entity, "removed"); |
1698 | 1698 | default: |
1699 | - throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); |
|
1699 | + throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity)); |
|
1700 | 1700 | } |
1701 | 1701 | |
1702 | 1702 | } |
@@ -1785,7 +1785,7 @@ discard block |
||
1785 | 1785 | if ($managedCopy === null) { |
1786 | 1786 | // If the identifier is ASSIGNED, it is NEW, otherwise an error |
1787 | 1787 | // since the managed entity was not found. |
1788 | - if (! $class->isIdentifierComposite() |
|
1788 | + if ( ! $class->isIdentifierComposite() |
|
1789 | 1789 | && $class->getProperty($class->getSingleIdentifierFieldName()) instanceof FieldMetadata |
1790 | 1790 | && $class->getProperty($class->getSingleIdentifierFieldName())->hasValueGenerator()) { |
1791 | 1791 | throw EntityNotFoundException::fromClassNameAndIdentifier( |
@@ -1836,7 +1836,7 @@ discard block |
||
1836 | 1836 | */ |
1837 | 1837 | private function ensureVersionMatch(ClassMetadata $class, $entity, $managedCopy) |
1838 | 1838 | { |
1839 | - if (! ($class->isVersioned() && $this->isLoaded($managedCopy) && $this->isLoaded($entity))) { |
|
1839 | + if ( ! ($class->isVersioned() && $this->isLoaded($managedCopy) && $this->isLoaded($entity))) { |
|
1840 | 1840 | return; |
1841 | 1841 | } |
1842 | 1842 | |
@@ -1860,7 +1860,7 @@ discard block |
||
1860 | 1860 | */ |
1861 | 1861 | private function isLoaded($entity) |
1862 | 1862 | { |
1863 | - return !($entity instanceof Proxy) || $entity->__isInitialized(); |
|
1863 | + return ! ($entity instanceof Proxy) || $entity->__isInitialized(); |
|
1864 | 1864 | } |
1865 | 1865 | |
1866 | 1866 | /** |
@@ -2022,7 +2022,7 @@ discard block |
||
2022 | 2022 | $class = $this->em->getClassMetadata(get_class($entity)); |
2023 | 2023 | |
2024 | 2024 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
2025 | - if (! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade()))) { |
|
2025 | + if ( ! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade()))) { |
|
2026 | 2026 | continue; |
2027 | 2027 | } |
2028 | 2028 | |
@@ -2064,7 +2064,7 @@ discard block |
||
2064 | 2064 | $class = $this->em->getClassMetadata(get_class($entity)); |
2065 | 2065 | |
2066 | 2066 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
2067 | - if (! ($association instanceof AssociationMetadata && in_array('detach', $association->getCascade()))) { |
|
2067 | + if ( ! ($association instanceof AssociationMetadata && in_array('detach', $association->getCascade()))) { |
|
2068 | 2068 | continue; |
2069 | 2069 | } |
2070 | 2070 | |
@@ -2107,7 +2107,7 @@ discard block |
||
2107 | 2107 | $class = $this->em->getClassMetadata(get_class($entity)); |
2108 | 2108 | |
2109 | 2109 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
2110 | - if (! ($association instanceof AssociationMetadata && in_array('merge', $association->getCascade()))) { |
|
2110 | + if ( ! ($association instanceof AssociationMetadata && in_array('merge', $association->getCascade()))) { |
|
2111 | 2111 | continue; |
2112 | 2112 | } |
2113 | 2113 | |
@@ -2146,7 +2146,7 @@ discard block |
||
2146 | 2146 | $class = $this->em->getClassMetadata(get_class($entity)); |
2147 | 2147 | |
2148 | 2148 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
2149 | - if (! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade()))) { |
|
2149 | + if ( ! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade()))) { |
|
2150 | 2150 | continue; |
2151 | 2151 | } |
2152 | 2152 | |
@@ -2162,7 +2162,7 @@ discard block |
||
2162 | 2162 | |
2163 | 2163 | case ($relatedEntities instanceof Collection): |
2164 | 2164 | case (is_array($relatedEntities)): |
2165 | - if (! ($association instanceof ToManyAssociationMetadata)) { |
|
2165 | + if ( ! ($association instanceof ToManyAssociationMetadata)) { |
|
2166 | 2166 | throw ORMInvalidArgumentException::invalidAssociation( |
2167 | 2167 | $this->em->getClassMetadata($targetEntity), |
2168 | 2168 | $association, |
@@ -2177,7 +2177,7 @@ discard block |
||
2177 | 2177 | break; |
2178 | 2178 | |
2179 | 2179 | case ($relatedEntities !== null): |
2180 | - if (! $relatedEntities instanceof $targetEntity) { |
|
2180 | + if ( ! $relatedEntities instanceof $targetEntity) { |
|
2181 | 2181 | throw ORMInvalidArgumentException::invalidAssociation( |
2182 | 2182 | $this->em->getClassMetadata($targetEntity), |
2183 | 2183 | $association, |
@@ -2208,7 +2208,7 @@ discard block |
||
2208 | 2208 | $class = $this->em->getClassMetadata(get_class($entity)); |
2209 | 2209 | |
2210 | 2210 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
2211 | - if (! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade()))) { |
|
2211 | + if ( ! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade()))) { |
|
2212 | 2212 | continue; |
2213 | 2213 | } |
2214 | 2214 | |
@@ -2291,7 +2291,7 @@ discard block |
||
2291 | 2291 | case LockMode::NONE === $lockMode: |
2292 | 2292 | case LockMode::PESSIMISTIC_READ === $lockMode: |
2293 | 2293 | case LockMode::PESSIMISTIC_WRITE === $lockMode: |
2294 | - if (!$this->em->getConnection()->isTransactionActive()) { |
|
2294 | + if ( ! $this->em->getConnection()->isTransactionActive()) { |
|
2295 | 2295 | throw TransactionRequiredException::transactionRequired(); |
2296 | 2296 | } |
2297 | 2297 | |
@@ -2535,7 +2535,7 @@ discard block |
||
2535 | 2535 | } |
2536 | 2536 | |
2537 | 2537 | foreach ($class->getDeclaredPropertiesIterator() as $field => $association) { |
2538 | - if (! ($association instanceof AssociationMetadata)) { |
|
2538 | + if ( ! ($association instanceof AssociationMetadata)) { |
|
2539 | 2539 | continue; |
2540 | 2540 | } |
2541 | 2541 | |
@@ -2584,7 +2584,7 @@ discard block |
||
2584 | 2584 | continue; |
2585 | 2585 | } |
2586 | 2586 | |
2587 | - if (! $association->isOwningSide()) { |
|
2587 | + if ( ! $association->isOwningSide()) { |
|
2588 | 2588 | // use the given entity association |
2589 | 2589 | if (isset($data[$field]) && is_object($data[$field]) && |
2590 | 2590 | isset($this->entityStates[spl_object_hash($data[$field])])) { |
@@ -2634,7 +2634,7 @@ discard block |
||
2634 | 2634 | $associatedId[$targetField] = $joinColumnValue; |
2635 | 2635 | } |
2636 | 2636 | |
2637 | - if (! $associatedId) { |
|
2637 | + if ( ! $associatedId) { |
|
2638 | 2638 | // Foreign key is NULL |
2639 | 2639 | $association->setValue($entity, null); |
2640 | 2640 | $this->originalEntityData[$oid][$field] = null; |
@@ -2643,7 +2643,7 @@ discard block |
||
2643 | 2643 | } |
2644 | 2644 | |
2645 | 2645 | // @todo guilhermeblanco Can we remove the need of this somehow? |
2646 | - if (!isset($hints['fetchMode'][$class->getClassName()][$field])) { |
|
2646 | + if ( ! isset($hints['fetchMode'][$class->getClassName()][$field])) { |
|
2647 | 2647 | $hints['fetchMode'][$class->getClassName()][$field] = $association->getFetchMode(); |
2648 | 2648 | } |
2649 | 2649 | |
@@ -2660,7 +2660,7 @@ discard block |
||
2660 | 2660 | // If this is an uninitialized proxy, we are deferring eager loads, |
2661 | 2661 | // this association is marked as eager fetch, and its an uninitialized proxy (wtf!) |
2662 | 2662 | // then we can append this entity for eager loading! |
2663 | - if (!$targetClass->isIdentifierComposite() && |
|
2663 | + if ( ! $targetClass->isIdentifierComposite() && |
|
2664 | 2664 | $newValue instanceof Proxy && |
2665 | 2665 | isset($hints[self::HINT_DEFEREAGERLOAD]) && |
2666 | 2666 | $hints['fetchMode'][$class->getClassName()][$field] === FetchMode::EAGER && |
@@ -2691,7 +2691,7 @@ discard block |
||
2691 | 2691 | break; |
2692 | 2692 | |
2693 | 2693 | // Deferred eager load only works for single identifier classes |
2694 | - case (isset($hints[self::HINT_DEFEREAGERLOAD]) && !$targetClass->isIdentifierComposite()): |
|
2694 | + case (isset($hints[self::HINT_DEFEREAGERLOAD]) && ! $targetClass->isIdentifierComposite()): |
|
2695 | 2695 | // TODO: Is there a faster approach? |
2696 | 2696 | $this->eagerLoadingEntities[$targetClass->getRootClassName()][$relatedIdHash] = current($associatedId); |
2697 | 2697 | |
@@ -3063,7 +3063,7 @@ discard block |
||
3063 | 3063 | { |
3064 | 3064 | $class = $this->em->getClassMetadata(get_class($entity)); |
3065 | 3065 | |
3066 | - if (! $class->getProperty($propertyName)) { |
|
3066 | + if ( ! $class->getProperty($propertyName)) { |
|
3067 | 3067 | return; // ignore non-persistent fields |
3068 | 3068 | } |
3069 | 3069 | |
@@ -3203,7 +3203,7 @@ discard block |
||
3203 | 3203 | */ |
3204 | 3204 | private function afterTransactionComplete() |
3205 | 3205 | { |
3206 | - $this->performCallbackOnCachedPersister(function (CachedPersister $persister) { |
|
3206 | + $this->performCallbackOnCachedPersister(function(CachedPersister $persister) { |
|
3207 | 3207 | $persister->afterTransactionComplete(); |
3208 | 3208 | }); |
3209 | 3209 | } |
@@ -3213,7 +3213,7 @@ discard block |
||
3213 | 3213 | */ |
3214 | 3214 | private function afterTransactionRolledBack() |
3215 | 3215 | { |
3216 | - $this->performCallbackOnCachedPersister(function (CachedPersister $persister) { |
|
3216 | + $this->performCallbackOnCachedPersister(function(CachedPersister $persister) { |
|
3217 | 3217 | $persister->afterTransactionRolledBack(); |
3218 | 3218 | }); |
3219 | 3219 | } |
@@ -3296,11 +3296,11 @@ discard block |
||
3296 | 3296 | */ |
3297 | 3297 | private function mergeEntityStateIntoManagedCopy($entity, $managedCopy) |
3298 | 3298 | { |
3299 | - if (! $this->isLoaded($entity)) { |
|
3299 | + if ( ! $this->isLoaded($entity)) { |
|
3300 | 3300 | return; |
3301 | 3301 | } |
3302 | 3302 | |
3303 | - if (! $this->isLoaded($managedCopy)) { |
|
3303 | + if ( ! $this->isLoaded($managedCopy)) { |
|
3304 | 3304 | $managedCopy->__load(); |
3305 | 3305 | } |
3306 | 3306 | |
@@ -3309,7 +3309,7 @@ discard block |
||
3309 | 3309 | foreach ($class->getDeclaredPropertiesIterator() as $property) { |
3310 | 3310 | switch (true) { |
3311 | 3311 | case ($property instanceof FieldMetadata): |
3312 | - if (! $property->isPrimaryKey()) { |
|
3312 | + if ( ! $property->isPrimaryKey()) { |
|
3313 | 3313 | $property->setValue($managedCopy, $property->getValue($entity)); |
3314 | 3314 | } |
3315 | 3315 | |
@@ -3331,7 +3331,7 @@ discard block |
||
3331 | 3331 | continue 2; |
3332 | 3332 | } |
3333 | 3333 | |
3334 | - if (! in_array('merge', $property->getCascade())) { |
|
3334 | + if ( ! in_array('merge', $property->getCascade())) { |
|
3335 | 3335 | if ($this->getEntityState($other) === self::STATE_DETACHED) { |
3336 | 3336 | $targetEntity = $property->getTargetEntity(); |
3337 | 3337 | $targetClass = $this->em->getClassMetadata($targetEntity); |
@@ -3363,7 +3363,7 @@ discard block |
||
3363 | 3363 | |
3364 | 3364 | $managedCol = $property->getValue($managedCopy); |
3365 | 3365 | |
3366 | - if (! $managedCol) { |
|
3366 | + if ( ! $managedCol) { |
|
3367 | 3367 | $managedCol = $property->wrap($managedCopy, [], $this->em); |
3368 | 3368 | |
3369 | 3369 | $property->setValue($managedCopy, $managedCol); |
@@ -3373,7 +3373,7 @@ discard block |
||
3373 | 3373 | $managedCol->initialize(); |
3374 | 3374 | |
3375 | 3375 | // clear and set dirty a managed collection if its not also the same collection to merge from. |
3376 | - if (! $managedCol->isEmpty() && $managedCol !== $mergeCol) { |
|
3376 | + if ( ! $managedCol->isEmpty() && $managedCol !== $mergeCol) { |
|
3377 | 3377 | $managedCol->unwrap()->clear(); |
3378 | 3378 | $managedCol->setDirty(true); |
3379 | 3379 |
@@ -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 |