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

OrderEditQueryRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 19
c 0
b 0
f 0
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A of() 0 3 1
1
<?php
2
/**
3
 */
4
5
namespace Commercetools\Core\Request\OrderEdits;
6
7
use Commercetools\Core\Model\Common\Context;
8
use Commercetools\Core\Model\OrderEdit\OrderEditCollection;
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\OrderEdits
15
 *
16
 * @method OrderEditCollection mapResponse(ApiResponseInterface $response)
17
 * @method OrderEditCollection mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
18
 */
19
class OrderEditQueryRequest extends AbstractQueryRequest
20
{
21
    protected $resultClass = OrderEditCollection::class;
22
23
    /**
24
     * @param Context $context
25
     */
26 4
    public function __construct(Context $context = null)
27
    {
28 4
        parent::__construct(OrderEditsEndpoint::endpoint(), $context);
29 4
    }
30
31
    /**
32
     * @param Context $context
33
     * @return static
34
     */
35 4
    public static function of(Context $context = null)
36
    {
37 4
        return new static($context);
38
    }
39
}
40