mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Prevent empty typeof types
This commit is contained in:
parent
4f43a7eccb
commit
1001e03f8a
@ -115,7 +115,7 @@ class MethodChecker extends FunctionLikeChecker
|
|||||||
|
|
||||||
foreach ($type_tokens as &$type_token) {
|
foreach ($type_tokens as &$type_token) {
|
||||||
if (isset($template_types[$type_token])) {
|
if (isset($template_types[$type_token])) {
|
||||||
$type_token = $template_types[$type_token];
|
$type_token = (string)$template_types[$type_token];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1408,7 +1408,7 @@ class CallChecker
|
|||||||
$statements_checker
|
$statements_checker
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
} elseif ($arg->value instanceof PhpParser\Node\Scalar\String_) {
|
} elseif ($arg->value instanceof PhpParser\Node\Scalar\String_ && $arg->value->value) {
|
||||||
$offset_value_type = Type::parseString($arg->value->value);
|
$offset_value_type = Type::parseString($arg->value->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user