code: 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;
      }
docs: Checks if the approach of the specified middleware is either single or double pass.
  
  @param  \Closure|object $middleware
  @return boolean