Code Duplication    Length = 10-10 lines in 2 locations

src/ClientRemote.php 2 locations

@@ 175-184 (lines=10) @@
172
    /**
173
     * @inheritdoc
174
     */
175
    public function getMessages($userId = null)
176
    {
177
        if ($userId !== null) {
178
            $path = $this->buildPath(static::MESSAGES_USER_LIST_ENDPOINT, $userId);
179
        } else {
180
            $path = $this->buildPath(static::MESSAGES_LIST_ENDPOINT);
181
        }
182
183
        return $this->performRequest('GET', $path);
184
    }
185
186
    /**
187
     * @inheritdoc
@@ 340-349 (lines=10) @@
337
    /**
338
     * @inheritdoc
339
     */
340
    public function getBookmarks($userId = null)
341
    {
342
        if ($userId !== null) {
343
            $path = $this->buildPath(static::BOOKMARKS_USER_ENDPOINT, $userId);
344
        } else {
345
            $path = $this->buildPath(static::BOOKMARKS_ALL_ENDPOINT);
346
        }
347
348
        return $this->performRequest('GET', $path);
349
    }
350
351
    /**
352
     * @inheritdoc