diff --git a/src/Psalm/Internal/PhpVisitor/Reflector/ClassLikeNodeScanner.php b/src/Psalm/Internal/PhpVisitor/Reflector/ClassLikeNodeScanner.php index 79092c8003d..f43fc71f6ce 100644 --- a/src/Psalm/Internal/PhpVisitor/Reflector/ClassLikeNodeScanner.php +++ b/src/Psalm/Internal/PhpVisitor/Reflector/ClassLikeNodeScanner.php @@ -78,6 +78,7 @@ use function implode; use function is_int; use function is_string; +use function ltrim; use function preg_match; use function preg_replace; use function preg_split; diff --git a/tests/AnnotationTest.php b/tests/AnnotationTest.php index 5b453b0f402..4252e60b84e 100644 --- a/tests/AnnotationTest.php +++ b/tests/AnnotationTest.php @@ -532,7 +532,7 @@ public function ret(): array { return []; } $_ = (new A)->ret(); ', 'assertions' => [ - '$_===' => 'list' + '$_===' => 'list', ], ], 'builtInClassInAShape' => [