mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Add version check for reflected function return type
This commit is contained in:
parent
d163b28cbf
commit
cfbf256593
@ -140,7 +140,9 @@ class FunctionChecker extends FunctionLikeChecker
|
||||
|
||||
$config = \Psalm\Config::getInstance();
|
||||
|
||||
if ($reflection_return_type = $reflection_function->getReturnType()) {
|
||||
if (version_compare(PHP_VERSION, '7.0.0dev', '>=')
|
||||
&& $reflection_return_type = $reflection_function->getReturnType()
|
||||
) {
|
||||
$storage->return_type = Type::parseString((string)$reflection_return_type);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user