@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | { |
167 | 167 | $this->questionHelper = $this->command->getHelper('question'); |
168 | 168 | $inputString = implode(PHP_EOL, $this->inputChoices); |
169 | - $this->questionHelper->setInputStream($this->getInputStream($inputString.PHP_EOL)); |
|
169 | + $this->questionHelper->setInputStream($this->getInputStream($inputString . PHP_EOL)); |
|
170 | 170 | |
171 | 171 | $this->tester->execute(['command' => $name]); |
172 | 172 | } |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | private function iExecuteCommandAndConfirm($name) |
178 | 178 | { |
179 | 179 | $this->questionHelper = $this->command->getHelper('question'); |
180 | - $inputString = 'y'.PHP_EOL; |
|
180 | + $inputString = 'y' . PHP_EOL; |
|
181 | 181 | $this->questionHelper->setInputStream($this->getInputStream($inputString)); |
182 | 182 | |
183 | 183 | $this->tester->execute(['command' => $name]); |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | $itemsCount = $this->showPage->countItems(); |
243 | 243 | |
244 | 244 | Assert::same( |
245 | - (int)$amount, |
|
245 | + (int) $amount, |
|
246 | 246 | $itemsCount, |
247 | 247 | sprintf('There should be %d items, but get %d.', $amount, $itemsCount) |
248 | 248 | ); |
@@ -721,7 +721,7 @@ discard block |
||
721 | 721 | { |
722 | 722 | $actualNumberOfPayments = $this->showPage->getPaymentsCount(); |
723 | 723 | |
724 | - Assert::same((int)$number, $actualNumberOfPayments); |
|
724 | + Assert::same((int) $number, $actualNumberOfPayments); |
|
725 | 725 | } |
726 | 726 | |
727 | 727 | /** |
@@ -45,11 +45,11 @@ discard block |
||
45 | 45 | */ |
46 | 46 | private function specifyAddress(AddressInterface $address, $addressType) |
47 | 47 | { |
48 | - $this->specifyElementValue($addressType.'_first_name', $address->getFirstName()); |
|
49 | - $this->specifyElementValue($addressType.'_last_name', $address->getLastName()); |
|
50 | - $this->specifyElementValue($addressType.'_street', $address->getStreet()); |
|
51 | - $this->specifyElementValue($addressType.'_city', $address->getCity()); |
|
52 | - $this->specifyElementValue($addressType.'_postcode', $address->getPostcode()); |
|
48 | + $this->specifyElementValue($addressType . '_first_name', $address->getFirstName()); |
|
49 | + $this->specifyElementValue($addressType . '_last_name', $address->getLastName()); |
|
50 | + $this->specifyElementValue($addressType . '_street', $address->getStreet()); |
|
51 | + $this->specifyElementValue($addressType . '_city', $address->getCity()); |
|
52 | + $this->specifyElementValue($addressType . '_postcode', $address->getPostcode()); |
|
53 | 53 | |
54 | 54 | $this->chooseCountry($address->getCountryCode(), $addressType); |
55 | 55 | } |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | private function chooseCountry($country, $addressType) |
116 | 116 | { |
117 | - $this->getElement($addressType.'_country')->selectOption((null !== $country) ? $country : 'Select'); |
|
117 | + $this->getElement($addressType . '_country')->selectOption((null !== $country) ? $country : 'Select'); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | /** |
@@ -57,33 +57,33 @@ |
||
57 | 57 | |
58 | 58 | $m = 0; |
59 | 59 | foreach ($order->getItems() as $item) { |
60 | - $details['L_PAYMENTREQUEST_0_NAME'.$m] = $item->getVariant()->getProduct()->getName(); |
|
61 | - $details['L_PAYMENTREQUEST_0_AMT'.$m] = $this->formatPrice($item->getDiscountedUnitPrice()); |
|
62 | - $details['L_PAYMENTREQUEST_0_QTY'.$m] = $item->getQuantity(); |
|
60 | + $details['L_PAYMENTREQUEST_0_NAME' . $m] = $item->getVariant()->getProduct()->getName(); |
|
61 | + $details['L_PAYMENTREQUEST_0_AMT' . $m] = $this->formatPrice($item->getDiscountedUnitPrice()); |
|
62 | + $details['L_PAYMENTREQUEST_0_QTY' . $m] = $item->getQuantity(); |
|
63 | 63 | |
64 | 64 | ++$m; |
65 | 65 | } |
66 | 66 | |
67 | 67 | if (0 !== $taxTotal = $order->getAdjustmentsTotalRecursively(AdjustmentInterface::TAX_ADJUSTMENT)) { |
68 | - $details['L_PAYMENTREQUEST_0_NAME'.$m] = 'Tax Total'; |
|
69 | - $details['L_PAYMENTREQUEST_0_AMT'.$m] = $this->formatPrice($taxTotal); |
|
70 | - $details['L_PAYMENTREQUEST_0_QTY'.$m] = 1; |
|
68 | + $details['L_PAYMENTREQUEST_0_NAME' . $m] = 'Tax Total'; |
|
69 | + $details['L_PAYMENTREQUEST_0_AMT' . $m] = $this->formatPrice($taxTotal); |
|
70 | + $details['L_PAYMENTREQUEST_0_QTY' . $m] = 1; |
|
71 | 71 | |
72 | 72 | ++$m; |
73 | 73 | } |
74 | 74 | |
75 | 75 | if (0 !== $promotionTotal = $order->getOrderPromotionTotal()) { |
76 | - $details['L_PAYMENTREQUEST_0_NAME'.$m] = 'Discount'; |
|
77 | - $details['L_PAYMENTREQUEST_0_AMT'.$m] = $this->formatPrice($promotionTotal); |
|
78 | - $details['L_PAYMENTREQUEST_0_QTY'.$m] = 1; |
|
76 | + $details['L_PAYMENTREQUEST_0_NAME' . $m] = 'Discount'; |
|
77 | + $details['L_PAYMENTREQUEST_0_AMT' . $m] = $this->formatPrice($promotionTotal); |
|
78 | + $details['L_PAYMENTREQUEST_0_QTY' . $m] = 1; |
|
79 | 79 | |
80 | 80 | ++$m; |
81 | 81 | } |
82 | 82 | |
83 | 83 | if (0 !== $shippingTotal = $order->getShippingTotal()) { |
84 | - $details['L_PAYMENTREQUEST_0_NAME'.$m] = 'Shipping Total'; |
|
85 | - $details['L_PAYMENTREQUEST_0_AMT'.$m] = $this->formatPrice($shippingTotal); |
|
86 | - $details['L_PAYMENTREQUEST_0_QTY'.$m] = 1; |
|
84 | + $details['L_PAYMENTREQUEST_0_NAME' . $m] = 'Shipping Total'; |
|
85 | + $details['L_PAYMENTREQUEST_0_AMT' . $m] = $this->formatPrice($shippingTotal); |
|
86 | + $details['L_PAYMENTREQUEST_0_QTY' . $m] = 1; |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | $request->setResult($details); |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $this->loadFixturesFromFile('authentication/api_administrator.yml'); |
121 | 121 | $currencies = $this->loadFixturesFromFile('resources/currencies.yml'); |
122 | 122 | |
123 | - $this->client->request('GET', '/api/currencies/'.$currencies['currency_1']->getCode(), [], [], static::$authorizedHeaderWithAccept); |
|
123 | + $this->client->request('GET', '/api/currencies/' . $currencies['currency_1']->getCode(), [], [], static::$authorizedHeaderWithAccept); |
|
124 | 124 | |
125 | 125 | $response = $this->client->getResponse(); |
126 | 126 | $this->assertResponse($response, 'currency/show_response', Response::HTTP_OK); |
@@ -141,12 +141,12 @@ discard block |
||
141 | 141 | $this->loadFixturesFromFile('authentication/api_administrator.yml'); |
142 | 142 | $currencies = $this->loadFixturesFromFile('resources/currencies.yml'); |
143 | 143 | |
144 | - $this->client->request('DELETE', '/api/currencies/'.$currencies['currency_1']->getCode(), [], [], static::$authorizedHeaderWithContentType, []); |
|
144 | + $this->client->request('DELETE', '/api/currencies/' . $currencies['currency_1']->getCode(), [], [], static::$authorizedHeaderWithContentType, []); |
|
145 | 145 | |
146 | 146 | $response = $this->client->getResponse(); |
147 | 147 | $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); |
148 | 148 | |
149 | - $this->client->request('GET', '/api/currencies/'.$currencies['currency_1']->getCode(), [], [], static::$authorizedHeaderWithAccept); |
|
149 | + $this->client->request('GET', '/api/currencies/' . $currencies['currency_1']->getCode(), [], [], static::$authorizedHeaderWithAccept); |
|
150 | 150 | |
151 | 151 | $response = $this->client->getResponse(); |
152 | 152 | $this->assertResponse($response, 'error/not_found_response', Response::HTTP_NOT_FOUND); |
@@ -96,7 +96,7 @@ |
||
96 | 96 | return $this->faker->email; |
97 | 97 | }) |
98 | 98 | ->setDefault('username', function (Options $options) { |
99 | - return $this->faker->firstName.' '.$this->faker->lastName; |
|
99 | + return $this->faker->firstName . ' ' . $this->faker->lastName; |
|
100 | 100 | }) |
101 | 101 | ->setDefault('enabled', true) |
102 | 102 | ->setAllowedTypes('enabled', 'bool') |
@@ -63,7 +63,7 @@ |
||
63 | 63 | ) { |
64 | 64 | $this->channelFactory = $channelFactory; |
65 | 65 | $this->localeRepository = $localeRepository; |
66 | - $this->currencyRepository= $currencyRepository; |
|
66 | + $this->currencyRepository = $currencyRepository; |
|
67 | 67 | |
68 | 68 | $this->faker = \Faker\Factory::create(); |
69 | 69 | $this->optionsResolver = new OptionsResolver(); |
@@ -53,7 +53,7 @@ |
||
53 | 53 | |
54 | 54 | public function cancel() |
55 | 55 | { |
56 | - $expiredUnpaidOrders = $this->orderRepository->findOrdersUnpaidSince(new \DateTime('-'.$this->expirationPeriod)); |
|
56 | + $expiredUnpaidOrders = $this->orderRepository->findOrdersUnpaidSince(new \DateTime('-' . $this->expirationPeriod)); |
|
57 | 57 | foreach ($expiredUnpaidOrders as $expiredUnpaidOrder) { |
58 | 58 | $this->cancelOrder($expiredUnpaidOrder); |
59 | 59 | } |
@@ -779,7 +779,7 @@ discard block |
||
779 | 779 | */ |
780 | 780 | public function iShouldSeeThisShippingAddressAsShippingAddress($fullName) |
781 | 781 | { |
782 | - $address = $this->sharedStorage->get('shipping_address_'.StringInflector::nameToLowercaseCode($fullName)); |
|
782 | + $address = $this->sharedStorage->get('shipping_address_' . StringInflector::nameToLowercaseCode($fullName)); |
|
783 | 783 | Assert::true( |
784 | 784 | $this->completePage->hasShippingAddress($address), |
785 | 785 | 'Shipping address is improper.' |
@@ -791,7 +791,7 @@ discard block |
||
791 | 791 | */ |
792 | 792 | public function iShouldSeeThisBillingAddressAsBillingAddress($fullName) |
793 | 793 | { |
794 | - $address = $this->sharedStorage->get('billing_address_'.StringInflector::nameToLowercaseCode($fullName)); |
|
794 | + $address = $this->sharedStorage->get('billing_address_' . StringInflector::nameToLowercaseCode($fullName)); |
|
795 | 795 | Assert::true( |
796 | 796 | $this->completePage->hasBillingAddress($address), |
797 | 797 | 'Billing address is improper.' |