Code Duplication    Length = 9-9 lines in 3 locations

src/Eccube/Service/PluginApiService.php 3 locations

@@ 152-160 (lines=9) @@
149
     *
150
     * @throws PluginApiException
151
     */
152
    public function getPurchased()
153
    {
154
        $url = $this->getApiUrl().'/plugins/purchased';
155
156
        $payload = $this->getRequestApi($url);
157
        $plugins = json_decode($payload, true);
158
159
        return $this->buildPlugins($plugins);
160
    }
161
162
    /**
163
     * Get recommended plugins list
@@ 169-177 (lines=9) @@
166
     *
167
     * @throws PluginApiException
168
     */
169
    public function getRecommended()
170
    {
171
        $url = $this->getApiUrl().'/plugins/recommended';
172
173
        $payload = $this->getRequestApi($url);
174
        $plugins = json_decode($payload, true);
175
176
        return $this->buildPlugins($plugins);
177
    }
178
179
    private function buildPlugins(&$plugins)
180
    {
@@ 217-225 (lines=9) @@
214
     *
215
     * @throws PluginApiException
216
     */
217
    public function getPlugin($id)
218
    {
219
        $url = $this->getApiUrl().'/plugin/'.$id;
220
221
        $payload = $this->getRequestApi($url);
222
        $json = json_decode($payload, true);
223
224
        return $this->buildInfo($json);
225
    }
226
227
    /**
228
     * API request processing