public function getNumberOfRequiredArguments($includeBase = true)
    {
        Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s');

        $arguments = $this->getArguments($includeBase);
        $count = 0;

        foreach ($arguments as $argument) {
            if (!$argument->isRequired()) {
                continue;
            }

            if ($argument->isMultiValued()) {
                return PHP_INT_MAX;
            }

            ++$count;
        }

        return $count;
    }