Code Duplication    Length = 10-10 lines in 3 locations

src/Service/RequestService.php 3 locations

@@ 39-48 (lines=10) @@
36
     * @param array  $params
37
     * @return array
38
     */
39
    public function post($url, array $params = [])
40
    {
41
        $response = $this->client->post($this->getUrl($url), [
42
            'headers' => $this->getHeaders(),
43
            'auth' => $this->getAuth(),
44
            'query' => $params,
45
        ]);
46
47
        return json_decode((string) $response->getBody(), true);
48
    }
49
50
    /**
51
     * @param string $url
@@ 91-100 (lines=10) @@
88
     * @param array  $params
89
     * @return array
90
     */
91
    public function get($url, array $params = [])
92
    {
93
        $response = $this->client->get($this->getUrl($url), [
94
            'headers' => $this->getHeaders(),
95
            'auth' => $this->getAuth(),
96
            'query' => $params,
97
        ]);
98
99
        return json_decode((string) $response->getBody(), true);
100
    }
101
102
    /**
103
     * @param string $url
@@ 107-116 (lines=10) @@
104
     * @param array  $params
105
     * @return array
106
     */
107
    public function put($url, array $params = [])
108
    {
109
        $response = $this->client->put($this->getUrl($url), [
110
            'headers' => $this->getHeaders(),
111
            'auth' => $this->getAuth(),
112
            'json' => $params,
113
        ]);
114
115
        return json_decode((string) $response->getBody(), true);
116
    }
117
118
    /**
119
     * @param string $url