@@ -7,7 +7,7 @@ |
||
7 | 7 | /** |
8 | 8 | * @param Address[] $entities |
9 | 9 | */ |
10 | - public function __construct(array $entities) |
|
10 | + public function __construct (array $entities) |
|
11 | 11 | { |
12 | 12 | parent::__construct($entities); |
13 | 13 | } |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | |
8 | 8 | class CreateObjectByNested extends CreateObject |
9 | 9 | { |
10 | - public function getAddressFrom() |
|
10 | + public function getAddressFrom () |
|
11 | 11 | { |
12 | 12 | $addressFrom = $this->attributes->mustHave('address_from')->asArray(); |
13 | 13 | $addressFromObj = new AddressCreate($addressFrom); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | return $addressFromObj->toArray(); |
16 | 16 | } |
17 | 17 | |
18 | - public function getAddressTo() |
|
18 | + public function getAddressTo () |
|
19 | 19 | { |
20 | 20 | $addressTo = $this->attributes->mustHave('address_to')->asArray(); |
21 | 21 | $addressToObj = new AddressCreate($addressTo); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | return $addressToObj->toArray(); |
24 | 24 | } |
25 | 25 | |
26 | - public function getParcel() |
|
26 | + public function getParcel () |
|
27 | 27 | { |
28 | 28 | $parcel = $this->attributes->mustHave('parcel')->asArray(); |
29 | 29 | $parcelObj = new ParcelCreate($parcel); |
@@ -10,7 +10,7 @@ |
||
10 | 10 | /** |
11 | 11 | * @return RefundCollection |
12 | 12 | */ |
13 | - public function getResults() |
|
13 | + public function getResults () |
|
14 | 14 | { |
15 | 15 | $entities = []; |
16 | 16 | foreach ($this->attributes->mayHave('results')->asArray() as $attributes) { |
@@ -10,7 +10,7 @@ |
||
10 | 10 | /** |
11 | 11 | * @return RefundCollection |
12 | 12 | */ |
13 | - public function getResults() |
|
13 | + public function getResults () |
|
14 | 14 | { |
15 | 15 | $entities = []; |
16 | 16 | foreach ($this->attributes->mayHave('results')->asArray() as $attributes) { |
@@ -10,7 +10,7 @@ |
||
10 | 10 | /** |
11 | 11 | * @return RefundCollection |
12 | 12 | */ |
13 | - public function getResults() |
|
13 | + public function getResults () |
|
14 | 14 | { |
15 | 15 | $entities = []; |
16 | 16 | foreach ($this->attributes->mayHave('results')->asArray() as $attributes) { |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | /** |
16 | 16 | * @return \ShippoClient\Entity\TrackingStatus |
17 | 17 | */ |
18 | - public function getTrackingStatus() |
|
18 | + public function getTrackingStatus () |
|
19 | 19 | { |
20 | 20 | return $this->attributes->mayHave('tracking_status') |
21 | 21 | ->asInstanceOf('\\ShippoClient\\Entity\\TrackingStatus'); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | /** |
25 | 25 | * @return \ShippoClient\Entity\TrackingHistory |
26 | 26 | */ |
27 | - public function getTrackingHistory() |
|
27 | + public function getTrackingHistory () |
|
28 | 28 | { |
29 | 29 | $entities = $this->attributes->mayHave('tracking_history') |
30 | 30 | ->asInstanceArray('ShippoClient\\Entity\\TrackingStatus'); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | return new TrackingHistory($entities); |
33 | 33 | } |
34 | 34 | |
35 | - public function toArray() |
|
35 | + public function toArray () |
|
36 | 36 | { |
37 | 37 | return [ |
38 | 38 | 'carrier' => $this->getCarrier(), |
@@ -9,12 +9,12 @@ |
||
9 | 9 | { |
10 | 10 | private $request; |
11 | 11 | |
12 | - public function __construct(Request $request) |
|
12 | + public function __construct (Request $request) |
|
13 | 13 | { |
14 | 14 | $this->request = $request; |
15 | 15 | } |
16 | 16 | |
17 | - public function getStandaloneTrack($carrier, $trackingNumber) |
|
17 | + public function getStandaloneTrack ($carrier, $trackingNumber) |
|
18 | 18 | { |
19 | 19 | $responseArray = $this->request->get("tracks/$carrier/$trackingNumber"); |
20 | 20 |
@@ -21,52 +21,52 @@ discard block |
||
21 | 21 | */ |
22 | 22 | private static $instance = null; |
23 | 23 | |
24 | - private function __construct(Request $request) |
|
24 | + private function __construct (Request $request) |
|
25 | 25 | { |
26 | 26 | $this->request = $request; |
27 | 27 | } |
28 | 28 | |
29 | - public function addresses() |
|
29 | + public function addresses () |
|
30 | 30 | { |
31 | 31 | return new Addresses($this->request); |
32 | 32 | } |
33 | 33 | |
34 | - public function parcels() |
|
34 | + public function parcels () |
|
35 | 35 | { |
36 | 36 | return new Parcels($this->request); |
37 | 37 | } |
38 | 38 | |
39 | - public function shipments() |
|
39 | + public function shipments () |
|
40 | 40 | { |
41 | 41 | return new Shipments($this->request); |
42 | 42 | } |
43 | 43 | |
44 | - public function rates() |
|
44 | + public function rates () |
|
45 | 45 | { |
46 | 46 | return new Rates($this->request); |
47 | 47 | } |
48 | 48 | |
49 | - public function transactions() |
|
49 | + public function transactions () |
|
50 | 50 | { |
51 | 51 | return new Transactions($this->request); |
52 | 52 | } |
53 | 53 | |
54 | - public function refunds() |
|
54 | + public function refunds () |
|
55 | 55 | { |
56 | 56 | return new Refunds($this->request); |
57 | 57 | } |
58 | 58 | |
59 | - public function tracks() |
|
59 | + public function tracks () |
|
60 | 60 | { |
61 | 61 | return new Tracks($this->request); |
62 | 62 | } |
63 | 63 | |
64 | - public function getAccessToken() |
|
64 | + public function getAccessToken () |
|
65 | 65 | { |
66 | 66 | return $this->accessToken; |
67 | 67 | } |
68 | 68 | |
69 | - public function setRequestOption($keyOrPath, $value) |
|
69 | + public function setRequestOption ($keyOrPath, $value) |
|
70 | 70 | { |
71 | 71 | $this->request->setDefaultOption($keyOrPath, $value); |
72 | 72 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * @param string $accessToken |
78 | 78 | * @return static |
79 | 79 | */ |
80 | - public static function provider($accessToken) |
|
80 | + public static function provider ($accessToken) |
|
81 | 81 | { |
82 | 82 | if (static::$instance !== null && static::$instance->getAccessToken() === $accessToken) { |
83 | 83 | return static::$instance; |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | return static::$instance; |
89 | 89 | } |
90 | 90 | |
91 | - public static function mock() |
|
91 | + public static function mock () |
|
92 | 92 | { |
93 | 93 | return MockCollection::getInstance(); |
94 | 94 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | * |
17 | 17 | * @return \DateTime |
18 | 18 | */ |
19 | - public function getObjectCreated() |
|
19 | + public function getObjectCreated () |
|
20 | 20 | { |
21 | 21 | return $this->attributes->mayHave('object_created')->asInstanceOf('\\DateTime'); |
22 | 22 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * |
27 | 27 | * @return \DateTime |
28 | 28 | */ |
29 | - public function getObjectUpdated() |
|
29 | + public function getObjectUpdated () |
|
30 | 30 | { |
31 | 31 | return $this->attributes->mayHave('object_updated')->asInstanceOf('\\DateTime'); |
32 | 32 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * |
37 | 37 | * @return \DateTime |
38 | 38 | */ |
39 | - public function getStatusDate() |
|
39 | + public function getStatusDate () |
|
40 | 40 | { |
41 | 41 | return $this->attributes->mayHave('status_date')->asInstanceOf('\\DateTime'); |
42 | 42 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | * |
47 | 47 | * @return string |
48 | 48 | */ |
49 | - public function getObjectId() |
|
49 | + public function getObjectId () |
|
50 | 50 | { |
51 | 51 | return $this->attributes->mayHave('object_id')->asString(); |
52 | 52 | } |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | * |
65 | 65 | * @return string |
66 | 66 | */ |
67 | - public function getStatus() |
|
67 | + public function getStatus () |
|
68 | 68 | { |
69 | 69 | return $this->attributes->mayHave('status')->asString(); |
70 | 70 | } |
@@ -72,13 +72,13 @@ discard block |
||
72 | 72 | /** |
73 | 73 | * @return Location |
74 | 74 | */ |
75 | - public function getLocation() |
|
75 | + public function getLocation () |
|
76 | 76 | { |
77 | 77 | $attributes = $this->attributes->mayHave('location')->asArray(); |
78 | 78 | return new Location($attributes); |
79 | 79 | } |
80 | 80 | |
81 | - public function toArray() |
|
81 | + public function toArray () |
|
82 | 82 | { |
83 | 83 | return [ |
84 | 84 | 'object_created' => $this->getObjectCreated(), |