private function getReflectionInstance()
    {
        if (\is_array($this->controller) && 2 === \count($this->controller)) {
            //Reflection the method's argument in the controller class
            return new \ReflectionMethod($this->controller[0], $this->controller[1]);
        }

        if (\is_object($this->controller) && !$this->controller instanceof \Closure) {
            //Reflection the method's arguments of the callable object
            $controllerReflected = new \ReflectionObject($this->controller);

            return $controllerReflected->getMethod('__invoke');
        }

        return new \ReflectionFunction($this->controller);
    }