Skip to content

Commit

Permalink
improve comment
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Jul 1, 2024
1 parent 31969f6 commit f726df5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/PHPStanStaticTypeMapper/TypeMapper/UnionTypeMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function mapToPhpParserNode(Type $type, string $typeKind): ?Node

/**
* If type is nullable, and has only one other value,
* this creates at least "?Type" in case of PHP 7.4 and lower
* this creates at least "?Type" in case of PHP 7.1-7.4
*/
private function resolveTypeWithNullablePHPParserUnionType(
PhpParserUnionType $phpParserUnionType
Expand Down Expand Up @@ -200,10 +200,6 @@ private function matchPhpParserUnionType(UnionType $unionType): ?Node
return $phpParserUnionedTypes[0];
}

// if ($countPhpParserUnionedTypes === 0) {
// return null;
// }

return $this->resolveTypeWithNullablePHPParserUnionType(new PhpParserUnionType($phpParserUnionedTypes));
}

Expand Down

0 comments on commit f726df5

Please sign in to comment.