1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-02 09:37:59 +01:00
This commit is contained in:
Daniil Gentili 2023-10-20 11:34:41 +02:00
parent dd2d3a286b
commit c88fa5ccab
9 changed files with 9 additions and 9 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);