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;
    }