1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00
This commit is contained in:
Daniil Gentili 2023-10-19 13:25:47 +02:00
parent 076bd85e00
commit 989d17147a
2 changed files with 9 additions and 4 deletions

View File

@ -860,8 +860,11 @@ final class Codebase
/** /**
* @param list<Arg> $call_args * @param list<Arg> $call_args
*/ */
public function getMethodReturnType(string|MethodIdentifier $method_id, ?string &$self_class, array $call_args = []): ?Union public function getMethodReturnType(
{ string|MethodIdentifier $method_id,
?string &$self_class,
array $call_args = [],
): ?Union {
return $this->methods->getMethodReturnType( return $this->methods->getMethodReturnType(
MethodIdentifier::wrap($method_id), MethodIdentifier::wrap($method_id),
$self_class, $self_class,

View File

@ -123,8 +123,10 @@ final class FunctionLikeNodeScanner
/** /**
* @param bool $fake_method in the case of @method annotations we do something a little strange * @param bool $fake_method in the case of @method annotations we do something a little strange
*/ */
public function start(PhpParser\Node\FunctionLike $stmt, bool $fake_method = false): FunctionStorage|MethodStorage|false public function start(
{ PhpParser\Node\FunctionLike $stmt,
bool $fake_method = false,
): FunctionStorage|MethodStorage|false {
if ($stmt instanceof PhpParser\Node\Expr\Closure if ($stmt instanceof PhpParser\Node\Expr\Closure
|| $stmt instanceof PhpParser\Node\Expr\ArrowFunction || $stmt instanceof PhpParser\Node\Expr\ArrowFunction
) { ) {