@@ -66,33 +66,33 @@ |
||
66 | 66 | |
67 | 67 | $m = 0; |
68 | 68 | foreach ($order->getItems() as $item) { |
69 | - $details['L_PAYMENTREQUEST_0_NAME'.$m] = $item->getVariant()->getProduct()->getName(); |
|
70 | - $details['L_PAYMENTREQUEST_0_AMT'.$m] = $this->convertAndFormatPrice($item->getDiscountedUnitPrice(), $order->getCurrencyCode()); |
|
71 | - $details['L_PAYMENTREQUEST_0_QTY'.$m] = $item->getQuantity(); |
|
69 | + $details['L_PAYMENTREQUEST_0_NAME' . $m] = $item->getVariant()->getProduct()->getName(); |
|
70 | + $details['L_PAYMENTREQUEST_0_AMT' . $m] = $this->convertAndFormatPrice($item->getDiscountedUnitPrice(), $order->getCurrencyCode()); |
|
71 | + $details['L_PAYMENTREQUEST_0_QTY' . $m] = $item->getQuantity(); |
|
72 | 72 | |
73 | 73 | ++$m; |
74 | 74 | } |
75 | 75 | |
76 | 76 | if (0 !== $taxTotal = $order->getAdjustmentsTotalRecursively(AdjustmentInterface::TAX_ADJUSTMENT)) { |
77 | - $details['L_PAYMENTREQUEST_0_NAME'.$m] = 'Tax Total'; |
|
78 | - $details['L_PAYMENTREQUEST_0_AMT'.$m] = $this->convertAndFormatPrice($taxTotal, $order->getCurrencyCode()); |
|
79 | - $details['L_PAYMENTREQUEST_0_QTY'.$m] = 1; |
|
77 | + $details['L_PAYMENTREQUEST_0_NAME' . $m] = 'Tax Total'; |
|
78 | + $details['L_PAYMENTREQUEST_0_AMT' . $m] = $this->convertAndFormatPrice($taxTotal, $order->getCurrencyCode()); |
|
79 | + $details['L_PAYMENTREQUEST_0_QTY' . $m] = 1; |
|
80 | 80 | |
81 | 81 | ++$m; |
82 | 82 | } |
83 | 83 | |
84 | 84 | if (0 !== $promotionTotal = $order->getOrderPromotionTotal()) { |
85 | - $details['L_PAYMENTREQUEST_0_NAME'.$m] = 'Discount'; |
|
86 | - $details['L_PAYMENTREQUEST_0_AMT'.$m] = $this->convertAndFormatPrice($promotionTotal, $order->getCurrencyCode()); |
|
87 | - $details['L_PAYMENTREQUEST_0_QTY'.$m] = 1; |
|
85 | + $details['L_PAYMENTREQUEST_0_NAME' . $m] = 'Discount'; |
|
86 | + $details['L_PAYMENTREQUEST_0_AMT' . $m] = $this->convertAndFormatPrice($promotionTotal, $order->getCurrencyCode()); |
|
87 | + $details['L_PAYMENTREQUEST_0_QTY' . $m] = 1; |
|
88 | 88 | |
89 | 89 | ++$m; |
90 | 90 | } |
91 | 91 | |
92 | 92 | if (0 !== $shippingTotal = $order->getShippingTotal()) { |
93 | - $details['L_PAYMENTREQUEST_0_NAME'.$m] = 'Shipping Total'; |
|
94 | - $details['L_PAYMENTREQUEST_0_AMT'.$m] = $this->convertAndFormatPrice($shippingTotal, $order->getCurrencyCode()); |
|
95 | - $details['L_PAYMENTREQUEST_0_QTY'.$m] = 1; |
|
93 | + $details['L_PAYMENTREQUEST_0_NAME' . $m] = 'Shipping Total'; |
|
94 | + $details['L_PAYMENTREQUEST_0_AMT' . $m] = $this->convertAndFormatPrice($shippingTotal, $order->getCurrencyCode()); |
|
95 | + $details['L_PAYMENTREQUEST_0_QTY' . $m] = 1; |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | $request->setResult($details); |
@@ -96,7 +96,7 @@ |
||
96 | 96 | protected function getPropertyName($name) |
97 | 97 | { |
98 | 98 | if (in_array($name, $this->translatableFields, true)) { |
99 | - return 'translations.'.$this->localeProvider->getDefaultLocaleCode().'.'.$name; |
|
99 | + return 'translations.' . $this->localeProvider->getDefaultLocaleCode() . '.' . $name; |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | return $name; |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | } |
135 | 135 | |
136 | 136 | /** @var MetadataInterface $translationResourceMetadata */ |
137 | - $translationResourceMetadata = $this->resourceMetadataRegistry->get($resourceMetadata->getAlias().'_translation'); |
|
137 | + $translationResourceMetadata = $this->resourceMetadataRegistry->get($resourceMetadata->getAlias() . '_translation'); |
|
138 | 138 | |
139 | 139 | $metadata->mapOneToMany([ |
140 | 140 | 'fieldName' => 'translations', |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | if (!$this->hasUniqueConstraint($metadata, $columns)) { |
195 | 195 | $constraints = isset($metadata->table['uniqueConstraints']) ? $metadata->table['uniqueConstraints'] : []; |
196 | 196 | |
197 | - $constraints[$metadata->getTableName().'_uniq_trans'] = [ |
|
197 | + $constraints[$metadata->getTableName() . '_uniq_trans'] = [ |
|
198 | 198 | 'columns' => $columns, |
199 | 199 | ]; |
200 | 200 |
@@ -133,11 +133,11 @@ |
||
133 | 133 | { |
134 | 134 | foreach ($parameters as $key => $value) { |
135 | 135 | if (is_array($value)) { |
136 | - $flattened = $this->flattenParameters($value, $flattened, $prefix.$key.'.'); |
|
136 | + $flattened = $this->flattenParameters($value, $flattened, $prefix . $key . '.'); |
|
137 | 137 | continue; |
138 | 138 | } |
139 | 139 | |
140 | - $flattened[$prefix.$key] = $value; |
|
140 | + $flattened[$prefix . $key] = $value; |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | return $flattened; |
@@ -28,7 +28,7 @@ |
||
28 | 28 | */ |
29 | 29 | public function load(array $config, ContainerBuilder $container) |
30 | 30 | { |
31 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
31 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
32 | 32 | $loader->load('services.xml'); |
33 | 33 | $loader->load('twig.xml'); |
34 | 34 | } |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | $this->loadFixturesFromFile('authentication/api_administrator.yml'); |
147 | 147 | $zones = $this->loadFixturesFromFile('resources/zones.yml'); |
148 | 148 | |
149 | - $this->client->request('GET', '/api/zones/'.$zones['zone_eu']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
149 | + $this->client->request('GET', '/api/zones/' . $zones['zone_eu']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
150 | 150 | |
151 | 151 | $response = $this->client->getResponse(); |
152 | 152 | $this->assertResponse($response, 'zone/show_response', Response::HTTP_OK); |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | $this->loadFixturesFromFile('authentication/api_administrator.yml'); |
185 | 185 | $zones = $this->loadFixturesFromFile('resources/zones.yml'); |
186 | 186 | |
187 | - $this->client->request('PUT', '/api/zones/'.$zones['zone_eu']->getId(), [], [], static::$authorizedHeaderWithContentType); |
|
187 | + $this->client->request('PUT', '/api/zones/' . $zones['zone_eu']->getId(), [], [], static::$authorizedHeaderWithContentType); |
|
188 | 188 | |
189 | 189 | $response = $this->client->getResponse(); |
190 | 190 | $this->assertResponse($response, 'zone/update_validation_fail_response', Response::HTTP_BAD_REQUEST); |
@@ -211,12 +211,12 @@ discard block |
||
211 | 211 | } |
212 | 212 | EOT; |
213 | 213 | |
214 | - $this->client->request('PUT', '/api/zones/'.$zones['zone_eu']->getId(), [], [], static::$authorizedHeaderWithContentType, $data); |
|
214 | + $this->client->request('PUT', '/api/zones/' . $zones['zone_eu']->getId(), [], [], static::$authorizedHeaderWithContentType, $data); |
|
215 | 215 | |
216 | 216 | $response = $this->client->getResponse(); |
217 | 217 | $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); |
218 | 218 | |
219 | - $this->client->request('GET', '/api/zones/'.$zones['zone_eu']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
219 | + $this->client->request('GET', '/api/zones/' . $zones['zone_eu']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
220 | 220 | |
221 | 221 | $response = $this->client->getResponse(); |
222 | 222 | $this->assertResponse($response, 'zone/update_response', Response::HTTP_OK); |
@@ -262,12 +262,12 @@ discard block |
||
262 | 262 | } |
263 | 263 | EOT; |
264 | 264 | |
265 | - $this->client->request('PATCH', '/api/zones/'.$zones['zone_eu']->getId(), [], [], static::$authorizedHeaderWithContentType, $data); |
|
265 | + $this->client->request('PATCH', '/api/zones/' . $zones['zone_eu']->getId(), [], [], static::$authorizedHeaderWithContentType, $data); |
|
266 | 266 | |
267 | 267 | $response = $this->client->getResponse(); |
268 | 268 | $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); |
269 | 269 | |
270 | - $this->client->request('GET', '/api/zones/'.$zones['zone_eu']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
270 | + $this->client->request('GET', '/api/zones/' . $zones['zone_eu']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
271 | 271 | |
272 | 272 | $response = $this->client->getResponse(); |
273 | 273 | $this->assertResponse($response, 'zone/update_response', Response::HTTP_OK); |
@@ -305,12 +305,12 @@ discard block |
||
305 | 305 | $this->loadFixturesFromFile('authentication/api_administrator.yml'); |
306 | 306 | $zones = $this->loadFixturesFromFile('resources/zones.yml'); |
307 | 307 | |
308 | - $this->client->request('DELETE', '/api/zones/'.$zones['zone_eu']->getId(), [], [], static::$authorizedHeaderWithContentType); |
|
308 | + $this->client->request('DELETE', '/api/zones/' . $zones['zone_eu']->getId(), [], [], static::$authorizedHeaderWithContentType); |
|
309 | 309 | |
310 | 310 | $response = $this->client->getResponse(); |
311 | 311 | $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); |
312 | 312 | |
313 | - $this->client->request('GET', '/api/zones/'.$zones['zone_eu']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
313 | + $this->client->request('GET', '/api/zones/' . $zones['zone_eu']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
314 | 314 | |
315 | 315 | $response = $this->client->getResponse(); |
316 | 316 | $this->assertResponseCode($response, Response::HTTP_NOT_FOUND); |
@@ -40,7 +40,7 @@ |
||
40 | 40 | $this->loadFixturesFromFile('authentication/api_administrator.yml'); |
41 | 41 | $channelData = $this->loadFixturesFromFile('resources/channels.yml'); |
42 | 42 | |
43 | - $this->client->request('GET', '/api/channels/'.$channelData['channel-web']->getId(), [], [], static::$authorizedHeaderWithContentType); |
|
43 | + $this->client->request('GET', '/api/channels/' . $channelData['channel-web']->getId(), [], [], static::$authorizedHeaderWithContentType); |
|
44 | 44 | |
45 | 45 | $response = $this->client->getResponse(); |
46 | 46 | $this->assertResponse($response, 'channel/show_response', Response::HTTP_OK); |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | |
153 | 153 | $imageForm = $this->getLastImageElement(); |
154 | 154 | $imageForm->fillField('Code', $code); |
155 | - $imageForm->find('css', 'input[type="file"]')->attachFile($filesPath.$path); |
|
155 | + $imageForm->find('css', 'input[type="file"]')->attachFile($filesPath . $path); |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | /** |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | $filesPath = $this->getParameter('files_path'); |
164 | 164 | |
165 | 165 | $imageForm = $this->getImageElementByCode($code); |
166 | - $imageForm->find('css', 'input[type="file"]')->attachFile($filesPath.$path); |
|
166 | + $imageForm->find('css', 'input[type="file"]')->attachFile($filesPath . $path); |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | /** |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | private function getImageElementByCode($code) |
262 | 262 | { |
263 | 263 | $images = $this->getElement('images'); |
264 | - $inputCode = $images->find('css', 'input[value="'.$code.'"]'); |
|
264 | + $inputCode = $images->find('css', 'input[value="' . $code . '"]'); |
|
265 | 265 | |
266 | 266 | if (null === $inputCode) { |
267 | 267 | return null; |
@@ -54,7 +54,7 @@ |
||
54 | 54 | |
55 | 55 | $imageForm = $this->getLastImageElement(); |
56 | 56 | $imageForm->fillField('Code', $code); |
57 | - $imageForm->find('css', 'input[type="file"]')->attachFile($filesPath.$path); |
|
57 | + $imageForm->find('css', 'input[type="file"]')->attachFile($filesPath . $path); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |