Code Duplication    Length = 11-13 lines in 4 locations

src/Yandex/Market/Partner/PartnerClient.php 4 locations

@@ 272-284 (lines=13) @@
269
     *
270
     * @return Models\Balance
271
     */
272
    public function getBalance()
273
    {
274
        $resource = 'campaigns/' . $this->campaignId . '/balance.json';
275
276
        $response = $this->sendRequest('GET', $this->getServiceUrl($resource));
277
278
        $decodedResponseBody = $this->getDecodedBody($response->getBody());
279
280
        $getBalanceResponse = new Models\GetBalanceResponse($decodedResponseBody);
281
        return $getBalanceResponse->getBalance();
282
    }
283
284
    /**
285
     * Get User Campaigns
286
     *
287
     * Returns the user to the list of campaigns Yandex.market.
@@ 295-305 (lines=11) @@
292
     *
293
     * @return Models\Campaigns
294
     */
295
    public function getCampaigns()
296
    {
297
        $resource = 'campaigns.json';
298
299
        $response = $this->sendRequest('GET', $this->getServiceUrl($resource));
300
301
        $decodedResponseBody = $this->getDecodedBody($response->getBody());
302
303
        $getCampaignsResponse = new Models\GetCampaignsResponse($decodedResponseBody);
304
        return $getCampaignsResponse->getCampaigns();
305
    }
306
307
    /**
308
     * Get User Campaigns by Login
@@ 314-324 (lines=11) @@
311
     *
312
     * @return Models\Campaigns
313
     */
314
    public function getCampaignsByLogin($login)
315
    {
316
        $resource = 'campaigns/by_login/' . $login . '.json';
317
318
        $response = $this->sendRequest('GET', $this->getServiceUrl($resource));
319
320
        $decodedResponseBody = $this->getDecodedBody($response->getBody());
321
322
        $getCampaignsResponse = new Models\GetCampaignsResponse($decodedResponseBody);
323
        return $getCampaignsResponse->getCampaigns();
324
    }
325
326
327
    /**
@@ 373-383 (lines=11) @@
370
     *
371
     * @link http://api.yandex.ru/market/partner/doc/dg/reference/get-campaigns-id-orders-id.xml
372
     */
373
    public function getOrder($orderId)
374
    {
375
        $resource = 'campaigns/' . $this->campaignId . '/orders/' . $orderId . '.json';
376
377
        $response = $this->sendRequest('GET', $this->getServiceUrl($resource));
378
379
        $decodedResponseBody = $this->getDecodedBody($response->getBody());
380
381
        $getOrderResponse = new Models\GetOrderResponse($decodedResponseBody);
382
        return $getOrderResponse->getOrder();
383
    }
384
385
386
    /**