Code Duplication    Length = 11-11 lines in 4 locations

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

@@ 362-372 (lines=11) @@
359
     *
360
     * @return Models\GetOutletsResponse
361
     */
362
    public function getOutletsResponse($params = [])
363
    {
364
        $resource = 'campaigns/' . $this->campaignId . '/outlets.json';
365
        $resource .= '?' . http_build_query($params);
366
367
        $response = $this->sendRequest('GET', $this->getServiceUrl($resource));
368
369
        $decodedResponseBody = $this->getDecodedBody($response->getBody());
370
371
        return new Models\GetOutletsResponse($decodedResponseBody);
372
    }
373
374
    /**
375
     * Get only outlets data without pagination
@@ 394-404 (lines=11) @@
391
     *
392
     * @return null|Models\Outlet
393
     */
394
    public function getOutlet($outletId)
395
    {
396
        $resource = 'campaigns/' . $this->campaignId . '/outlets/' . $outletId . '.json';
397
398
        $response = $this->sendRequest('GET', $this->getServiceUrl($resource));
399
400
        $decodedResponseBody = $this->getDecodedBody($response->getBody());
401
402
        $getOrderResponse = new Models\GetOutletResponse($decodedResponseBody);
403
        return $getOrderResponse->getOutlet();
404
    }
405
406
407
    /**
@@ 420-430 (lines=11) @@
417
     *
418
     * @return GetOrdersResponse
419
     */
420
    public function getOrdersResponse($params = [])
421
    {
422
        $resource = 'campaigns/' . $this->campaignId . '/orders.json';
423
        $resource .= '?' . http_build_query($params);
424
425
        $response = $this->sendRequest('GET', $this->getServiceUrl($resource));
426
427
        $decodedResponseBody = $this->getDecodedBody($response->getBody());
428
429
        return new GetOrdersResponse($decodedResponseBody);
430
    }
431
432
    /**
433
     * Get only orders data without pagination
@@ 451-461 (lines=11) @@
448
     *
449
     * @link http://api.yandex.ru/market/partner/doc/dg/reference/get-campaigns-id-orders-id.xml
450
     */
451
    public function getOrder($orderId)
452
    {
453
        $resource = 'campaigns/' . $this->campaignId . '/orders/' . $orderId . '.json';
454
455
        $response = $this->sendRequest('GET', $this->getServiceUrl($resource));
456
457
        $decodedResponseBody = $this->getDecodedBody($response->getBody());
458
459
        $getOrderResponse = new GetOrderResponse($decodedResponseBody);
460
        return $getOrderResponse->getOrder();
461
    }
462
463
    /**
464
     * Get Region