mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Suppress UndefinedMethod for Php 7.0 Psalm check
This commit is contained in:
parent
149d7cab1c
commit
0c9c8c204c
@ -53,6 +53,7 @@ class FunctionReturnTypeProvider
|
||||
public function register(string $class)
|
||||
{
|
||||
if (version_compare(PHP_VERSION, '7.1.0') >= 0) {
|
||||
/** @psalm-suppress UndefinedMethod */
|
||||
$callable = \Closure::fromCallable([$class, 'get']);
|
||||
} else {
|
||||
$callable = (new \ReflectionClass($class))->getMethod('get')->getClosure(new $class);
|
||||
|
Loading…
Reference in New Issue
Block a user