Code Duplication    Length = 19-22 lines in 2 locations

src/Version/Guzzle3.php 1 location

@@ 80-98 (lines=19) @@
77
    /**
78
     * {@InheritDoc}
79
     */
80
    public function send(Request $request)
81
    {
82
        $guzzleRequest = $this->client->createRequest(
83
            $request->getMethod(),
84
            $request->getUri(),
85
            $request->getHeaders(),
86
            $request->getBody()
87
        );
88
89
        $guzzleResponse = $guzzleRequest->send();
90
91
        $response = new Response(
92
            $guzzleResponse->getStatusCode(),
93
            $guzzleResponse->getHeaders()->toArray(),
94
            $guzzleResponse->getBody(true)
95
        );
96
97
        return $response;
98
    }
99
100
    /**
101
     * use to mock client

src/Version/Guzzle5.php 1 location

@@ 81-102 (lines=22) @@
78
    /**
79
     * {@InheritDoc}
80
     */
81
    public function send(Request $request)
82
    {
83
        $guzzleRequest = $this->client->createRequest(
84
            $request->getMethod(),
85
            $request->getUri(),
86
            ['headers' => $request->getHeaders()]
87
        );
88
89
        $guzzleRequest->setBody(Stream::factory($request->getBody()));
90
91
        $guzzleResponse = $this->getClient()->send($guzzleRequest);
92
93
        $response = new Response(
94
            $guzzleResponse->getStatusCode(),
95
            $guzzleResponse->getHeaders(),
96
            $guzzleResponse->getBody(true)
97
        );
98
99
        return $response;
100
    }
101
102
    /**
103
     * Used to mock client
104
     *
105
     * @return \GuzzleHttp\Event\Emitter|\GuzzleHttp\Event\EmitterInterface