Completed
Push — master ( 18bfc7...82e0b5 )
by Jens
18:00 queued 05:19
created

SubscriptionQueryRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 2
dl 0
loc 21
ccs 0
cts 8
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A of() 0 4 1
1
<?php
2
/**
3
 * @author @jayS-de <[email protected]>
4
 */
5
6
namespace Commercetools\Core\Request\Subscriptions;
7
8
use Commercetools\Core\Model\Common\Context;
9
use Commercetools\Core\Model\Subscription\SubscriptionCollection;
10
use Commercetools\Core\Request\AbstractQueryRequest;
11
use Commercetools\Core\Response\ApiResponseInterface;
12
use Commercetools\Core\Model\MapperInterface;
13
14
/**
15
 * @package Commercetools\Core\Request\Subscriptions
16
 * @link https://dev.commercetools.com/http-api-projects-subscriptions.html#query-subscriptions
17
 * @method SubscriptionCollection mapResponse(ApiResponseInterface $response)
18
 * @method SubscriptionCollection mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class SubscriptionQueryRequest extends AbstractQueryRequest
21
{
22
    protected $resultClass = '\Commercetools\Core\Model\Subscription\SubscriptionCollection';
23
24
    /**
25
     * @param Context $context
26
     */
27
    public function __construct(Context $context = null)
28
    {
29
        parent::__construct(SubscriptionsEndpoint::endpoint(), $context);
30
    }
31
32
    /**
33
     * @param Context $context
34
     * @return static
35
     */
36
    public static function of(Context $context = null)
37
    {
38
        return new static($context);
39
    }
40
}
41