Skip to content

Commit 47c3d69

Browse files
committed
Fix latest phpstan assert
1 parent ec616ed commit 47c3d69

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rules/DeadCode/Rector/FunctionLike/NarrowWideUnionReturnTypeRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ public function refactor(Node $node): ?Node
126126
$hasImplicitNullReturn = $this->silentVoidResolver->hasSilentVoid($node)
127127
|| $this->hasImplicitNullReturn($returnStatements);
128128

129+
/** @var UnionType|NullableType $returnType */
129130
$returnType = $node->returnType;
130-
Assert::isInstanceOfAny($returnType, [UnionType::class, NullableType::class]);
131131

132132
$returnType = $this->staticTypeMapper->mapPhpParserNodePHPStanType($returnType);
133133
$actualReturnTypes = $this->collectActualReturnTypes($returnStatements);

0 commit comments

Comments
 (0)