src/BatchResult.php
public function addResponse(RequestInterface $request, ResponseInterface $response): self
    {
        $new = clone $this;
        $new->responses->attach($request, $response);

        return $new;
    }
public function addResponse(RequestInterface $request, ResponseInterface $response): self
    {
        $new = clone $this;
        $new->responses->attach($request, $response);

        return $new;
    }
public function addResponse ( RequestInterface $ request , ResponseInterface $ response ) : self { $ new = clone $ this ; $ new -> responses -> attach ( $ request , $ response ) ; return $ new ; }
Adds a response in an immutable way.

@return BatchResult the new BatchResult with this request-response pair added to it
Adds a response in an immutable way .