Skip to content

Commit

Permalink
Add generics to parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
franmomu committed May 25, 2021
1 parent 56bdb44 commit 1e832a6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lib/Doctrine/ORM/UnitOfWork.php
Original file line number Diff line number Diff line change
Expand Up @@ -630,9 +630,13 @@ public function & getEntityChangeSet($entity)
*
* @param ClassMetadata $class The class descriptor of the entity.
* @param object $entity The entity for which to compute the changes.
* @psalm-param ClassMetadata<T> $class
* @psalm-param T $entity
*
* @return void
*
* @template T of object
*
* @ignore
*/
public function computeChangeSet(ClassMetadata $class, $entity)
Expand Down Expand Up @@ -959,6 +963,10 @@ private function computeAssociationChanges(array $assoc, $value): void

/**
* @param object $entity
* @psalm-param ClassMetadata<T> $class
* @psalm-param T $entity
*
* @template T of object
*/
private function persistNew(ClassMetadata $class, $entity): void
{
Expand Down Expand Up @@ -1017,11 +1025,14 @@ private function hasMissingIdsWhichAreForeignKeys(ClassMetadata $class, array $i
*
* @param ClassMetadata $class The class descriptor of the entity.
* @param object $entity The entity for which to (re)calculate the change set.
* @psalm-param ClassMetadata<T> $class
* @psalm-param T $entity
*
* @return void
*
* @throws ORMInvalidArgumentException If the passed entity is not MANAGED.
*
* @template T of object
* @ignore
*/
public function recomputeSingleEntityChangeSet(ClassMetadata $class, $entity)
Expand Down Expand Up @@ -1144,6 +1155,10 @@ private function executeInserts(ClassMetadata $class): void

/**
* @param object $entity
* @psalm-param ClassMetadata<T> $class
* @psalm-param T $entity
*
* @template T of object
*/
private function addToEntityIdentifiersAndEntityMap(
ClassMetadata $class,
Expand Down Expand Up @@ -2020,8 +2035,13 @@ private function doMerge(
/**
* @param object $entity
* @param object $managedCopy
* @psalm-param ClassMetadata<T> $class
* @psalm-param T $entity
* @psalm-param T $managedCopy
*
* @throws OptimisticLockException
*
* @template T of object
*/
private function ensureVersionMatch(
ClassMetadata $class,
Expand Down

0 comments on commit 1e832a6

Please sign in to comment.