Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal: use more specific types #9063

Merged
merged 1 commit into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Provider/MethodReturnTypeProvider.php
Expand Up @@ -74,7 +74,7 @@ public function has(string $fq_classlike_name): bool

/**
* @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,
Expand Down
Expand Up @@ -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;
/**
Expand All @@ -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
Expand Down Expand Up @@ -102,7 +100,7 @@ public function getCodeLocation(): CodeLocation
}

/**
* @return Union[]|null
* @return non-empty-list<Union>|null
*/
public function getTemplateTypeParameters(): ?array
{
Expand Down