Passed
Push — master ( 0d508a...6e2a06 )
by Jens
16:22 queued 10s
created

ApiClientQueryRequest::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 */
4
5
namespace Commercetools\Core\Request\ApiClients;
6
7
use Commercetools\Core\Model\ApiClient\ApiClientCollection;
8
use Commercetools\Core\Model\Common\Context;
9
use Commercetools\Core\Request\AbstractQueryRequest;
10
use Commercetools\Core\Response\ApiResponseInterface;
11
use Commercetools\Core\Model\MapperInterface;
12
13
/**
14
 * @package Commercetools\Core\Request\ApiClients
15
 * @method ApiClientCollection mapResponse(ApiResponseInterface $response)
16
 * @method ApiClientCollection mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
17
 */
18
class ApiClientQueryRequest extends AbstractQueryRequest
19
{
20
    protected $resultClass = ApiClientCollection::class;
21
22
    /**
23
     * @param Context $context
24
     */
25 4
    public function __construct(Context $context = null)
26
    {
27 4
        parent::__construct(ApiClientsEndpoint::endpoint(), $context);
28 4
    }
29
30
    /**
31
     * @param Context $context
32
     * @return static
33
     */
34 4
    public static function of(Context $context = null)
35
    {
36 4
        return new static($context);
37
    }
38
}
39