Skip to content

Commit

Permalink
Merge pull request #9063 from lptn/use-more-specific-types
Browse files Browse the repository at this point in the history
  • Loading branch information
weirdan committed Jan 5, 2023
2 parents 7d6a48a + f197d13 commit 8329309
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Provider/MethodReturnTypeProvider.php
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit 8329309

Please sign in to comment.