Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Callback.php

function Callback::isVariadic

@psalm-suppress ArgumentTypeCoercion

1 call to Callback::isVariadic()
Callback::matches in vendor/phpunit/phpunit/src/Framework/Constraint/Callback.php
Evaluates the constraint for parameter $value. Returns true if the constraint is met, false otherwise.

File

vendor/phpunit/phpunit/src/Framework/Constraint/Callback.php, line 46

Class

Callback
@psalm-template CallbackInput of mixed

Namespace

PHPUnit\Framework\Constraint

Code

public function isVariadic() : bool {
    foreach ((new ReflectionFunction(Closure::fromCallable($this->callback)))
        ->getParameters() as $parameter) {
        if ($parameter->isVariadic()) {
            return true;
        }
    }
    return false;
}
RSS feed
Powered by Drupal