Passed
Pull Request — develop (#492)
by nikos
11:03 queued 10s
created

StoreQueryRequest::of()   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\Stores;
6
7
use Commercetools\Core\Model\Common\Context;
8
use Commercetools\Core\Model\Store\StoreCollection;
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\Stores
15
 * @link https://docs.commercetools.com/http-api-projects-stores#query-stores
16
 * @method StoreCollection mapResponse(ApiResponseInterface $response)
17
 * @method StoreCollection mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
18
 */
19
class StoreQueryRequest extends AbstractQueryRequest
20
{
21
    protected $resultClass = StoreCollection::class;
22
23
    /**
24
     * @param Context $context
25
     */
26 4
    public function __construct(Context $context = null)
27
    {
28 4
        parent::__construct(StoresEndpoint::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