@@ -1157,7 +1157,7 @@ discard block |
||
1157 | 1157 | */ |
1158 | 1158 | public function getImagesByType($type) |
1159 | 1159 | { |
1160 | - return $this->getImages()->filter(function (ProductImage $image) use ($type) { |
|
1160 | + return $this->getImages()->filter(function(ProductImage $image) use ($type) { |
|
1161 | 1161 | return $image->hasType($type); |
1162 | 1162 | }); |
1163 | 1163 | } |
@@ -1387,7 +1387,7 @@ discard block |
||
1387 | 1387 | { |
1388 | 1388 | $primaryPrecision = $this->getPrimaryUnitPrecision(); |
1389 | 1389 | $additionalPrecisions = $this->getUnitPrecisions() |
1390 | - ->filter(function ($precision) use ($primaryPrecision) { |
|
1390 | + ->filter(function($precision) use ($primaryPrecision) { |
|
1391 | 1391 | return $precision != $primaryPrecision; |
1392 | 1392 | }); |
1393 | 1393 |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $result = $this->jobRunner->runUnique( |
95 | 95 | $message->getMessageId(), |
96 | 96 | $jobName, |
97 | - function (JobRunner $jobRunner, Job $job) use ($segment, $websiteIds, $isFull) { |
|
97 | + function(JobRunner $jobRunner, Job $job) use ($segment, $websiteIds, $isFull) { |
|
98 | 98 | $i = 0; |
99 | 99 | foreach ($this->getAllProductIdsForReindex($segment, $isFull) as $batch) { |
100 | 100 | $reindexMsgData = $this->reindexMessageGranularizer->process( |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | foreach ($reindexMsgData as $msgData) { |
107 | 107 | $jobRunner->createDelayed( |
108 | 108 | sprintf('%s:reindex:%s', $job->getName(), ++$i), |
109 | - function (JobRunner $jobRunner, Job $child) use ($msgData) { |
|
109 | + function(JobRunner $jobRunner, Job $child) use ($msgData) { |
|
110 | 110 | $msgData['jobId'] = $child->getId(); |
111 | 111 | $message = new Message($msgData, AsyncIndexer::DEFAULT_PRIORITY_REINDEX); |
112 | 112 | $this->producer->send(AsyncIndexer::TOPIC_REINDEX, $message); |
@@ -115,7 +115,7 @@ |
||
115 | 115 | |
116 | 116 | return $defaultUnitCode === $product->getPrimaryUnitPrecision()->getUnit()->getCode() |
117 | 117 | && $product->getAdditionalUnitPrecisions() |
118 | - ->filter(function (ProductUnitPrecision $precision) { |
|
118 | + ->filter(function(ProductUnitPrecision $precision) { |
|
119 | 119 | return $precision->isSell(); |
120 | 120 | })->isEmpty(); |
121 | 121 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | $productA = $this->getProduct(['id' => 1]); |
38 | 38 | $productB = $this->getProduct(['id' => 2]); |
39 | 39 | $productC = $this->getProduct(['id' => 3]); |
40 | - $expectedResult =[$productB, $productC]; |
|
40 | + $expectedResult = [$productB, $productC]; |
|
41 | 41 | $this->relatedItemsFunctionalityShouldBeEnabled(); |
42 | 42 | $this->andProductRepositoryShouldFindUpsell($productA, 2, $expectedResult); |
43 | 43 | $this->andShouldNotBeBidirectional(); |
@@ -61,7 +61,7 @@ |
||
61 | 61 | |
62 | 62 | $this->formFactory->expects($this->once()) |
63 | 63 | ->method('createNamed') |
64 | - ->with($fieldName, EnumSelectType::NAME, null, $this->callback(function (array $options) use ($fieldName) { |
|
64 | + ->with($fieldName, EnumSelectType::NAME, null, $this->callback(function(array $options) use ($fieldName) { |
|
65 | 65 | $disabledValues = ['red', 'yellow']; |
66 | 66 | |
67 | 67 | $this->assertEquals([ |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $doctrineHelper->expects($this->any()) |
82 | 82 | ->method('getSingleEntityIdentifier') |
83 | 83 | ->willReturnCallback( |
84 | - function ($variantValue) { |
|
84 | + function($variantValue) { |
|
85 | 85 | return $variantValue->getId(); |
86 | 86 | } |
87 | 87 | ); |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | $this->enumHandler->expects($this->any()) |
479 | 479 | ->method('getPossibleValues') |
480 | 480 | ->willReturnCallback( |
481 | - function ($fieldName) use ($variantsData) { |
|
481 | + function($fieldName) use ($variantsData) { |
|
482 | 482 | return isset($variantsData[$fieldName]['values']) ? $variantsData[$fieldName]['values'] : []; |
483 | 483 | } |
484 | 484 | ); |
@@ -498,10 +498,10 @@ discard block |
||
498 | 498 | ->expects($this->any()) |
499 | 499 | ->method('getSimpleProductsByVariantFieldsQueryBuilder') |
500 | 500 | ->willReturnCallback( |
501 | - function ($configurableProduct, array $variantParameters) use ($simpleProducts) { |
|
501 | + function($configurableProduct, array $variantParameters) use ($simpleProducts) { |
|
502 | 502 | $filteredProducts = array_filter( |
503 | 503 | $simpleProducts, |
504 | - function (Product $simpleProduct) use ($variantParameters) { |
|
504 | + function(Product $simpleProduct) use ($variantParameters) { |
|
505 | 505 | foreach ($variantParameters as $name => $value) { |
506 | 506 | if ($simpleProduct->{$name} != $value) { |
507 | 507 | return false; |
@@ -176,7 +176,7 @@ |
||
176 | 176 | $entityNameResolver->expects($this->any()) |
177 | 177 | ->method('getName') |
178 | 178 | ->willReturnCallback( |
179 | - function ($entity, $format, $locale) { |
|
179 | + function($entity, $format, $locale) { |
|
180 | 180 | return (string)$entity . '_' . $locale; |
181 | 181 | } |
182 | 182 | ); |
@@ -88,7 +88,7 @@ |
||
88 | 88 | ->with(['image' => $initialResults['id']]) |
89 | 89 | ->willReturn($productImage); |
90 | 90 | |
91 | - $entityConfig = new EntityDefinitionConfig(); |
|
91 | + $entityConfig = new EntityDefinitionConfig(); |
|
92 | 92 | $entityConfig->addField('filePath'); |
93 | 93 | $entityConfig->addField('mimeType'); |
94 | 94 | $entityConfig->addField('id'); |
@@ -127,7 +127,7 @@ |
||
127 | 127 | ->method('setObjectValue') |
128 | 128 | ->will( |
129 | 129 | $this->returnCallback( |
130 | - function (ProductImage $result, $fieldName, $value) { |
|
130 | + function(ProductImage $result, $fieldName, $value) { |
|
131 | 131 | return $result->{'add' . ucfirst(substr($fieldName, 0, -1))}(reset($value)); |
132 | 132 | } |
133 | 133 | ) |