1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Merge pull request #9063 from lptn/use-more-specific-types

This commit is contained in:
Bruce Weirdan 2023-01-05 17:20:41 -04:00 committed by GitHub
commit 8329309999
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -74,7 +74,7 @@ class MethodReturnTypeProvider
/**
* @param PhpParser\Node\Expr\MethodCall|PhpParser\Node\Expr\StaticCall $stmt
* @param ?array<Union> $template_type_parameters
* @param non-empty-list<Union>|null $template_type_parameters
*/
public function getReturnType(
StatementsSource $statements_source,

View File

@ -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<Union>|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<Union> $template_type_parameters
* @param non-empty-list<Union>|null $template_type_parameters
* @param lowercase-string $method_name_lowercase
* @param lowercase-string $called_method_name_lowercase
* @internal
@ -102,7 +100,7 @@ final class MethodReturnTypeProviderEvent
}
/**
* @return Union[]|null
* @return non-empty-list<Union>|null
*/
public function getTemplateTypeParameters(): ?array
{