src/Reflection/ReflectionFunctionAbstract.php
public function getNumberOfRequiredParameters() : int
    {
        return count(array_filter(
            $this->getParameters(),
            static function (ReflectionParameter $p) : bool {
                return ! $p->isOptional();
            }
        ));
    }
public function getNumberOfRequiredParameters() : int
    {
        return count(array_filter(
            $this->getParameters(),
            static function (ReflectionParameter $p) : bool {
                return ! $p->isOptional();
            }
        ));
    }
Get the number of required parameters for this method.