diff --git a/src/Psalm/Internal/Provider/MethodReturnTypeProvider.php b/src/Psalm/Internal/Provider/MethodReturnTypeProvider.php index 30985199e9d..cd06f4a8a86 100644 --- a/src/Psalm/Internal/Provider/MethodReturnTypeProvider.php +++ b/src/Psalm/Internal/Provider/MethodReturnTypeProvider.php @@ -74,7 +74,7 @@ public function has(string $fq_classlike_name): bool /** * @param PhpParser\Node\Expr\MethodCall|PhpParser\Node\Expr\StaticCall $stmt - * @param ?array $template_type_parameters + * @param non-empty-list|null $template_type_parameters */ public function getReturnType( StatementsSource $statements_source, diff --git a/src/Psalm/Plugin/EventHandler/Event/MethodReturnTypeProviderEvent.php b/src/Psalm/Plugin/EventHandler/Event/MethodReturnTypeProviderEvent.php index 97a76196f35..8e4e58bced2 100644 --- a/src/Psalm/Plugin/EventHandler/Event/MethodReturnTypeProviderEvent.php +++ b/src/Psalm/Plugin/EventHandler/Event/MethodReturnTypeProviderEvent.php @@ -22,9 +22,7 @@ final class MethodReturnTypeProviderEvent * @var PhpParser\Node\Expr\MethodCall|PhpParser\Node\Expr\StaticCall */ private $stmt; - /** - * @var Union[]|null - */ + /** @var non-empty-list|null */ private ?array $template_type_parameters; private ?string $called_fq_classlike_name; /** @@ -38,7 +36,7 @@ final class MethodReturnTypeProviderEvent * something should be returned, but can't be more specific. * * @param PhpParser\Node\Expr\MethodCall|PhpParser\Node\Expr\StaticCall $stmt - * @param ?array $template_type_parameters + * @param non-empty-list|null $template_type_parameters * @param lowercase-string $method_name_lowercase * @param lowercase-string $called_method_name_lowercase * @internal @@ -102,7 +100,7 @@ public function getCodeLocation(): CodeLocation } /** - * @return Union[]|null + * @return non-empty-list|null */ public function getTemplateTypeParameters(): ?array {