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

FulfillmentEvent   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 47
ccs 29
cts 29
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B __construct() 0 40 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/fulfillmentevent
10
 *
11
 * @method create(float $parentId, float $childId, array $parameters = [])
12
 * @method get(float $parentId, float $childId, float $childChildId, array $parameters = [])
13
 * @method all(float $parentId, float $childId, array $parameters = [])
14
 * @method delete(float $parentId, float $childId, float $childChildId)
15
 */
16
class FulfillmentEvent extends AbstractResource implements Resource
17
{
18
    /**
19
     * FulfillmentEvent 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
            'create',
28 5
            new Action(
29 5
                Request::METHOD_POST,
30 5
                'orders/%s/fulfillments/%s/events.json',
31 5
                'fulfillment_event',
32 5
                'event'
33
34
            )
35
        );
36 5
        $this->actions->add(
37 5
            'get',
38 5
            new Action(
39 5
                Request::METHOD_GET,
40 5
                'orders/%s/fulfillments/%s/events/%s.json',
41 5
                'fulfillment_event',
42 5
                'fulfillment_event'
43
            )
44
        );
45 5
        $this->actions->add(
46 5
            'all',
47 5
            new Action(
48 5
                Request::METHOD_GET,
49 5
                'orders/%s/fulfillments/%s/events.json',
50 5
                'fulfillment_events',
51 5
                'fulfillment_events'
52
            )
53
        );
54 5
        $this->actions->add(
55 5
            'delete',
56 5
            new Action(
57 5
                Request::METHOD_DELETE,
58 5
                'orders/%s/fulfillments/%s/events/%s.json'
59
            )
60
        );
61 5
    }
62
}
63