@@ -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; |
@@ -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 |
@@ -120,7 +120,7 @@ |
||
120 | 120 | $rules = $priceList->getPriceRules()->toArray(); |
121 | 121 | usort( |
122 | 122 | $rules, |
123 | - function (PriceRule $a, PriceRule $b) { |
|
123 | + function(PriceRule $a, PriceRule $b) { |
|
124 | 124 | if ($a->getPriority() === $b->getPriority()) { |
125 | 125 | return 0; |
126 | 126 | } |
@@ -251,10 +251,10 @@ |
||
251 | 251 | ); |
252 | 252 | $table->addIndex( |
253 | 253 | ['combined_price_list_id', |
254 | - 'product_id', |
|
255 | - 'unit_code', |
|
256 | - 'quantity', |
|
257 | - 'currency'], |
|
254 | + 'product_id', |
|
255 | + 'unit_code', |
|
256 | + 'quantity', |
|
257 | + 'currency'], |
|
258 | 258 | 'oro_combined_price_idx' |
259 | 259 | ); |
260 | 260 | $table->addIndex( |