Skip to content

Commit

Permalink
Replace phpdoc by native union
Browse files Browse the repository at this point in the history
  • Loading branch information
klimick committed May 4, 2024
1 parent 4a41491 commit 669721c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/Psalm/Internal/Type/TemplateContextualBoundsCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,7 @@ private function collectTemplateType(Atomic $contextual_atomic, TTemplateParam $
}
}

/**
* @param TCallable|TClosure $contextual_atomic
*/
private function collectCallable(Atomic $contextual_atomic, Atomic $return_atomic): void
private function collectCallable(TCallable|TClosure $contextual_atomic, Atomic $return_atomic): void
{
$codebase = $this->statements_analyzer->getCodebase();

Expand All @@ -127,10 +124,7 @@ private function collectCallable(Atomic $contextual_atomic, Atomic $return_atomi
}
}

/**
* @param TIterable|TArray $contextual_atomic
*/
private function collectIterable(Atomic $contextual_atomic, Atomic $return_atomic): void
private function collectIterable(TIterable|TArray $contextual_atomic, Atomic $return_atomic): void
{
if ($return_atomic instanceof TArray || $return_atomic instanceof TIterable) {
$this->collectUnion($contextual_atomic->type_params[0], $return_atomic->type_params[0]);
Expand Down

0 comments on commit 669721c

Please sign in to comment.