Code Duplication    Length = 8-9 lines in 4 locations

src/Api/Providers/Pins.php 4 locations

@@ 59-66 (lines=8) @@
56
     * @param string  $text Comment
57
     * @return array
58
     */
59
    public function comment($pinId, $text)
60
    {
61
        $this->request->checkLoggedIn();
62
        $post = PinHelper::createCommentRequest($pinId, $text);
63
        $postString = UrlHelper::buildRequestString($post);
64
        $response = $this->request->exec(UrlHelper::RESOURCE_COMMENT_PIN, $postString);
65
        return $this->response->getData($response);
66
    }
67
68
    /**
69
     * Writes comment for pin with current id
@@ 75-83 (lines=9) @@
72
     * @param integer $commentId
73
     * @return bool
74
     */
75
    public function deleteComment($pinId, $commentId)
76
    {
77
        $this->request->checkLoggedIn();
78
        $post = PinHelper::createCommentDeleteRequest($pinId, $commentId);
79
        $postString = UrlHelper::buildRequestString($post);
80
        $response = $this->request->exec(UrlHelper::RESOURCE_COMMENT_DELETE_PIN, $postString);
81
82
        return $this->response->checkErrorInResponse($response);
83
    }
84
85
    /**
86
     * Create pin. Returns created pin ID
@@ 128-136 (lines=9) @@
125
     * @param int $pinId
126
     * @return bool
127
     */
128
    public function delete($pinId)
129
    {
130
        $this->request->checkLoggedIn();
131
132
        $post = PinHelper::createSimplePinRequest($pinId);
133
        $postString = UrlHelper::buildRequestString($post);
134
        $response = $this->request->exec(UrlHelper::RESOURCE_DELETE_PIN, $postString);
135
        return $this->response->checkResponse($response);
136
    }
137
138
    /**
139
     * Get information of pin by PinID
@@ 144-151 (lines=8) @@
141
     * @param $pinId
142
     * @return array|bool
143
     */
144
    public function info($pinId)
145
    {
146
        $get = PinHelper::createInfoRequest($pinId);
147
        $url = UrlHelper::RESOURCE_PIN_INFO.'?'.UrlHelper::buildRequestString($get);
148
        $response = $this->request->exec($url);
149
150
        return $this->response->checkResponse($response);
151
    }
152
153
154
    protected function getScope()