Code Duplication    Length = 10-14 lines in 3 locations

src/Client/MercadoLibreClient.php 3 locations

@@ 108-117 (lines=10) @@
105
     *
106
     * @return array|\JMS\Serializer\scalar|object
107
     */
108
    public function userShow($customer_id)
109
    {
110
        $response = $this->getGuzzleClient()
111
            ->get('/users/' . $customer_id, $this->setQuery());
112
113
        return $this->serializer->deserialize(
114
            $response->getBody()->getContents(),
115
            User::class, 'json'
116
        );
117
    }
118
119
    /**
120
     * User show me resource
@@ 155-165 (lines=11) @@
152
     *
153
     * @return array|\JMS\Serializer\scalar|object
154
     */
155
    public function itemShow($item_id)
156
    {
157
        $response = $this->getGuzzleClient()
158
            ->get('/items/' . $item_id, $this->setQuery());
159
160
        return $this->serializer->deserialize(
161
            $response->getBody()->getContents(),
162
            Item::class,
163
            'json'
164
        );
165
    }
166
167
    /**
168
     * Item create resource
@@ 174-187 (lines=14) @@
171
     *
172
     * @return array|\JMS\Serializer\scalar|object
173
     */
174
    public function itemCreate($item)
175
    {
176
        $response = $this->getGuzzleClient()
177
            ->post(
178
                '/items',
179
                array_merge($this->setQuery(), $this->setBody($item))
180
            );
181
182
        return $this->serializer->deserialize(
183
            $response->getBody()->getContents(),
184
            Item::class,
185
            'json'
186
        );
187
    }
188
189
    /**
190
     * Set query