Code Duplication    Length = 9-10 lines in 3 locations

src/Api/Providers/Pins.php 3 locations

@@ 42-50 (lines=9) @@
39
     * @param $url
40
     * @return bool
41
     */
42
    protected function likePinMethodCall($pinId, $url)
43
    {
44
        $this->request->checkLoggedIn();
45
        $data = PinHelper::createPinIdRequest($pinId);
46
        $post = PinHelper::createPinRequestData($data);
47
        $postString = URlHelper::buildRequestString($post);
48
        $response = $this->request->exec($url, $postString);
49
        return $this->response->checkErrorInResponse($response);
50
    }
51
52
    /**
53
     * Writes comment for pin with current id
@@ 93-101 (lines=9) @@
90
     * @param string $description
91
     * @return bool|int
92
     */
93
    public function create($imageUrl, $boardId, $description = "")
94
    {
95
        $this->request->checkLoggedIn();
96
        $post = PinHelper::createPinCreationRequest($imageUrl, $boardId, $description);
97
        $postString = UrlHelper::buildRequestString($post);
98
        $res = $this->request->exec(UrlHelper::RESOURCE_CREATE_PIN, $postString);
99
100
        return $this->response->getData($res, 'id');
101
    }
102
103
    /**
104
     * Repin
@@ 111-120 (lines=10) @@
108
     * @param string $description
109
     * @return bool|int
110
     */
111
    public function repin($repinId, $boardId, $description = "")
112
    {
113
        $this->request->checkLoggedIn();
114
115
        $post = PinHelper::createRepinRequest($repinId, $boardId, $description);
116
        $postString = UrlHelper::buildRequestString($post);
117
        $res = $this->request->exec(UrlHelper::RESOURCE_REPIN, $postString);
118
119
        return $this->response->getData($res, 'id');
120
    }
121
122
    /**
123
     * Delete pin