OrderResource   A
last analyzed

Complexity

Total Complexity 9

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
dl 0
loc 45
rs 10
c 1
b 0
f 0
wmc 9

9 Methods

Rating   Name   Duplication   Size   Complexity  
A getRisks() 0 3 1
A getFulfillments() 0 3 1
A open() 0 3 1
A delete() 0 3 1
A update() 0 3 1
A getTransactions() 0 3 1
A getRefunds() 0 3 1
A close() 0 3 1
A cancel() 0 3 1
1
<?php
2
3
namespace Signifly\Shopify\REST\Resources;
4
5
use Illuminate\Support\Collection;
6
7
class OrderResource extends ApiResource
8
{
9
    public function update(array $data): ApiResource
10
    {
11
        return $this->shopify->updateOrder($this->id, $data);
0 ignored issues
show
Bug Best Practice introduced by
The property id does not exist on Signifly\Shopify\REST\Resources\OrderResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
12
    }
13
14
    public function delete(): void
15
    {
16
        $this->shopify->deleteOrder($this->id);
0 ignored issues
show
Bug Best Practice introduced by
The property id does not exist on Signifly\Shopify\REST\Resources\OrderResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
17
    }
18
19
    public function cancel(): ApiResource
20
    {
21
        return $this->shopify->cancelOrder($this->id);
0 ignored issues
show
Bug Best Practice introduced by
The property id does not exist on Signifly\Shopify\REST\Resources\OrderResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
22
    }
23
24
    public function close(): ApiResource
25
    {
26
        return $this->shopify->closeOrder($this->id);
0 ignored issues
show
Bug Best Practice introduced by
The property id does not exist on Signifly\Shopify\REST\Resources\OrderResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
27
    }
28
29
    public function open(): ApiResource
30
    {
31
        return $this->shopify->openOrder($this->id);
0 ignored issues
show
Bug Best Practice introduced by
The property id does not exist on Signifly\Shopify\REST\Resources\OrderResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
32
    }
33
34
    public function getFulfillments(array $params = []): Collection
35
    {
36
        return $this->shopify->getOrderFulfillments($this->id, $params);
0 ignored issues
show
Bug Best Practice introduced by
The property id does not exist on Signifly\Shopify\REST\Resources\OrderResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
37
    }
38
39
    public function getRefunds(array $params = []): Collection
40
    {
41
        return $this->shopify->getOrderRefunds($this->id, $params);
0 ignored issues
show
Bug Best Practice introduced by
The property id does not exist on Signifly\Shopify\REST\Resources\OrderResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
42
    }
43
44
    public function getRisks(array $params = []): Collection
45
    {
46
        return $this->shopify->getOrderRisks($this->id, $params);
0 ignored issues
show
Bug Best Practice introduced by
The property id does not exist on Signifly\Shopify\REST\Resources\OrderResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
47
    }
48
49
    public function getTransactions(array $params = []): Collection
50
    {
51
        return $this->shopify->getOrderTransactions($this->id, $params);
0 ignored issues
show
Bug Best Practice introduced by
The property id does not exist on Signifly\Shopify\REST\Resources\OrderResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
52
    }
53
}
54