1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Allow methods that extend nullable callmap methods to not return a value

This commit is contained in:
Matthew Brown 2018-02-04 09:22:24 -05:00
parent 645602a38e
commit 7d6dc7252a
2 changed files with 7 additions and 2 deletions

View File

@ -138,7 +138,13 @@ class CallMap
return Type::getMixed();
}
return Type::parseString($call_map[$call_map_key][0]);
$call_map_type = Type::parseString($call_map[$call_map_key][0]);
if ($call_map_type->isNullable()) {
$call_map_type->from_docblock = true;
}
return $call_map_type;
}
/**

View File

@ -8,7 +8,6 @@ use Psalm\Checker\ClassLikeChecker;
use Psalm\Checker\CommentChecker;
use Psalm\Checker\FunctionChecker;
use Psalm\Checker\FunctionLikeChecker;
use Psalm\Checker\MethodChecker;
use Psalm\Checker\Statements\Expression\IncludeChecker;
use Psalm\Checker\StatementsChecker;
use Psalm\Codebase;