Test Failed
Push — develop ( 1bc728...a00b17 )
by Edwin
03:32
created

Province::__construct()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 41
Code Lines 30

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 31
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 41
ccs 31
cts 31
cp 1
rs 8.8571
c 0
b 0
f 0
cc 1
eloc 30
nc 1
nop 1
crap 1
1
<?php
2
3
namespace ShopifyClient\Resource;
4
5
use ShopifyClient\Action\Action;
6
use ShopifyClient\Request;
7
8
/**
9
 * https://help.shopify.com/api/reference/province
10
 *
11
 * @method get(float $parentId, float $childId)
12
 * @method all(float $parentId)
13
 * @method count(float $parentId)
14
 * @method update(float $parentId, float $childId, array $parameters = [])
15
 */
16
class Province extends AbstractResource implements Resource
17
{
18
    /**
19
     * Province constructor.
20
     * @param Request $request
21
     */
22 5
    public function __construct(Request $request)
23
    {
24 5
        parent::__construct($request);
25
26 5
        $this->actions->add(
27 5
            'get',
28 5
            new Action(
29 5
                Request::METHOD_GET,
30 5
                'countries/%s/provinces/%s.json',
31 5
                'province',
32 5
                'province'
33
            )
34
        );
35 5
        $this->actions->add(
36 5
            'all',
37 5
            new Action(
38 5
                Request::METHOD_GET,
39 5
                'countries/%s/provinces.json',
40 5
                'provinces',
41 5
                'provinces'
42
            )
43
        );
44 5
        $this->actions->add(
45 5
            'count',
46 5
            new Action(
47 5
                Request::METHOD_GET,
48 5
                'countries/%s/provinces/count.json',
49 5
                'count',
50 5
                'count'
51
            )
52
        );
53 5
        $this->actions->add(
54 5
            'update',
55 5
            new Action(
56 5
                Request::METHOD_PUT,
57 5
                'countries/%s/provinces/%s.json',
58 5
                'province',
59 5
                'province'
60
            )
61
        );
62 5
    }
63
}
64