Code Duplication    Length = 8-10 lines in 2 locations

src/Connection/Client.php 2 locations

@@ 251-260 (lines=10) @@
248
     *
249
     * @return Collection|User[]
250
     */
251
    public function getUsers()
252
    {
253
        $response = $this->connect('GET', self::USERS_ROUTE);
254
        $contents = $response->getBody()->getContents();
255
        return new ArrayCollection($this->serializer->deserialize(
256
            $contents,
257
            'array<Wonnova\SDK\Model\User>',
258
            'json'
259
        ));
260
    }
261
262
    /**
263
     * Returns information about certain user
@@ 268-275 (lines=8) @@
265
     * @param $userId
266
     * @return User
267
     */
268
    public function getUser($userId)
269
    {
270
        $response = $this->connect('GET', new Route(self::USERS_ROUTE, [], [
271
            'userId' => $userId
272
        ]));
273
        $contents = $response->getBody()->getContents();
274
        return $this->serializer->deserialize($contents, 'Wonnova\SDK\Model\User', 'json');
275
    }
276
277
    /**
278
     * Creates provided user