src/ReflectionController.php
public function getEndpointResult($method, $endpointName, Request $request)
    {
        $methodName = $this->parseEndpointName($method, $endpointName);
        if (!$this->reflection->hasMethod($methodName)) {
            throw new \RuntimeException("{$this->reflection->getName()}::{$methodName} does not exist");
        }

        $reflectionMethod = $this->reflection->getMethod($methodName);
        return $reflectionMethod->invokeArgs(
            $this->controller,
            $this->mapRequestToArguments($reflectionMethod, $request)
        );
    }
public function getEndpointResult($method, $endpointName, Request $request)
    {
        $methodName = $this->parseEndpointName($method, $endpointName);
        if (!$this->reflection->hasMethod($methodName)) {
            throw new \RuntimeException("{$this->reflection->getName()}::{$methodName} does not exist");
        }

        $reflectionMethod = $this->reflection->getMethod($methodName);
        return $reflectionMethod->invokeArgs(
            $this->controller,
            $this->mapRequestToArguments($reflectionMethod, $request)
        );
    }
Call an endpoint and get the result.

This method will parse the request into the endpoint methods parameters
so the writer of an endpoint need only describe the information they
need in the method declaration.

@param $method
@param $endpointName
@param Request $request
@return mixed