mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Do not throw error when reflectionmethod fails
This commit is contained in:
parent
cb59baec87
commit
286158e07d
@ -1950,11 +1950,16 @@ class StatementsChecker
|
|||||||
$method_id = preg_replace('/^[^:]+::/', '', $method_id);
|
$method_id = preg_replace('/^[^:]+::/', '', $method_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
$reflection_parameters = (new \ReflectionFunction($method_id))->getParameters();
|
$reflection_parameters = (new \ReflectionFunction($method_id))->getParameters();
|
||||||
|
|
||||||
// if value is passed by reference
|
// if value is passed by reference
|
||||||
return $argument_offset < count($reflection_parameters) && $reflection_parameters[$argument_offset]->isPassedByReference();
|
return $argument_offset < count($reflection_parameters) && $reflection_parameters[$argument_offset]->isPassedByReference();
|
||||||
}
|
}
|
||||||
|
catch (\ReflectionException $e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user