@@ -295,7 +295,7 @@ |
||
| 295 | 295 | return $this->cache[$cacheKey]; |
| 296 | 296 | } |
| 297 | 297 | |
| 298 | - $fields = array_filter($entityConfig['fields'], function ($fieldConfig) use ($fieldName, $configName) { |
|
| 298 | + $fields = array_filter($entityConfig['fields'], function($fieldConfig) use ($fieldName, $configName) { |
|
| 299 | 299 | if (!array_key_exists('name', $fieldConfig)) { |
| 300 | 300 | return false; |
| 301 | 301 | } |
@@ -223,7 +223,7 @@ |
||
| 223 | 223 | ->willReturn([ |
| 224 | 224 | [Item::class], |
| 225 | 225 | [self::WEBSITE_ID] |
| 226 | - ]); |
|
| 226 | + ]); |
|
| 227 | 227 | |
| 228 | 228 | $this->messageProducer->expects($this->atLeastOnce()) |
| 229 | 229 | ->method('send') |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $this->placeholderHelper->expects($this->any()) |
| 51 | 51 | ->method('isNameMatch') |
| 52 | 52 | ->willReturnCallback( |
| 53 | - function ($name, $nameValue) { |
|
| 53 | + function($name, $nameValue) { |
|
| 54 | 54 | return $name === 'custom_PLACEHOLDER_ID' && $nameValue === 'custom_42'; |
| 55 | 55 | } |
| 56 | 56 | ); |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $this->logicalAnd( |
| 80 | 80 | $this->isInstanceOf(CollectContextEvent::class), |
| 81 | 81 | $this->callback( |
| 82 | - function (CollectContextEvent $event) use ($expectedContext) { |
|
| 82 | + function(CollectContextEvent $event) use ($expectedContext) { |
|
| 83 | 83 | $this->assertEquals($expectedContext, $event->getContext()); |
| 84 | 84 | |
| 85 | 85 | return true; |
@@ -107,12 +107,12 @@ discard block |
||
| 107 | 107 | $this->isInstanceOf(RestrictIndexEntityEvent::class), |
| 108 | 108 | ], |
| 109 | 109 | [ |
| 110 | - RestrictIndexEntityEvent::NAME.'.std', |
|
| 110 | + RestrictIndexEntityEvent::NAME . '.std', |
|
| 111 | 111 | $this->isInstanceOf(RestrictIndexEntityEvent::class), |
| 112 | 112 | ] |
| 113 | 113 | ) |
| 114 | 114 | ->willReturnCallback( |
| 115 | - function () use ($qb) { |
|
| 115 | + function() use ($qb) { |
|
| 116 | 116 | $qb->select(['something']); |
| 117 | 117 | } |
| 118 | 118 | ); |
@@ -131,12 +131,12 @@ discard block |
||
| 131 | 131 | { |
| 132 | 132 | $this->aliasResolver->expects($this->once())->method('getAlias')->with(\stdClass::class)->willReturn('std'); |
| 133 | 133 | $this->tagHelper->expects($this->any())->method('stripTags')->willReturnCallback( |
| 134 | - function ($value) { |
|
| 134 | + function($value) { |
|
| 135 | 135 | return trim(strip_tags($value)); |
| 136 | 136 | } |
| 137 | 137 | ); |
| 138 | 138 | $this->placeholder->expects($this->any())->method('replace')->willReturnCallback( |
| 139 | - function ($string, array $values) { |
|
| 139 | + function($string, array $values) { |
|
| 140 | 140 | return str_replace(array_keys($values), array_values($values), $string); |
| 141 | 141 | } |
| 142 | 142 | ); |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | $this->eventDispatcher->expects($this->at(0))->method('dispatch') |
| 145 | 145 | ->with(IndexEntityEvent::NAME, $this->isInstanceOf(IndexEntityEvent::class)) |
| 146 | 146 | ->willReturnCallback( |
| 147 | - function ($name, IndexEntityEvent $event) use ($indexData) { |
|
| 147 | + function($name, IndexEntityEvent $event) use ($indexData) { |
|
| 148 | 148 | foreach ($indexData as $data) { |
| 149 | 149 | $method = count($data) === 4 ? 'addField' : 'addPlaceholderField'; |
| 150 | 150 | call_user_func_array([$event, $method], $data); |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | ); |
| 154 | 154 | |
| 155 | 155 | $this->eventDispatcher->expects($this->at(1))->method('dispatch') |
| 156 | - ->with(IndexEntityEvent::NAME.'.std', $this->isInstanceOf(IndexEntityEvent::class)); |
|
| 156 | + ->with(IndexEntityEvent::NAME . '.std', $this->isInstanceOf(IndexEntityEvent::class)); |
|
| 157 | 157 | |
| 158 | 158 | $this->assertEquals( |
| 159 | 159 | $expected, |
@@ -395,7 +395,7 @@ discard block |
||
| 395 | 395 | |
| 396 | 396 | $this->eventDispatcher->expects($this->atLeastOnce())->method('dispatch') |
| 397 | 397 | ->willReturnCallback( |
| 398 | - function ($name, IndexEntityEvent $event) { |
|
| 398 | + function($name, IndexEntityEvent $event) { |
|
| 399 | 399 | $event->addField(1, 'sku', 'SKU-01'); |
| 400 | 400 | } |
| 401 | 401 | ); |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | |
| 152 | 152 | $repository->expects($this->exactly(3)) |
| 153 | 153 | ->method('find') |
| 154 | - ->willReturnCallback(function ($productId) use ($products) { |
|
| 154 | + ->willReturnCallback(function($productId) use ($products) { |
|
| 155 | 155 | return $products[$productId]; |
| 156 | 156 | }); |
| 157 | 157 | |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | |
| 328 | 328 | $repository->expects($this->exactly(3)) |
| 329 | 329 | ->method('find') |
| 330 | - ->willReturnCallback(function ($productId) use ($products) { |
|
| 330 | + ->willReturnCallback(function($productId) use ($products) { |
|
| 331 | 331 | return $products[$productId]; |
| 332 | 332 | }); |
| 333 | 333 | |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | |
| 68 | 68 | $this->productFormAvailabilityProvider->expects($this->any()) |
| 69 | 69 | ->method('getAvailableMatrixFormType') |
| 70 | - ->willReturnCallback(function (Product $product) use ($formOption, $isFormAvailable, $isMobile) { |
|
| 70 | + ->willReturnCallback(function(Product $product) use ($formOption, $isFormAvailable, $isMobile) { |
|
| 71 | 71 | if ($product->getType() === Product::TYPE_CONFIGURABLE && $isFormAvailable) { |
| 72 | 72 | return $isMobile ? Configuration::MATRIX_FORM_POPUP : $formOption; |
| 73 | 73 | } else { |
@@ -147,7 +147,7 @@ |
||
| 147 | 147 | 'is_current' => true, |
| 148 | 148 | 'line_items' => [ |
| 149 | 149 | ['id' => 1, 'unit' => 'code1', 'quantity' => 42, 'productId' => 1], |
| 150 | - ['id' => 2,'unit' => 'code2', 'quantity' => 100, 'productId' => 1], |
|
| 150 | + ['id' => 2, 'unit' => 'code2', 'quantity' => 100, 'productId' => 1], |
|
| 151 | 151 | ] |
| 152 | 152 | ], |
| 153 | 153 | [ |
@@ -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', '.shopping-list-line-items .shopping-list-line-items__item-wrapper')); |
| 134 | 134 | } |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | */ |
| 178 | 178 | public function addLineItem(LineItem $lineItem, ShoppingList $shoppingList, $flush = true, $concatNotes = false) |
| 179 | 179 | { |
| 180 | - $func = function (LineItem $duplicate) use ($lineItem, $concatNotes) { |
|
| 180 | + $func = function(LineItem $duplicate) use ($lineItem, $concatNotes) { |
|
| 181 | 181 | $this->mergeLineItems($lineItem, $duplicate, $concatNotes); |
| 182 | 182 | }; |
| 183 | 183 | |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | */ |
| 198 | 198 | public function updateLineItem(LineItem $lineItem, ShoppingList $shoppingList) |
| 199 | 199 | { |
| 200 | - $func = function (LineItem $duplicate) use ($lineItem) { |
|
| 200 | + $func = function(LineItem $duplicate) use ($lineItem) { |
|
| 201 | 201 | if ($lineItem->getQuantity() > 0) { |
| 202 | 202 | $this->updateLineItemQuantity($lineItem, $duplicate); |
| 203 | 203 | } else { |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | $shoppingList = $repository->findByUserAndId($this->aclHelper, $currentListId, $this->getWebsiteId()); |
| 405 | 405 | } |
| 406 | 406 | if (!$shoppingList) { |
| 407 | - $shoppingList = $repository->findAvailableForCustomerUser($this->aclHelper, false, $this->getWebsiteId()); |
|
| 407 | + $shoppingList = $repository->findAvailableForCustomerUser($this->aclHelper, false, $this->getWebsiteId()); |
|
| 408 | 408 | } |
| 409 | 409 | if ($create && !$shoppingList instanceof ShoppingList) { |
| 410 | 410 | $label = $this->translator->trans($label ?: 'oro.shoppinglist.default.label'); |
@@ -123,7 +123,7 @@ |
||
| 123 | 123 | |
| 124 | 124 | $boolHandler->expects($this->once()) |
| 125 | 125 | ->method('getHumanReadableValue') |
| 126 | - ->willReturnCallback(function ($value) { |
|
| 126 | + ->willReturnCallback(function($value) { |
|
| 127 | 127 | return $value ? 'Yes' : 'No'; |
| 128 | 128 | }); |
| 129 | 129 | |