mirror of
https://github.com/danog/psalm.git
synced 2024-12-02 09:37:59 +01:00
Fix
This commit is contained in:
parent
dd2d3a286b
commit
c88fa5ccab
@ -36,7 +36,7 @@ final class FunctionExistenceProvider
|
||||
public function registerClass(string $class): void
|
||||
{
|
||||
if (is_subclass_of($class, FunctionExistenceProviderInterface::class, true)) {
|
||||
$callable = Closure::fromCallable([$class, 'doesFunctionExist']);
|
||||
$callable = $class::doesFunctionExist(...);
|
||||
|
||||
foreach ($class::getFunctionIds() as $function_id) {
|
||||
$this->registerClosure($function_id, $callable);
|
||||
|
@ -38,7 +38,7 @@ final class FunctionParamsProvider
|
||||
*/
|
||||
public function registerClass(string $class): void
|
||||
{
|
||||
$callable = Closure::fromCallable([$class, 'getFunctionParams']);
|
||||
$callable = $class::getFunctionParams(...);
|
||||
|
||||
foreach ($class::getFunctionIds() as $function_id) {
|
||||
$this->registerClosure($function_id, $callable);
|
||||
|
@ -117,7 +117,7 @@ final class FunctionReturnTypeProvider
|
||||
public function registerClass(string $class): void
|
||||
{
|
||||
if (is_subclass_of($class, FunctionReturnTypeProviderInterface::class, true)) {
|
||||
$callable = Closure::fromCallable([$class, 'getFunctionReturnType']);
|
||||
$callable = $class::getFunctionReturnType(...);
|
||||
|
||||
foreach ($class::getFunctionIds() as $function_id) {
|
||||
$this->registerClosure($function_id, $callable);
|
||||
|
@ -35,7 +35,7 @@ final class MethodExistenceProvider
|
||||
*/
|
||||
public function registerClass(string $class): void
|
||||
{
|
||||
$callable = Closure::fromCallable([$class, 'doesMethodExist']);
|
||||
$callable = $class::doesMethodExist(...);
|
||||
|
||||
foreach ($class::getClassLikeNames() as $fq_classlike_name) {
|
||||
$this->registerClosure($fq_classlike_name, $callable);
|
||||
|
@ -44,7 +44,7 @@ final class MethodParamsProvider
|
||||
public function registerClass(string $class): void
|
||||
{
|
||||
if (is_subclass_of($class, MethodParamsProviderInterface::class, true)) {
|
||||
$callable = Closure::fromCallable([$class, 'getMethodParams']);
|
||||
$callable = $class::getMethodParams(...);
|
||||
|
||||
foreach ($class::getClassLikeNames() as $fq_classlike_name) {
|
||||
$this->registerClosure($fq_classlike_name, $callable);
|
||||
|
@ -51,7 +51,7 @@ final class MethodReturnTypeProvider
|
||||
public function registerClass(string $class): void
|
||||
{
|
||||
if (is_subclass_of($class, MethodReturnTypeProviderInterface::class, true)) {
|
||||
$callable = Closure::fromCallable([$class, 'getMethodReturnType']);
|
||||
$callable = $class::getMethodReturnType(...);
|
||||
|
||||
foreach ($class::getClassLikeNames() as $fq_classlike_name) {
|
||||
$this->registerClosure($fq_classlike_name, $callable);
|
||||
|
@ -39,7 +39,7 @@ final class MethodVisibilityProvider
|
||||
public function registerClass(string $class): void
|
||||
{
|
||||
if (is_subclass_of($class, MethodVisibilityProviderInterface::class, true)) {
|
||||
$callable = Closure::fromCallable([$class, 'isMethodVisible']);
|
||||
$callable = $class::isMethodVisible(...);
|
||||
|
||||
foreach ($class::getClassLikeNames() as $fq_classlike_name) {
|
||||
$this->registerClosure($fq_classlike_name, $callable);
|
||||
|
@ -39,7 +39,7 @@ final class PropertyExistenceProvider
|
||||
public function registerClass(string $class): void
|
||||
{
|
||||
if (is_subclass_of($class, PropertyExistenceProviderInterface::class, true)) {
|
||||
$callable = Closure::fromCallable([$class, 'doesPropertyExist']);
|
||||
$callable = $class::doesPropertyExist(...);
|
||||
|
||||
foreach ($class::getClassLikeNames() as $fq_classlike_name) {
|
||||
$this->registerClosure($fq_classlike_name, $callable);
|
||||
|
@ -41,7 +41,7 @@ final class PropertyTypeProvider
|
||||
public function registerClass(string $class): void
|
||||
{
|
||||
if (is_subclass_of($class, PropertyTypeProviderInterface::class, true)) {
|
||||
$callable = Closure::fromCallable([$class, 'getPropertyType']);
|
||||
$callable = $class::getPropertyType(...);
|
||||
|
||||
foreach ($class::getClassLikeNames() as $fq_classlike_name) {
|
||||
$this->registerClosure($fq_classlike_name, $callable);
|
||||
|
Loading…
Reference in New Issue
Block a user