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

ChannelQueryRequest::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 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