src/Endpoint/EndpointProvider.php
public static function resolve(callable $provider, array $args = [])
    {
        $result = $provider($args);
        if (is_array($result)) {
            return $result;
        }

        throw new UnresolvedEndpointException(
            'Unable to resolve an endpoint using the provider arguments: '
            . json_encode($args) . '. Note: you can provide an "endpoint" '
            . 'option to a client constructor to bypass invoking an endpoint '
            . 'provider.');
    }
public static function resolve(callable $provider, array $args = [])
    {
        $result = $provider($args);
        if (is_array($result)) {
            return $result;
        }

        throw new UnresolvedEndpointException(
            'Unable to resolve an endpoint using the provider arguments: '
            . json_encode($args) . '. Note: you can provide an "endpoint" '
            . 'option to a client constructor to bypass invoking an endpoint '
            . 'provider.');
    }
public static function resolve ( callable $ provider , array $ args = [ ] ) { $ result = $ provider ( $ args ) ; if ( is_array ( $ result ) ) { return $ result ; } throw new UnresolvedEndpointException ( 'Unable to resolve an endpoint using the provider arguments: ' . json_encode ( $ args ) . '. Note: you can provide an "endpoint" ' . 'option to a client constructor to bypass invoking an endpoint ' . 'provider.' ) ; }
Resolves and endpoint provider and ensures a non-null return value.

@param callable $provider Provider function to invoke.
@param array    $args     Endpoint arguments to pass to the provider.

@return array
@throws UnresolvedEndpointException
Resolves and endpoint provider and ensures a non - null return value .