@@ -173,7 +173,7 @@ |
||
173 | 173 | // filter for only those websites which have current `$webCatalogId` assigned |
174 | 174 | $relatedWebsiteIds = array_filter( |
175 | 175 | $assignedWebCatalogs, |
176 | - function ($relatedWebsiteWebCatalogId) use ($webCatalogId) { |
|
176 | + function($relatedWebsiteWebCatalogId) use ($webCatalogId) { |
|
177 | 177 | return $webCatalogId == $relatedWebsiteWebCatalogId; |
178 | 178 | } |
179 | 179 | ); |
@@ -60,7 +60,7 @@ |
||
60 | 60 | ->method('round') |
61 | 61 | ->will( |
62 | 62 | $this->returnCallback( |
63 | - function ($value) { |
|
63 | + function($value) { |
|
64 | 64 | return round($value, 0, PHP_ROUND_HALF_UP); |
65 | 65 | } |
66 | 66 | ) |
@@ -60,7 +60,7 @@ |
||
60 | 60 | ->method('round') |
61 | 61 | ->will( |
62 | 62 | $this->returnCallback( |
63 | - function ($value) { |
|
63 | + function($value) { |
|
64 | 64 | return round($value, 0, PHP_ROUND_HALF_UP); |
65 | 65 | } |
66 | 66 | ) |
@@ -146,7 +146,7 @@ |
||
146 | 146 | 'is_current' => true, |
147 | 147 | 'line_items' => [ |
148 | 148 | ['id' => 1, 'unit' => 'code1', 'quantity' => 42], |
149 | - ['id' => 2,'unit' => 'code2', 'quantity' => 100], |
|
149 | + ['id' => 2, 'unit' => 'code2', 'quantity' => 100], |
|
150 | 150 | ] |
151 | 151 | ], |
152 | 152 | [ |
@@ -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 { |