@@ -305,14 +305,14 @@ discard block |
||
305 | 305 | [ |
306 | 306 | 'productRef' => LoadProductData::PRODUCT_1, |
307 | 307 | 'expectedResult' => true, |
308 | - 'expectedMessage' => 'Product has been removed from "<a href="/customer/shoppinglist/%s">'. |
|
308 | + 'expectedMessage' => 'Product has been removed from "<a href="/customer/shoppinglist/%s">' . |
|
309 | 309 | 'shopping_list_2_label</a>"', |
310 | 310 | 'expectedInitCount' => 2, |
311 | 311 | ], |
312 | 312 | [ |
313 | 313 | 'productRef' => LoadProductData::PRODUCT_2, |
314 | 314 | 'expectedResult' => true, |
315 | - 'expectedMessage' => 'Product has been removed from "<a href="/customer/shoppinglist/%s">'. |
|
315 | + 'expectedMessage' => 'Product has been removed from "<a href="/customer/shoppinglist/%s">' . |
|
316 | 316 | 'shopping_list_2_label</a>"', |
317 | 317 | 'expectedInitCount' => 1, |
318 | 318 | ], |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | [ |
334 | 334 | 'productRef' => LoadProductData::PRODUCT_1, |
335 | 335 | 'expectedResult' => true, |
336 | - 'expectedMessage' => 'Product has been removed from "<a href="/customer/shoppinglist/%s">'. |
|
336 | + 'expectedMessage' => 'Product has been removed from "<a href="/customer/shoppinglist/%s">' . |
|
337 | 337 | 'shopping_list_1_label</a>"', |
338 | 338 | 'expectedInitCount' => 1, |
339 | 339 | 'removeCurrent' => false, |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | 'oro_shopping_list_add_products_massaction', |
356 | 356 | [ |
357 | 357 | 'gridName' => 'frontend-product-search-grid', |
358 | - 'actionName' => 'oro_shoppinglist_frontend_addlineitemlist'.$shoppingList->getId(), |
|
358 | + 'actionName' => 'oro_shoppinglist_frontend_addlineitemlist' . $shoppingList->getId(), |
|
359 | 359 | 'shoppingList' => $shoppingList->getId(), |
360 | 360 | 'inset' => 1, |
361 | 361 | 'values' => $this->getReference('product-1')->getId(), |
@@ -229,9 +229,9 @@ |
||
229 | 229 | /** @var ShoppingList $currentShoppingList */ |
230 | 230 | $currentShoppingList = $shoppingListManager->getForCurrentUser(); |
231 | 231 | |
232 | - $this->assertQuickAddFormSubmitted($crawler, $products);//add to current |
|
232 | + $this->assertQuickAddFormSubmitted($crawler, $products); //add to current |
|
233 | 233 | $this->assertShoppingListItemSaved($currentShoppingList, $product->getSku(), 15); |
234 | - $this->assertQuickAddFormSubmitted($crawler, $products, $currentShoppingList->getId());//add to specific |
|
234 | + $this->assertQuickAddFormSubmitted($crawler, $products, $currentShoppingList->getId()); //add to specific |
|
235 | 235 | $this->assertShoppingListItemSaved($currentShoppingList, $product->getSku(), 30); |
236 | 236 | } |
237 | 237 |
@@ -122,7 +122,7 @@ |
||
122 | 122 | foreach ($prices as $identifier => $price) { |
123 | 123 | if ($price) { |
124 | 124 | $priceValue = $price->getValue(); |
125 | - $subtotalAmount += (float) $priceValue * $productsPriceCriterias[$identifier]->getQuantity(); |
|
125 | + $subtotalAmount += (float)$priceValue * $productsPriceCriterias[$identifier]->getQuantity(); |
|
126 | 126 | $subtotal->setVisible(true); |
127 | 127 | } |
128 | 128 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | self::TYPE => $this->getTotal($entity)->toArray(), |
73 | 73 | self::SUBTOTALS => $this->getSubtotals($entity) |
74 | 74 | ->map( |
75 | - function (Subtotal $subtotal) { |
|
75 | + function(Subtotal $subtotal) { |
|
76 | 76 | return $subtotal->toArray(); |
77 | 77 | } |
78 | 78 | ) |
@@ -123,13 +123,13 @@ discard block |
||
123 | 123 | $subtotals = []; |
124 | 124 | foreach ($this->subtotalProviderRegistry->getSupportedProviders($entity) as $provider) { |
125 | 125 | $entitySubtotals = $this->getEntitySubtotal($provider, $entity); |
126 | - $entitySubtotals = is_object($entitySubtotals) ? [$entitySubtotals] : (array) $entitySubtotals; |
|
126 | + $entitySubtotals = is_object($entitySubtotals) ? [$entitySubtotals] : (array)$entitySubtotals; |
|
127 | 127 | foreach ($entitySubtotals as $subtotal) { |
128 | 128 | $subtotals[] = $subtotal; |
129 | 129 | } |
130 | 130 | } |
131 | 131 | |
132 | - usort($subtotals, function (Subtotal $leftSubtotal, Subtotal $rightSubtotal) { |
|
132 | + usort($subtotals, function(Subtotal $leftSubtotal, Subtotal $rightSubtotal) { |
|
133 | 133 | return $leftSubtotal->getSortOrder() - $rightSubtotal->getSortOrder(); |
134 | 134 | }); |
135 | 135 |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | public function convertBeforeSave(array $configs) |
40 | 40 | { |
41 | 41 | $result = array_map( |
42 | - function ($config) { |
|
42 | + function($config) { |
|
43 | 43 | /** @var PriceListConfig $config */ |
44 | 44 | return [ |
45 | 45 | self::PRICE_LIST_KEY => $config->getPriceList()->getId(), |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | public function convertFromSaved(array $configs): array |
61 | 61 | { |
62 | 62 | $ids = array_map( |
63 | - function ($config) { |
|
63 | + function($config) { |
|
64 | 64 | return $config[self::PRICE_LIST_KEY]; |
65 | 65 | }, |
66 | 66 | $configs |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | usort( |
79 | 79 | $result, |
80 | - function ($a, $b) { |
|
80 | + function($a, $b) { |
|
81 | 81 | /** @var PriceListConfig $a */ |
82 | 82 | /** @var PriceListConfig $b */ |
83 | 83 | return ($a->getSortOrder() < $b->getSortOrder()) ? -1 : 1; |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | */ |
158 | 158 | protected function buildColumnName($currencyIsoCode, $priceAttributeId) |
159 | 159 | { |
160 | - return 'price_attribute_price_column_'.strtolower($currencyIsoCode).'_'.$priceAttributeId; |
|
160 | + return 'price_attribute_price_column_' . strtolower($currencyIsoCode) . '_' . $priceAttributeId; |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | /** |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | $priceRepository = $this->doctrineHelper->getEntityRepository('OroPricingBundle:PriceAttributeProductPrice'); |
187 | 187 | |
188 | 188 | $productIds = array_map( |
189 | - function (ResultRecord $record) { |
|
189 | + function(ResultRecord $record) { |
|
190 | 190 | return $record->getValue('id'); |
191 | 191 | }, |
192 | 192 | $records |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | */ |
233 | 233 | protected function buildJoinAlias($columnName) |
234 | 234 | { |
235 | - return $columnName.'_table'; |
|
235 | + return $columnName . '_table'; |
|
236 | 236 | } |
237 | 237 | |
238 | 238 | /** |
@@ -126,8 +126,7 @@ |
||
126 | 126 | $row = ['unit' => $unitCode]; |
127 | 127 | foreach ($currencies as $currency) { |
128 | 128 | $result = !empty($prices[$currency]) ? |
129 | - $prices[$currency]->getPrice()->getValue() : |
|
130 | - $this->translator->trans('oro.pricing.priceAttribute.withoutPrice'); |
|
129 | + $prices[$currency]->getPrice()->getValue() : $this->translator->trans('oro.pricing.priceAttribute.withoutPrice'); |
|
131 | 130 | |
132 | 131 | $row[$currency] = $result; |
133 | 132 | } |
@@ -110,7 +110,7 @@ |
||
110 | 110 | } |
111 | 111 | |
112 | 112 | $submitted = array_map( |
113 | - function (PriceListSchedule $item) { |
|
113 | + function(PriceListSchedule $item) { |
|
114 | 114 | return $item->getHash(); |
115 | 115 | }, |
116 | 116 | $priceList->getSchedules()->toArray() |
@@ -265,7 +265,7 @@ |
||
265 | 265 | /** @var ProductPriceRepository $priceRepository */ |
266 | 266 | $priceRepository = $this->doctrineHelper->getEntityRepository('OroPricingBundle:ProductPrice'); |
267 | 267 | |
268 | - $productIds = array_map(function (ResultRecord $record) { |
|
268 | + $productIds = array_map(function(ResultRecord $record) { |
|
269 | 269 | return $record->getValue('id'); |
270 | 270 | }, $records); |
271 | 271 |