Completed
Push — master ( fa9a11...9c37c7 )
by Jens
13:15
created

ChannelQueryRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 21
ccs 5
cts 5
cp 1
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\Channels;
7
8
use Commercetools\Core\Model\Common\Context;
9
use Commercetools\Core\Request\AbstractQueryRequest;
10
use Commercetools\Core\Model\Channel\ChannelCollection;
11
use Commercetools\Core\Response\ApiResponseInterface;
12
13
/**
14
 * @package Commercetools\Core\Request\Channels
15
 * @link https://dev.commercetools.com/http-api-projects-channels.html#channels-by-query
16
 * @method ChannelCollection mapResponse(ApiResponseInterface $response)
17
 */
18
class ChannelQueryRequest extends AbstractQueryRequest
19
{
20
    protected $resultClass = '\Commercetools\Core\Model\Channel\ChannelCollection';
21
22
    /**
23
     * @param Context $context
24
     */
25 3
    public function __construct(Context $context = null)
26
    {
27 3
        parent::__construct(ChannelsEndpoint::endpoint(), $context);
28 3
    }
29
30
    /**
31
     * @param Context $context
32
     * @return static
33
     */
34 3
    public static function of(Context $context = null)
35
    {
36 3
        return new static($context);
37
    }
38
}
39