From 3cf93345a9fb50f075c40954fe045fb9c852398b Mon Sep 17 00:00:00 2001 From: robchett Date: Thu, 2 Nov 2023 13:13:11 +0000 Subject: [PATCH] Sanitize docblocks for psalm-check-type --- src/Psalm/Internal/Analyzer/StatementsAnalyzer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Psalm/Internal/Analyzer/StatementsAnalyzer.php b/src/Psalm/Internal/Analyzer/StatementsAnalyzer.php index 3306c6627..618708343 100644 --- a/src/Psalm/Internal/Analyzer/StatementsAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/StatementsAnalyzer.php @@ -684,7 +684,7 @@ final class StatementsAnalyzer extends SourceAnalyzer $check_type_string, $statements_analyzer->getAliases(), ); - $check_type = Type::parseString($fq_check_type_string); + $check_type = Type::parseString(CommentAnalyzer::sanitizeDocblockType($fq_check_type_string)); /** @psalm-suppress InaccessibleProperty We just created this type */ $check_type->possibly_undefined = $possibly_undefined;