1
0
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:
Matthew Brown 2017-02-12 19:51:48 -05:00
parent 4f43a7eccb
commit 1001e03f8a
2 changed files with 2 additions and 2 deletions

View File

@ -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];
} }
} }

View File

@ -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);
} }