src/Middleware/Dispatcher.php
protected function approach($middleware)
    {
        if ($middleware instanceof \Closure)
        {
            $object = new \ReflectionFunction($middleware);

            return count($object->getParameters()) === 2;
        }

        $class = (string) get_class($middleware);

        $object = new \ReflectionMethod($class, '__invoke');

        return count($object->getParameters()) === 2;
    }
protected function approach($middleware)
    {
        if ($middleware instanceof \Closure)
        {
            $object = new \ReflectionFunction($middleware);

            return count($object->getParameters()) === 2;
        }

        $class = (string) get_class($middleware);

        $object = new \ReflectionMethod($class, '__invoke');

        return count($object->getParameters()) === 2;
    }
Checks if the approach of the specified middleware is either single or double pass.

@param  \Closure|object $middleware
@return boolean