Code Duplication    Length = 7-11 lines in 6 locations

src/Api/Providers/Boards.php 2 locations

@@ 36-42 (lines=7) @@
33
     * @param int $boardId
34
     * @return bool
35
     */
36
    public function follow($boardId)
37
    {
38
        $this->request->checkLoggedIn();
39
40
        $response = $this->request->followMethodCall($boardId, Request::BOARD_ENTITY_ID, UrlHelper::RESOURCE_FOLLOW_BOARD);
41
        return $this->response->checkResponse($response);
42
    }
43
44
    /**
45
     * Unfollow board by boardID
@@ 50-56 (lines=7) @@
47
     * @param int $boardId
48
     * @return bool
49
     */
50
    public function unFollow($boardId)
51
    {
52
        $this->request->checkLoggedIn();
53
54
        $response = $this->request->followMethodCall($boardId, Request::BOARD_ENTITY_ID, UrlHelper::RESOURCE_UNFOLLOW_BOARD);
55
        return $this->response->checkResponse($response);
56
    }
57
58
    protected function getScope()
59
    {

src/Api/Providers/Interests.php 2 locations

@@ 16-26 (lines=11) @@
13
     * @param int $interestId
14
     * @return bool
15
     */
16
    public function follow($interestId)
17
    {
18
        $this->request->checkLoggedIn();
19
20
        $response = $this->request->followMethodCall(
21
            $interestId,
22
            Request::INTEREST_ENTITY_ID,
23
            UrlHelper::RESOURCE_FOLLOW_INTEREST
24
        );
25
        return $this->response->checkResponse($response);
26
    }
27
28
    /**
29
     * Unfollow interest by ID
@@ 34-44 (lines=11) @@
31
     * @param int $interestId
32
     * @return bool
33
     */
34
    public function unFollow($interestId)
35
    {
36
        $this->request->checkLoggedIn();
37
38
        $response = $this->request->followMethodCall(
39
            $interestId,
40
            Request::INTEREST_ENTITY_ID,
41
            UrlHelper::RESOURCE_UNFOLLOW_INTEREST
42
        );
43
        return $this->response->checkResponse($response);
44
    }
45
}
46

src/Api/Providers/Pinners.php 2 locations

@@ 20-26 (lines=7) @@
17
     * @param integer $userId
18
     * @return bool
19
     */
20
    public function follow($userId)
21
    {
22
        $this->request->checkLoggedIn();
23
24
        $response = $this->request->followMethodCall($userId, Request::PINNER_ENTITY_ID, UrlHelper::RESOURCE_FOLLOW_USER);
25
        return $this->response->checkErrorInResponse($response);
26
    }
27
28
    /**
29
     * Unfollow user by user_id
@@ 34-40 (lines=7) @@
31
     * @param integer $userId
32
     * @return bool
33
     */
34
    public function unFollow($userId)
35
    {
36
        $this->request->checkLoggedIn();
37
38
        $response = $this->request->followMethodCall($userId, Request::PINNER_ENTITY_ID, UrlHelper::RESOURCE_UNFOLLOW_USER);
39
        return $this->response->checkErrorInResponse($response);
40
    }
41
42
    /**
43
     * Get different user data, for example, followers, following, pins.