@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | $builder->customer->setEmail(sha1(uniqid('', true)) . '@example.com'); |
198 | 198 | } |
199 | 199 | $addresses = array_map( |
200 | - function (AddressBuilder $addressBuilder) { |
|
200 | + function(AddressBuilder $addressBuilder) { |
|
201 | 201 | return $addressBuilder->buildWithoutSave(); |
202 | 202 | }, |
203 | 203 | $builder->addressBuilders |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | * Magento automatically sets random confirmation key for new account with password. |
209 | 209 | * We need to save again with our own confirmation (null for confirmed customer) |
210 | 210 | */ |
211 | - $customer->setConfirmation((string)$builder->customer->getConfirmation()); |
|
211 | + $customer->setConfirmation((string) $builder->customer->getConfirmation()); |
|
212 | 212 | return $builder->customerRepository->save($customer); |
213 | 213 | } |
214 | 214 |
@@ -57,10 +57,10 @@ discard block |
||
57 | 57 | public function getAllAddressIds(): array |
58 | 58 | { |
59 | 59 | return array_map( |
60 | - function (AddressInterface $address): int { |
|
61 | - return (int)$address->getId(); |
|
60 | + function(AddressInterface $address): int { |
|
61 | + return (int) $address->getId(); |
|
62 | 62 | }, |
63 | - (array)$this->customer->getAddresses() |
|
63 | + (array) $this->customer->getAddresses() |
|
64 | 64 | ); |
65 | 65 | } |
66 | 66 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | public function getConfirmation(): string |
73 | 73 | { |
74 | - return (string)$this->customer->getConfirmation(); |
|
74 | + return (string) $this->customer->getConfirmation(); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | public function getEmail(): string |
@@ -86,7 +86,7 @@ |
||
86 | 86 | // refund items must be explicitly set |
87 | 87 | if (empty($this->orderItems)) { |
88 | 88 | foreach ($this->order->getItems() as $item) { |
89 | - $this->orderItems[$item->getItemId()] = (float)$item->getQtyOrdered(); |
|
89 | + $this->orderItems[$item->getItemId()] = (float) $item->getQtyOrdered(); |
|
90 | 90 | } |
91 | 91 | } |
92 | 92 |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | { |
42 | 42 | $qtys = []; |
43 | 43 | foreach ($this->order->getItems() as $item) { |
44 | - $qtys[$item->getItemId()] = (float)$item->getQtyOrdered(); |
|
44 | + $qtys[$item->getItemId()] = (float) $item->getQtyOrdered(); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | return $qtys; |
@@ -53,12 +53,12 @@ discard block |
||
53 | 53 | if ($payment === null) { |
54 | 54 | throw new \RuntimeException('Order does not have any payment information'); |
55 | 55 | } |
56 | - return (string)$payment->getMethod(); |
|
56 | + return (string) $payment->getMethod(); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | public function getShippingMethod(): string |
60 | 60 | { |
61 | - return (string)$this->order->getShippingMethod(); |
|
61 | + return (string) $this->order->getShippingMethod(); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | public function rollback(): void |
@@ -35,7 +35,7 @@ |
||
35 | 35 | { |
36 | 36 | /** @var Category $category */ |
37 | 37 | $category = $this->category; |
38 | - return (string)$category->getUrlKey(); |
|
38 | + return (string) $category->getUrlKey(); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | public function rollback(): void |
@@ -99,7 +99,7 @@ |
||
99 | 99 | |
100 | 100 | $category->setName('Child Category'); |
101 | 101 | $category->setIsActive(true); |
102 | - $category->setPath((string)$parent->getCategory()->getPath()); |
|
102 | + $category->setPath((string) $parent->getCategory()->getPath()); |
|
103 | 103 | |
104 | 104 | return new self( |
105 | 105 | $objectManager->create(CategoryRepositoryInterface::class), |
@@ -172,7 +172,7 @@ |
||
172 | 172 | // Collect missing totals, like shipping |
173 | 173 | $reloadedQuote->collectTotals(); |
174 | 174 | $order = $this->quoteManagement->submit($reloadedQuote); |
175 | - if (! $order instanceof Order) { |
|
175 | + if (!$order instanceof Order) { |
|
176 | 176 | $returnType = is_object($order) ? get_class($order) : gettype($order); |
177 | 177 | throw new \RuntimeException('QuoteManagement::submit() returned ' . $returnType . ' instead of Order'); |
178 | 178 | } |