private function getRequestId(RequestInterface $request, ResponseInterface $response)
    {
        if ($request->hasHeader('X-Request-Id')) {
            return $request->getHeader('X-Request-Id')[0];
        }

        if ($response->hasHeader('X-Request-Id')) {
            return $response->getHeader('X-Request-Id')[0];
        }

        return '';
    }
private function getRequestId(RequestInterface $request, ResponseInterface $response)
    {
        if ($request->hasHeader('X-Request-Id')) {
            return $request->getHeader('X-Request-Id')[0];
        }

        if ($response->hasHeader('X-Request-Id')) {
            return $response->getHeader('X-Request-Id')[0];
        }

        return '';
    }
private function getRequestId ( RequestInterface $ request , ResponseInterface $ response ) { if ( $ request -> hasHeader ( 'X-Request-Id' ) ) { return $ request -> getHeader ( 'X-Request-Id' ) [ 0 ] ; } if ( $ response -> hasHeader ( 'X-Request-Id' ) ) { return $ response -> getHeader ( 'X-Request-Id' ) [ 0 ] ; } return '' ; }
Returns the X-Request-Id if present

@param RequestInterface $request
@param ResponseInterface $response
@return string
Returns the X - Request - Id if present