@@ -38,5 +38,5 @@ |
||
38 | 38 | $obj = json_decode(json_encode($obj), true); |
39 | 39 | } |
40 | 40 | |
41 | - return (array)$obj; |
|
41 | + return (array) $obj; |
|
42 | 42 | } |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | 2 | // Don't redefine the functions if included multiple times. |
3 | 3 | if (!function_exists('Loevgaard\DandomainFoundation\createMoney')) { |
4 | - require_once __DIR__ . '/functions.php'; |
|
4 | + require_once __DIR__.'/functions.php'; |
|
5 | 5 | } |
@@ -77,7 +77,7 @@ |
||
77 | 77 | |
78 | 78 | $this |
79 | 79 | ->setExternalId($data['id']) |
80 | - ->setFee(DandomainFoundation\createMoney((string)$currency, $data['fee'])) |
|
80 | + ->setFee(DandomainFoundation\createMoney((string) $currency, $data['fee'])) |
|
81 | 81 | ->setFeeInclVat($data['feeInclVat']) |
82 | 82 | ->setName($data['name']) |
83 | 83 | ; |
@@ -94,7 +94,7 @@ |
||
94 | 94 | */ |
95 | 95 | public function getId(): int |
96 | 96 | { |
97 | - return (int)$this->id; |
|
97 | + return (int) $this->id; |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | $paymentMethod = $this->getPaymentMethod(); |
405 | 405 | if (!$paymentMethod) { |
406 | 406 | $paymentMethod = new PaymentMethod(); |
407 | - $paymentMethod->populateFromApiResponse($data['paymentInfo'], (string)$data['currencyCode']); |
|
407 | + $paymentMethod->populateFromApiResponse($data['paymentInfo'], (string) $data['currencyCode']); |
|
408 | 408 | } |
409 | 409 | $this->setPaymentMethod($paymentMethod); |
410 | 410 | |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | $shippingMethod = $this->getShippingMethod(); |
413 | 413 | if (!$shippingMethod) { |
414 | 414 | $shippingMethod = new ShippingMethod(); |
415 | - $shippingMethod->populateFromApiResponse($data['shippingInfo'], (string)$data['currencyCode']); |
|
415 | + $shippingMethod->populateFromApiResponse($data['shippingInfo'], (string) $data['currencyCode']); |
|
416 | 416 | } |
417 | 417 | $this->setShippingMethod($shippingMethod); |
418 | 418 | |
@@ -443,7 +443,7 @@ discard block |
||
443 | 443 | */ |
444 | 444 | public function getTotalPrice() : ?Money |
445 | 445 | { |
446 | - return $this->createMoney((int)$this->totalPrice); |
|
446 | + return $this->createMoney((int) $this->totalPrice); |
|
447 | 447 | } |
448 | 448 | |
449 | 449 | /** |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | */ |
463 | 463 | public function getSalesDiscount() : ?Money |
464 | 464 | { |
465 | - return $this->createMoney((int)$this->salesDiscount); |
|
465 | + return $this->createMoney((int) $this->salesDiscount); |
|
466 | 466 | } |
467 | 467 | |
468 | 468 | /** |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | */ |
482 | 482 | public function getGiftCertificateAmount() : ?Money |
483 | 483 | { |
484 | - return $this->createMoney((int)$this->giftCertificateAmount); |
|
484 | + return $this->createMoney((int) $this->giftCertificateAmount); |
|
485 | 485 | } |
486 | 486 | |
487 | 487 | /** |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | */ |
501 | 501 | public function getShippingMethodFee() : ?Money |
502 | 502 | { |
503 | - return $this->createMoney((int)$this->shippingMethodFee); |
|
503 | + return $this->createMoney((int) $this->shippingMethodFee); |
|
504 | 504 | } |
505 | 505 | |
506 | 506 | /** |
@@ -519,7 +519,7 @@ discard block |
||
519 | 519 | */ |
520 | 520 | public function getPaymentMethodFee() : ?Money |
521 | 521 | { |
522 | - return $this->createMoney((int)$this->paymentMethodFee); |
|
522 | + return $this->createMoney((int) $this->paymentMethodFee); |
|
523 | 523 | } |
524 | 524 | |
525 | 525 | /** |
@@ -1135,7 +1135,7 @@ discard block |
||
1135 | 1135 | */ |
1136 | 1136 | private function createMoney(int $amount = 0) : ?Money |
1137 | 1137 | { |
1138 | - return DandomainFoundation\createMoney((string)$this->currencyCode, $amount); |
|
1138 | + return DandomainFoundation\createMoney((string) $this->currencyCode, $amount); |
|
1139 | 1139 | } |
1140 | 1140 | |
1141 | 1141 | /** |
@@ -1146,6 +1146,6 @@ discard block |
||
1146 | 1146 | */ |
1147 | 1147 | private function createMoneyFromFloat($amount = 0.0) : ?Money |
1148 | 1148 | { |
1149 | - return DandomainFoundation\createMoneyFromFloat((string)$this->currencyCode, $amount); |
|
1149 | + return DandomainFoundation\createMoneyFromFloat((string) $this->currencyCode, $amount); |
|
1150 | 1150 | } |
1151 | 1151 | } |
@@ -160,7 +160,7 @@ |
||
160 | 160 | */ |
161 | 161 | public function getId() : int |
162 | 162 | { |
163 | - return (int)$this->id; |
|
163 | + return (int) $this->id; |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | /** |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | $this |
79 | 79 | ->setExternalId($data['id']) |
80 | - ->setFee(DandomainFoundation\createMoney((string)$currency, $data['fee'])) |
|
80 | + ->setFee(DandomainFoundation\createMoney((string) $currency, $data['fee'])) |
|
81 | 81 | ->setFeeInclVat($data['feeInclVat']) |
82 | 82 | ->setName($data['name']) |
83 | 83 | ; |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | public function getId(): int |
92 | 92 | { |
93 | - return (int)$this->id; |
|
93 | + return (int) $this->id; |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | */ |
270 | 270 | public function getId(): int |
271 | 271 | { |
272 | - return (int)$this->id; |
|
272 | + return (int) $this->id; |
|
273 | 273 | } |
274 | 274 | |
275 | 275 | /** |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | */ |
288 | 288 | public function getExternalId(): int |
289 | 289 | { |
290 | - return (int)$this->externalId; |
|
290 | + return (int) $this->externalId; |
|
291 | 291 | } |
292 | 292 | |
293 | 293 | /** |