@@ -10,7 +10,7 @@ |
||
10 | 10 | /** |
11 | 11 | * @return TransactionCollection |
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 RateCollection |
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) { |
@@ -11,7 +11,7 @@ |
||
11 | 11 | /** |
12 | 12 | * @return ParcelCollection |
13 | 13 | */ |
14 | - public function getResults() |
|
14 | + public function getResults () |
|
15 | 15 | { |
16 | 16 | $entities = []; |
17 | 17 | 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) { |
@@ -8,12 +8,12 @@ |
||
8 | 8 | private $request; |
9 | 9 | private $response; |
10 | 10 | |
11 | - /** |
|
12 | - * @param string $message |
|
13 | - * @param int $statusCode |
|
14 | - * @param array $request |
|
15 | - * @param array $response |
|
16 | - */ |
|
11 | + /** |
|
12 | + * @param string $message |
|
13 | + * @param int $statusCode |
|
14 | + * @param array $request |
|
15 | + * @param array $response |
|
16 | + */ |
|
17 | 17 | public function __construct($message, $statusCode, $request, $response) |
18 | 18 | { |
19 | 19 | parent::__construct($message); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | * @param array $request |
15 | 15 | * @param array $response |
16 | 16 | */ |
17 | - public function __construct($message, $statusCode, $request, $response) |
|
17 | + public function __construct ($message, $statusCode, $request, $response) |
|
18 | 18 | { |
19 | 19 | parent::__construct($message); |
20 | 20 | $this->statusCode = $statusCode; |
@@ -22,17 +22,17 @@ discard block |
||
22 | 22 | $this->response = $response; |
23 | 23 | } |
24 | 24 | |
25 | - public function getStatusCode() |
|
25 | + public function getStatusCode () |
|
26 | 26 | { |
27 | 27 | return $this->statusCode; |
28 | 28 | } |
29 | 29 | |
30 | - public function getRequest() |
|
30 | + public function getRequest () |
|
31 | 31 | { |
32 | 32 | return $this->request; |
33 | 33 | } |
34 | 34 | |
35 | - public function getResponse() |
|
35 | + public function getResponse () |
|
36 | 36 | { |
37 | 37 | return $this->response; |
38 | 38 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | * @return string |
34 | 34 | * @throws InvalidAttributeException |
35 | 35 | */ |
36 | - public function getObjectPurpose() |
|
36 | + public function getObjectPurpose () |
|
37 | 37 | { |
38 | 38 | $allowed = [static::OBJECT_PURPOSE_QUOTE, static::OBJECT_PURPOSE_PURCHASE]; |
39 | 39 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * @return string |
51 | 51 | * @throws InvalidAttributeException |
52 | 52 | */ |
53 | - public function getAddressFrom() |
|
53 | + public function getAddressFrom () |
|
54 | 54 | { |
55 | 55 | return $this->attributes->mustHave('address_from')->asString(); |
56 | 56 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * @return string |
64 | 64 | * @throws InvalidAttributeException |
65 | 65 | */ |
66 | - public function getAddressTo() |
|
66 | + public function getAddressTo () |
|
67 | 67 | { |
68 | 68 | return $this->attributes->mustHave('address_to')->asString(); |
69 | 69 | } |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | * @return string |
77 | 77 | * @throws InvalidAttributeException |
78 | 78 | */ |
79 | - public function getParcel() |
|
79 | + public function getParcel () |
|
80 | 80 | { |
81 | 81 | return $this->attributes->mustHave('parcel')->asString(); |
82 | 82 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | * @return string |
92 | 92 | * @throws InvalidAttributeException |
93 | 93 | */ |
94 | - public function getSubmissionType() |
|
94 | + public function getSubmissionType () |
|
95 | 95 | { |
96 | 96 | $allowed = [static::SUBMISSION_TYPE_DROPOFF, static::SUBMISSION_TYPE_PICKUP]; |
97 | 97 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | * |
115 | 115 | * @return string |
116 | 116 | */ |
117 | - public function getReturnOf() |
|
117 | + public function getReturnOf () |
|
118 | 118 | { |
119 | 119 | return $this->attributes->mayHave('return_of')->asString(); |
120 | 120 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | * @return string |
132 | 132 | * @throws InvalidAttributeException |
133 | 133 | */ |
134 | - public function getSubmissionDate() |
|
134 | + public function getSubmissionDate () |
|
135 | 135 | { |
136 | 136 | $isIOS8601Format = function ($datetime) { |
137 | 137 | // this pattern is not strict but is sufficient |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | * |
160 | 160 | * @return string |
161 | 161 | */ |
162 | - public function getAddressReturn() |
|
162 | + public function getAddressReturn () |
|
163 | 163 | { |
164 | 164 | return $this->attributes->mayHave('address_return')->asString(); |
165 | 165 | } |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | * |
172 | 172 | * @return string |
173 | 173 | */ |
174 | - public function getCustomsDeclaration() |
|
174 | + public function getCustomsDeclaration () |
|
175 | 175 | { |
176 | 176 | return $this->attributes->mayHave('customs_declaration')->asString(); |
177 | 177 | } |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | * |
186 | 186 | * @return float |
187 | 187 | */ |
188 | - public function getInsuranceAmount() |
|
188 | + public function getInsuranceAmount () |
|
189 | 189 | { |
190 | 190 | return $this->attributes->mayHave('insurance_amount')->asFloat(); |
191 | 191 | } |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | * @return string |
200 | 200 | * @throws InvalidAttributeException |
201 | 201 | */ |
202 | - public function getInsuranceCurrency() |
|
202 | + public function getInsuranceCurrency () |
|
203 | 203 | { |
204 | 204 | if ($this->attributes->mayHave('insurance_amount')->value() === null) { |
205 | 205 | return $this->attributes->mayHave('insurance_currency')->asString(); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | * |
226 | 226 | * @return array |
227 | 227 | */ |
228 | - public function getExtra() |
|
228 | + public function getExtra () |
|
229 | 229 | { |
230 | 230 | return $this->attributes->mayHave('extra')->asArray(); |
231 | 231 | } |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | * |
238 | 238 | * @return string |
239 | 239 | */ |
240 | - public function getReference1() |
|
240 | + public function getReference1 () |
|
241 | 241 | { |
242 | 242 | return $this->attributes->mayHave('reference_1')->asString(); |
243 | 243 | } |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | * |
250 | 250 | * @return string |
251 | 251 | */ |
252 | - public function getReference2() |
|
252 | + public function getReference2 () |
|
253 | 253 | { |
254 | 254 | return $this->attributes->mayHave('reference_2')->asString(); |
255 | 255 | } |
@@ -261,12 +261,12 @@ discard block |
||
261 | 261 | * |
262 | 262 | * @return string |
263 | 263 | */ |
264 | - public function getCarrierAccounts() |
|
264 | + public function getCarrierAccounts () |
|
265 | 265 | { |
266 | 266 | return $this->attributes->mayHave('carrier_accounts')->asArray(); |
267 | 267 | } |
268 | 268 | |
269 | - public function toArray() |
|
269 | + public function toArray () |
|
270 | 270 | { |
271 | 271 | return array_filter($this->__toArray()); |
272 | 272 | } |
@@ -15,11 +15,11 @@ discard block |
||
15 | 15 | |
16 | 16 | private static $container = []; |
17 | 17 | |
18 | - private function __construct() |
|
18 | + private function __construct () |
|
19 | 19 | { |
20 | 20 | } |
21 | 21 | |
22 | - public static function getInstance() |
|
22 | + public static function getInstance () |
|
23 | 23 | { |
24 | 24 | if (self::$instance !== null) { |
25 | 25 | return self::$instance; |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | return self::$instance; |
30 | 30 | } |
31 | 31 | |
32 | - public function has($endPoint) |
|
32 | + public function has ($endPoint) |
|
33 | 33 | { |
34 | 34 | return array_key_exists($endPoint, self::$container); |
35 | 35 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | * @param string $endPoint |
39 | 39 | * @return MockPlugin |
40 | 40 | */ |
41 | - public function getMockResponse($endPoint) |
|
41 | + public function getMockResponse ($endPoint) |
|
42 | 42 | { |
43 | 43 | $response = new Response(self::$container[$endPoint]['statusCode']); |
44 | 44 | $response->setBody(json_encode(self::$container[$endPoint]['response'])); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | return $mock; |
49 | 49 | } |
50 | 50 | |
51 | - public function add($path, $statusCode, $response) |
|
51 | + public function add ($path, $statusCode, $response) |
|
52 | 52 | { |
53 | 53 | self::$container[$path] = [ |
54 | 54 | 'statusCode' => $statusCode, |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | return $this; |
59 | 59 | } |
60 | 60 | |
61 | - public function clear() |
|
61 | + public function clear () |
|
62 | 62 | { |
63 | 63 | self::$container = []; |
64 | 64 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | * |
15 | 15 | * @return string |
16 | 16 | */ |
17 | - public function getMetadata() |
|
17 | + public function getMetadata () |
|
18 | 18 | { |
19 | 19 | return $this->attributes->mayHave('metadata')->asString(function ($metadata) { |
20 | 20 | return mb_strlen($metadata) <= 100; |
@@ -20,7 +20,7 @@ |
||
20 | 20 | * @return string |
21 | 21 | * @throws InvalidAttributeException |
22 | 22 | */ |
23 | - public function getRate() |
|
23 | + public function getRate () |
|
24 | 24 | { |
25 | 25 | return $this->attributes->mustHave('rate')->asString(); |
26 | 26 | } |