@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | $manager->expects($this->exactly(count($relatedLineItems))) |
279 | 279 | ->method('remove') |
280 | 280 | ->willReturnCallback( |
281 | - function (LineItem $item) { |
|
281 | + function(LineItem $item) { |
|
282 | 282 | $this->lineItems[] = $item; |
283 | 283 | } |
284 | 284 | ); |
@@ -525,7 +525,7 @@ discard block |
||
525 | 525 | ->method('roundQuantity') |
526 | 526 | ->will( |
527 | 527 | $this->returnCallback( |
528 | - function ($value) { |
|
528 | + function($value) { |
|
529 | 529 | return round($value, 0, PHP_ROUND_HALF_UP); |
530 | 530 | } |
531 | 531 | ) |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | $lineItemRepository |
555 | 555 | ->expects($this->any()) |
556 | 556 | ->method('findDuplicate') |
557 | - ->willReturnCallback(function (LineItem $lineItem) { |
|
557 | + ->willReturnCallback(function(LineItem $lineItem) { |
|
558 | 558 | /** @var ArrayCollection $shoppingListLineItems */ |
559 | 559 | $shoppingListLineItems = $lineItem->getShoppingList()->getLineItems(); |
560 | 560 | if ($lineItem->getShoppingList()->getId() === 1 |
@@ -581,7 +581,7 @@ discard block |
||
581 | 581 | |
582 | 582 | $entityManager->expects($this->any()) |
583 | 583 | ->method('persist') |
584 | - ->willReturnCallback(function ($obj) { |
|
584 | + ->willReturnCallback(function($obj) { |
|
585 | 585 | if ($obj instanceof ShoppingList) { |
586 | 586 | $this->shoppingLists[] = $obj; |
587 | 587 | } |
@@ -88,7 +88,7 @@ |
||
88 | 88 | $this->assertEquals( |
89 | 89 | 'Product has been added to "<a href="' . |
90 | 90 | $this->getUrl('oro_shopping_list_frontend_view', ['id' => $shoppingList->getId()]) . |
91 | - '">'.$shoppingList->getLabel().'</a>"', |
|
91 | + '">' . $shoppingList->getLabel() . '</a>"', |
|
92 | 92 | $result['message'] |
93 | 93 | ); |
94 | 94 |
@@ -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 |
@@ -128,7 +128,7 @@ |
||
128 | 128 | */ |
129 | 129 | private function getShoppingListLineItemsTableDirectRows(Table $table) |
130 | 130 | { |
131 | - return array_map(function (NodeElement $element) { |
|
131 | + return array_map(function(NodeElement $element) { |
|
132 | 132 | return $this->elementFactory->wrapElement(Table::TABLE_ROW_ELEMENT, $element); |
133 | 133 | }, $table->findAll('css', 'tbody tr.line_item_view')); |
134 | 134 | } |
@@ -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 | /** |