@@ -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 |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | * <http://www.doctrine-project.org>. |
| 18 | 18 | */ |
| 19 | 19 | |
| 20 | -declare(strict_types=1); |
|
| 20 | +declare(strict_types = 1); |
|
| 21 | 21 | |
| 22 | 22 | namespace Doctrine\ORM; |
| 23 | 23 | |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | $oid = spl_object_hash($entity); |
| 468 | 468 | $data = []; |
| 469 | 469 | |
| 470 | - if (!isset($this->entityChangeSets[$oid])) { |
|
| 470 | + if ( ! isset($this->entityChangeSets[$oid])) { |
|
| 471 | 471 | return $data; |
| 472 | 472 | } |
| 473 | 473 | |
@@ -550,7 +550,7 @@ discard block |
||
| 550 | 550 | || ! $class->getProperty($name) instanceof FieldMetadata |
| 551 | 551 | || ! $class->getProperty($name)->hasValueGenerator() |
| 552 | 552 | || $class->getProperty($name)->getValueGenerator()->getType() !== GeneratorType::IDENTITY |
| 553 | - ) && (! $class->isVersioned() || $name !== $class->versionProperty->getName())) { |
|
| 553 | + ) && ( ! $class->isVersioned() || $name !== $class->versionProperty->getName())) { |
|
| 554 | 554 | $actualData[$name] = $value; |
| 555 | 555 | } |
| 556 | 556 | } |
@@ -604,7 +604,7 @@ discard block |
||
| 604 | 604 | if ($owner === null) { // cloned |
| 605 | 605 | $actualValue->setOwner($entity, $property); |
| 606 | 606 | } else if ($owner !== $entity) { // no clone, we have to fix |
| 607 | - if (! $actualValue->isInitialized()) { |
|
| 607 | + if ( ! $actualValue->isInitialized()) { |
|
| 608 | 608 | $actualValue->initialize(); // we have to do this otherwise the cols share state |
| 609 | 609 | } |
| 610 | 610 | |
@@ -644,7 +644,7 @@ discard block |
||
| 644 | 644 | // A PersistentCollection was de-referenced, so delete it. |
| 645 | 645 | $coid = spl_object_hash($orgValue); |
| 646 | 646 | |
| 647 | - if (!isset($this->collectionDeletions[$coid])) { |
|
| 647 | + if ( ! isset($this->collectionDeletions[$coid])) { |
|
| 648 | 648 | $this->collectionDeletions[$coid] = $orgValue; |
| 649 | 649 | $changeSet[$propName] = $orgValue; // Signal changeset, to-many associations will be ignored |
| 650 | 650 | } |
@@ -666,7 +666,7 @@ discard block |
||
| 666 | 666 | |
| 667 | 667 | // Look for changes in associations of the entity |
| 668 | 668 | foreach ($class->getProperties() as $property) { |
| 669 | - if (! ($property instanceof AssociationMetadata) || ($value = $property->getValue($entity)) === null) { |
|
| 669 | + if ( ! ($property instanceof AssociationMetadata) || ($value = $property->getValue($entity)) === null) { |
|
| 670 | 670 | continue; |
| 671 | 671 | } |
| 672 | 672 | |
@@ -770,13 +770,13 @@ discard block |
||
| 770 | 770 | $targetClass = $this->em->getClassMetadata($targetEntity); |
| 771 | 771 | |
| 772 | 772 | foreach ($unwrappedValue as $key => $entry) { |
| 773 | - if (! ($entry instanceof $targetEntity)) { |
|
| 773 | + if ( ! ($entry instanceof $targetEntity)) { |
|
| 774 | 774 | throw ORMInvalidArgumentException::invalidAssociation($targetClass, $association, $entry); |
| 775 | 775 | } |
| 776 | 776 | |
| 777 | 777 | $state = $this->getEntityState($entry, self::STATE_NEW); |
| 778 | 778 | |
| 779 | - if (! ($entry instanceof $targetEntity)) { |
|
| 779 | + if ( ! ($entry instanceof $targetEntity)) { |
|
| 780 | 780 | throw ORMException::unexpectedAssociationValue( |
| 781 | 781 | $association->getSourceEntity(), |
| 782 | 782 | $association->getName(), |
@@ -835,7 +835,7 @@ discard block |
||
| 835 | 835 | $persister = $this->getEntityPersister($class->getClassName()); |
| 836 | 836 | $generationPlan->executeImmediate($this->em, $entity); |
| 837 | 837 | |
| 838 | - if (! $generationPlan->containsDeferred()) { |
|
| 838 | + if ( ! $generationPlan->containsDeferred()) { |
|
| 839 | 839 | $id = $this->em->getIdentifierFlattener()->flattenIdentifier($class, $persister->getIdentifier($entity)); |
| 840 | 840 | $this->entityIdentifiers[$oid] = $id; |
| 841 | 841 | } |
@@ -889,7 +889,7 @@ discard block |
||
| 889 | 889 | break; |
| 890 | 890 | |
| 891 | 891 | case ($property instanceof FieldMetadata): |
| 892 | - if (! $property->isPrimaryKey() |
|
| 892 | + if ( ! $property->isPrimaryKey() |
|
| 893 | 893 | || ! $property->getValueGenerator() |
| 894 | 894 | || $property->getValueGenerator()->getType() !== GeneratorType::IDENTITY) { |
| 895 | 895 | $actualData[$name] = $property->getValue($entity); |
@@ -1042,7 +1042,7 @@ discard block |
||
| 1042 | 1042 | // Entity with this $oid after deletion treated as NEW, even if the $oid |
| 1043 | 1043 | // is obtained by a new entity because the old one went out of scope. |
| 1044 | 1044 | //$this->entityStates[$oid] = self::STATE_NEW; |
| 1045 | - if (! $class->isIdentifierComposite()) { |
|
| 1045 | + if ( ! $class->isIdentifierComposite()) { |
|
| 1046 | 1046 | $property = $class->getProperty($class->getSingleIdentifierFieldName()); |
| 1047 | 1047 | |
| 1048 | 1048 | if ($property instanceof FieldMetadata && $property->hasValueGenerator()) { |
@@ -1095,7 +1095,7 @@ discard block |
||
| 1095 | 1095 | // Calculate dependencies for new nodes |
| 1096 | 1096 | while ($class = array_pop($newNodes)) { |
| 1097 | 1097 | foreach ($class->getProperties() as $property) { |
| 1098 | - if (! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) { |
|
| 1098 | + if ( ! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) { |
|
| 1099 | 1099 | continue; |
| 1100 | 1100 | } |
| 1101 | 1101 | |
@@ -1110,7 +1110,7 @@ discard block |
||
| 1110 | 1110 | $weight = count( |
| 1111 | 1111 | array_filter( |
| 1112 | 1112 | $property->getJoinColumns(), |
| 1113 | - function (JoinColumnMetadata $joinColumn) { return $joinColumn->isNullable(); } |
|
| 1113 | + function(JoinColumnMetadata $joinColumn) { return $joinColumn->isNullable(); } |
|
| 1114 | 1114 | ) |
| 1115 | 1115 | ) === 0; |
| 1116 | 1116 | |
@@ -1405,7 +1405,7 @@ discard block |
||
| 1405 | 1405 | $persister = $this->getEntityPersister($class->getClassName()); |
| 1406 | 1406 | $id = $persister->getIdentifier($entity); |
| 1407 | 1407 | |
| 1408 | - if (! $id) { |
|
| 1408 | + if ( ! $id) { |
|
| 1409 | 1409 | return self::STATE_NEW; |
| 1410 | 1410 | } |
| 1411 | 1411 | |
@@ -1640,7 +1640,7 @@ discard block |
||
| 1640 | 1640 | throw ORMInvalidArgumentException::detachedEntityCannot($entity, "persisted"); |
| 1641 | 1641 | |
| 1642 | 1642 | default: |
| 1643 | - throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); |
|
| 1643 | + throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity)); |
|
| 1644 | 1644 | } |
| 1645 | 1645 | |
| 1646 | 1646 | $this->cascadePersist($entity, $visited); |
@@ -1710,7 +1710,7 @@ discard block |
||
| 1710 | 1710 | case self::STATE_DETACHED: |
| 1711 | 1711 | throw ORMInvalidArgumentException::detachedEntityCannot($entity, "removed"); |
| 1712 | 1712 | default: |
| 1713 | - throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); |
|
| 1713 | + throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity)); |
|
| 1714 | 1714 | } |
| 1715 | 1715 | |
| 1716 | 1716 | } |
@@ -1799,7 +1799,7 @@ discard block |
||
| 1799 | 1799 | if ($managedCopy === null) { |
| 1800 | 1800 | // If the identifier is ASSIGNED, it is NEW, otherwise an error |
| 1801 | 1801 | // since the managed entity was not found. |
| 1802 | - if (! $class->isIdentifierComposite() |
|
| 1802 | + if ( ! $class->isIdentifierComposite() |
|
| 1803 | 1803 | && $class->getProperty($class->getSingleIdentifierFieldName()) instanceof FieldMetadata |
| 1804 | 1804 | && $class->getProperty($class->getSingleIdentifierFieldName())->hasValueGenerator()) { |
| 1805 | 1805 | throw EntityNotFoundException::fromClassNameAndIdentifier( |
@@ -1850,7 +1850,7 @@ discard block |
||
| 1850 | 1850 | */ |
| 1851 | 1851 | private function ensureVersionMatch(ClassMetadata $class, $entity, $managedCopy) |
| 1852 | 1852 | { |
| 1853 | - if (! ($class->isVersioned() && $this->isLoaded($managedCopy) && $this->isLoaded($entity))) { |
|
| 1853 | + if ( ! ($class->isVersioned() && $this->isLoaded($managedCopy) && $this->isLoaded($entity))) { |
|
| 1854 | 1854 | return; |
| 1855 | 1855 | } |
| 1856 | 1856 | |
@@ -1874,7 +1874,7 @@ discard block |
||
| 1874 | 1874 | */ |
| 1875 | 1875 | private function isLoaded($entity) |
| 1876 | 1876 | { |
| 1877 | - return !($entity instanceof Proxy) || $entity->__isInitialized(); |
|
| 1877 | + return ! ($entity instanceof Proxy) || $entity->__isInitialized(); |
|
| 1878 | 1878 | } |
| 1879 | 1879 | |
| 1880 | 1880 | /** |
@@ -2036,7 +2036,7 @@ discard block |
||
| 2036 | 2036 | $class = $this->em->getClassMetadata(get_class($entity)); |
| 2037 | 2037 | $associations = array_filter( |
| 2038 | 2038 | $class->getProperties(), |
| 2039 | - function (Property $property) { |
|
| 2039 | + function(Property $property) { |
|
| 2040 | 2040 | return $property instanceof AssociationMetadata && in_array('refresh', $property->getCascade()); |
| 2041 | 2041 | } |
| 2042 | 2042 | ); |
@@ -2080,7 +2080,7 @@ discard block |
||
| 2080 | 2080 | $class = $this->em->getClassMetadata(get_class($entity)); |
| 2081 | 2081 | $associations = array_filter( |
| 2082 | 2082 | $class->getProperties(), |
| 2083 | - function (Property $property) { |
|
| 2083 | + function(Property $property) { |
|
| 2084 | 2084 | return $property instanceof AssociationMetadata && in_array('detach', $property->getCascade()); |
| 2085 | 2085 | } |
| 2086 | 2086 | ); |
@@ -2125,7 +2125,7 @@ discard block |
||
| 2125 | 2125 | $class = $this->em->getClassMetadata(get_class($entity)); |
| 2126 | 2126 | $associations = array_filter( |
| 2127 | 2127 | $class->getProperties(), |
| 2128 | - function (Property $property) { |
|
| 2128 | + function(Property $property) { |
|
| 2129 | 2129 | return $property instanceof AssociationMetadata && in_array('merge', $property->getCascade()); |
| 2130 | 2130 | } |
| 2131 | 2131 | ); |
@@ -2166,7 +2166,7 @@ discard block |
||
| 2166 | 2166 | $class = $this->em->getClassMetadata(get_class($entity)); |
| 2167 | 2167 | $associations = array_filter( |
| 2168 | 2168 | $class->getProperties(), |
| 2169 | - function (Property $property) { |
|
| 2169 | + function(Property $property) { |
|
| 2170 | 2170 | return $property instanceof AssociationMetadata && in_array('persist', $property->getCascade()); |
| 2171 | 2171 | } |
| 2172 | 2172 | ); |
@@ -2184,7 +2184,7 @@ discard block |
||
| 2184 | 2184 | |
| 2185 | 2185 | case ($relatedEntities instanceof Collection): |
| 2186 | 2186 | case (is_array($relatedEntities)): |
| 2187 | - if (! ($association instanceof ToManyAssociationMetadata)) { |
|
| 2187 | + if ( ! ($association instanceof ToManyAssociationMetadata)) { |
|
| 2188 | 2188 | throw ORMInvalidArgumentException::invalidAssociation( |
| 2189 | 2189 | $this->em->getClassMetadata($targetEntity), |
| 2190 | 2190 | $association, |
@@ -2199,7 +2199,7 @@ discard block |
||
| 2199 | 2199 | break; |
| 2200 | 2200 | |
| 2201 | 2201 | case ($relatedEntities !== null): |
| 2202 | - if (! $relatedEntities instanceof $targetEntity) { |
|
| 2202 | + if ( ! $relatedEntities instanceof $targetEntity) { |
|
| 2203 | 2203 | throw ORMInvalidArgumentException::invalidAssociation( |
| 2204 | 2204 | $this->em->getClassMetadata($targetEntity), |
| 2205 | 2205 | $association, |
@@ -2230,7 +2230,7 @@ discard block |
||
| 2230 | 2230 | $class = $this->em->getClassMetadata(get_class($entity)); |
| 2231 | 2231 | $associations = array_filter( |
| 2232 | 2232 | $class->getProperties(), |
| 2233 | - function (Property $property) { |
|
| 2233 | + function(Property $property) { |
|
| 2234 | 2234 | return $property instanceof AssociationMetadata && in_array('remove', $property->getCascade()); |
| 2235 | 2235 | } |
| 2236 | 2236 | ); |
@@ -2315,7 +2315,7 @@ discard block |
||
| 2315 | 2315 | case LockMode::NONE === $lockMode: |
| 2316 | 2316 | case LockMode::PESSIMISTIC_READ === $lockMode: |
| 2317 | 2317 | case LockMode::PESSIMISTIC_WRITE === $lockMode: |
| 2318 | - if (!$this->em->getConnection()->isTransactionActive()) { |
|
| 2318 | + if ( ! $this->em->getConnection()->isTransactionActive()) { |
|
| 2319 | 2319 | throw TransactionRequiredException::transactionRequired(); |
| 2320 | 2320 | } |
| 2321 | 2321 | |
@@ -2559,7 +2559,7 @@ discard block |
||
| 2559 | 2559 | } |
| 2560 | 2560 | |
| 2561 | 2561 | foreach ($class->getProperties() as $field => $association) { |
| 2562 | - if (! ($association instanceof AssociationMetadata)) { |
|
| 2562 | + if ( ! ($association instanceof AssociationMetadata)) { |
|
| 2563 | 2563 | continue; |
| 2564 | 2564 | } |
| 2565 | 2565 | |
@@ -2608,7 +2608,7 @@ discard block |
||
| 2608 | 2608 | continue; |
| 2609 | 2609 | } |
| 2610 | 2610 | |
| 2611 | - if (! $association->isOwningSide()) { |
|
| 2611 | + if ( ! $association->isOwningSide()) { |
|
| 2612 | 2612 | // use the given entity association |
| 2613 | 2613 | if (isset($data[$field]) && is_object($data[$field]) && |
| 2614 | 2614 | isset($this->entityStates[spl_object_hash($data[$field])])) { |
@@ -2657,7 +2657,7 @@ discard block |
||
| 2657 | 2657 | $associatedId[$targetField] = $joinColumnValue; |
| 2658 | 2658 | } |
| 2659 | 2659 | |
| 2660 | - if (!$associatedId) { |
|
| 2660 | + if ( ! $associatedId) { |
|
| 2661 | 2661 | // Foreign key is NULL |
| 2662 | 2662 | $association->setValue($entity, null); |
| 2663 | 2663 | $this->originalEntityData[$oid][$field] = null; |
@@ -2666,7 +2666,7 @@ discard block |
||
| 2666 | 2666 | } |
| 2667 | 2667 | |
| 2668 | 2668 | // @todo guilhermeblanco Can we remove the need of this somehow? |
| 2669 | - if (!isset($hints['fetchMode'][$class->getClassName()][$field])) { |
|
| 2669 | + if ( ! isset($hints['fetchMode'][$class->getClassName()][$field])) { |
|
| 2670 | 2670 | $hints['fetchMode'][$class->getClassName()][$field] = $association->getFetchMode(); |
| 2671 | 2671 | } |
| 2672 | 2672 | |
@@ -2683,7 +2683,7 @@ discard block |
||
| 2683 | 2683 | // If this is an uninitialized proxy, we are deferring eager loads, |
| 2684 | 2684 | // this association is marked as eager fetch, and its an uninitialized proxy (wtf!) |
| 2685 | 2685 | // then we can append this entity for eager loading! |
| 2686 | - if (!$targetClass->isIdentifierComposite() && |
|
| 2686 | + if ( ! $targetClass->isIdentifierComposite() && |
|
| 2687 | 2687 | $newValue instanceof Proxy && |
| 2688 | 2688 | isset($hints[self::HINT_DEFEREAGERLOAD]) && |
| 2689 | 2689 | $hints['fetchMode'][$class->getClassName()][$field] === FetchMode::EAGER && |
@@ -2714,7 +2714,7 @@ discard block |
||
| 2714 | 2714 | break; |
| 2715 | 2715 | |
| 2716 | 2716 | // Deferred eager load only works for single identifier classes |
| 2717 | - case (isset($hints[self::HINT_DEFEREAGERLOAD]) && !$targetClass->isIdentifierComposite()): |
|
| 2717 | + case (isset($hints[self::HINT_DEFEREAGERLOAD]) && ! $targetClass->isIdentifierComposite()): |
|
| 2718 | 2718 | // TODO: Is there a faster approach? |
| 2719 | 2719 | $this->eagerLoadingEntities[$targetClass->getRootClassName()][$relatedIdHash] = current($associatedId); |
| 2720 | 2720 | |
@@ -3086,7 +3086,7 @@ discard block |
||
| 3086 | 3086 | { |
| 3087 | 3087 | $class = $this->em->getClassMetadata(get_class($entity)); |
| 3088 | 3088 | |
| 3089 | - if (! $class->getProperty($propertyName)) { |
|
| 3089 | + if ( ! $class->getProperty($propertyName)) { |
|
| 3090 | 3090 | return; // ignore non-persistent fields |
| 3091 | 3091 | } |
| 3092 | 3092 | |
@@ -3226,7 +3226,7 @@ discard block |
||
| 3226 | 3226 | */ |
| 3227 | 3227 | private function afterTransactionComplete() |
| 3228 | 3228 | { |
| 3229 | - $this->performCallbackOnCachedPersister(function (CachedPersister $persister) { |
|
| 3229 | + $this->performCallbackOnCachedPersister(function(CachedPersister $persister) { |
|
| 3230 | 3230 | $persister->afterTransactionComplete(); |
| 3231 | 3231 | }); |
| 3232 | 3232 | } |
@@ -3236,7 +3236,7 @@ discard block |
||
| 3236 | 3236 | */ |
| 3237 | 3237 | private function afterTransactionRolledBack() |
| 3238 | 3238 | { |
| 3239 | - $this->performCallbackOnCachedPersister(function (CachedPersister $persister) { |
|
| 3239 | + $this->performCallbackOnCachedPersister(function(CachedPersister $persister) { |
|
| 3240 | 3240 | $persister->afterTransactionRolledBack(); |
| 3241 | 3241 | }); |
| 3242 | 3242 | } |
@@ -3319,11 +3319,11 @@ discard block |
||
| 3319 | 3319 | */ |
| 3320 | 3320 | private function mergeEntityStateIntoManagedCopy($entity, $managedCopy) |
| 3321 | 3321 | { |
| 3322 | - if (! $this->isLoaded($entity)) { |
|
| 3322 | + if ( ! $this->isLoaded($entity)) { |
|
| 3323 | 3323 | return; |
| 3324 | 3324 | } |
| 3325 | 3325 | |
| 3326 | - if (! $this->isLoaded($managedCopy)) { |
|
| 3326 | + if ( ! $this->isLoaded($managedCopy)) { |
|
| 3327 | 3327 | $managedCopy->__load(); |
| 3328 | 3328 | } |
| 3329 | 3329 | |
@@ -3332,7 +3332,7 @@ discard block |
||
| 3332 | 3332 | foreach ($class->getProperties() as $property) { |
| 3333 | 3333 | switch (true) { |
| 3334 | 3334 | case ($property instanceof FieldMetadata): |
| 3335 | - if (! $property->isPrimaryKey()) { |
|
| 3335 | + if ( ! $property->isPrimaryKey()) { |
|
| 3336 | 3336 | $property->setValue($managedCopy, $property->getValue($entity)); |
| 3337 | 3337 | } |
| 3338 | 3338 | |
@@ -3354,7 +3354,7 @@ discard block |
||
| 3354 | 3354 | continue 2; |
| 3355 | 3355 | } |
| 3356 | 3356 | |
| 3357 | - if (! in_array('merge', $property->getCascade())) { |
|
| 3357 | + if ( ! in_array('merge', $property->getCascade())) { |
|
| 3358 | 3358 | if ($this->getEntityState($other) === self::STATE_DETACHED) { |
| 3359 | 3359 | $targetEntity = $property->getTargetEntity(); |
| 3360 | 3360 | $targetClass = $this->em->getClassMetadata($targetEntity); |
@@ -3386,7 +3386,7 @@ discard block |
||
| 3386 | 3386 | |
| 3387 | 3387 | $managedCol = $property->getValue($managedCopy); |
| 3388 | 3388 | |
| 3389 | - if (! $managedCol) { |
|
| 3389 | + if ( ! $managedCol) { |
|
| 3390 | 3390 | $managedCol = $property->wrap($managedCopy, [], $this->em); |
| 3391 | 3391 | |
| 3392 | 3392 | $property->setValue($managedCopy, $managedCol); |
@@ -3396,7 +3396,7 @@ discard block |
||
| 3396 | 3396 | $managedCol->initialize(); |
| 3397 | 3397 | |
| 3398 | 3398 | // clear and set dirty a managed collection if its not also the same collection to merge from. |
| 3399 | - if (! $managedCol->isEmpty() && $managedCol !== $mergeCol) { |
|
| 3399 | + if ( ! $managedCol->isEmpty() && $managedCol !== $mergeCol) { |
|
| 3400 | 3400 | $managedCol->unwrap()->clear(); |
| 3401 | 3401 | $managedCol->setDirty(true); |
| 3402 | 3402 | |
@@ -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 | |
@@ -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 | |