@@ -77,7 +77,7 @@ |
||
77 | 77 | $this->restrictByEntitySlugs($qb, $restrictedEntity); |
78 | 78 | |
79 | 79 | return array_map( |
80 | - function ($item) { |
|
80 | + function($item) { |
|
81 | 81 | return $item['url']; |
82 | 82 | }, |
83 | 83 | $qb->getQuery()->getArrayResult() |
@@ -82,7 +82,7 @@ |
||
82 | 82 | $em = null; |
83 | 83 | try { |
84 | 84 | $messageData = JSON::decode($message->getBody()); |
85 | - $className = $this->messageFactory->getEntityClassFromMessage($messageData); |
|
85 | + $className = $this->messageFactory->getEntityClassFromMessage($messageData); |
|
86 | 86 | /** @var EntityManagerInterface $em */ |
87 | 87 | $em = $this->registry->getManagerForClass($className); |
88 | 88 | $em->beginTransaction(); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $result = $this->jobRunner->runUnique( |
98 | 98 | $message->getMessageId(), |
99 | 99 | sprintf('%s:%s', Topics::REGENERATE_DIRECT_URL_FOR_ENTITY_TYPE, $entityClass), |
100 | - function (JobRunner $jobRunner) use ($entityClass, $createRedirect) { |
|
100 | + function(JobRunner $jobRunner) use ($entityClass, $createRedirect) { |
|
101 | 101 | /** @var EntityManager $em */ |
102 | 102 | if (!$em = $this->doctrine->getManagerForClass($entityClass)) { |
103 | 103 | $this->logger->error( |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | for ($i = 0; $i < $batches; $i++) { |
120 | 120 | $jobRunner->createDelayed( |
121 | 121 | sprintf('%s:%s:%s', Topics::JOB_GENERATE_DIRECT_URL_FOR_ENTITIES, $entityClass, $i), |
122 | - function ( |
|
122 | + function( |
|
123 | 123 | JobRunner $jobRunner, |
124 | 124 | Job $child |
125 | 125 | ) use ( |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $result = $this->jobRunner->runUnique( |
96 | 96 | $message->getMessageId(), |
97 | 97 | Topics::CALCULATE_URL_CACHE_MASS, |
98 | - function (JobRunner $jobRunner) { |
|
98 | + function(JobRunner $jobRunner) { |
|
99 | 99 | $usedRoutes = $this->slugRepository->getUsedRoutes(); |
100 | 100 | |
101 | 101 | foreach ($usedRoutes as $usedRoute) { |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | $usedRoute, |
142 | 142 | $page |
143 | 143 | ), |
144 | - function (JobRunner $jobRunner, Job $child) use ($usedRoute, $entityIds) { |
|
144 | + function(JobRunner $jobRunner, Job $child) use ($usedRoute, $entityIds) { |
|
145 | 145 | $this->producer->send(Topics::PROCESS_CALCULATE_URL_CACHE_JOB, [ |
146 | 146 | 'route_name' => $usedRoute, |
147 | 147 | 'entity_ids' => $entityIds, |
@@ -341,7 +341,7 @@ |
||
341 | 341 | /** @var SluggableInterface|\PHPUnit_Framework_MockObject_MockObject $entity */ |
342 | 342 | $entity = $this->createMock(SluggableInterface::class); |
343 | 343 | |
344 | - $uow = $this->prepareUow($event, $entity); |
|
344 | + $uow = $this->prepareUow($event, $entity); |
|
345 | 345 | |
346 | 346 | $prototype = new LocalizedFallbackValue(); |
347 | 347 |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | ->with( |
266 | 266 | self::MESSAGE_ID, |
267 | 267 | Topics::CALCULATE_URL_CACHE_MASS, |
268 | - $this->callback(function (callable $callable) { |
|
268 | + $this->callback(function(callable $callable) { |
|
269 | 269 | return true; |
270 | 270 | }) |
271 | 271 | ) |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | ->with( |
316 | 316 | self::MESSAGE_ID, |
317 | 317 | Topics::CALCULATE_URL_CACHE_MASS, |
318 | - $this->callback(function (callable $callable) { |
|
318 | + $this->callback(function(callable $callable) { |
|
319 | 319 | return true; |
320 | 320 | }) |
321 | 321 | ) |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $this->jobRunner->expects($this->once()) |
134 | 134 | ->method('runUnique') |
135 | 135 | ->willReturnCallback( |
136 | - function ($ownerId, $name, $closure) use ($class, $job) { |
|
136 | + function($ownerId, $name, $closure) use ($class, $job) { |
|
137 | 137 | $this->assertEquals('mid-42', $ownerId); |
138 | 138 | $this->assertEquals(Topics::REGENERATE_DIRECT_URL_FOR_ENTITY_TYPE . ':' . $class, $name); |
139 | 139 | |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $this->jobRunner->expects($this->once()) |
194 | 194 | ->method('runUnique') |
195 | 195 | ->willReturnCallback( |
196 | - function ($ownerId, $name, $closure) use ($class, $job) { |
|
196 | + function($ownerId, $name, $closure) use ($class, $job) { |
|
197 | 197 | $this->assertEquals('mid-42', $ownerId); |
198 | 198 | $this->assertEquals(Topics::REGENERATE_DIRECT_URL_FOR_ENTITY_TYPE . ':' . $class, $name); |
199 | 199 | |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | $this->jobRunner->expects($this->once()) |
204 | 204 | ->method('createDelayed') |
205 | 205 | ->willReturnCallback( |
206 | - function ($name, $closure) use ($class, $childJob) { |
|
206 | + function($name, $closure) use ($class, $childJob) { |
|
207 | 207 | $this->assertEquals( |
208 | 208 | sprintf('%s:%s:%s', Topics::JOB_GENERATE_DIRECT_URL_FOR_ENTITIES, $class, 0), |
209 | 209 | $name |
@@ -87,7 +87,7 @@ |
||
87 | 87 | protected function findPrices(Collection $lineItems) |
88 | 88 | { |
89 | 89 | $lineItemsWithoutPrice = $lineItems->filter( |
90 | - function (CheckoutLineItem $lineItem) { |
|
90 | + function(CheckoutLineItem $lineItem) { |
|
91 | 91 | return !$lineItem->isPriceFixed() && !$lineItem->getPrice() && $lineItem->getProduct(); |
92 | 92 | } |
93 | 93 | )->toArray(); |
@@ -86,14 +86,14 @@ |
||
86 | 86 | if ($provider->isEntitySupported($entity)) { |
87 | 87 | $lineItems = $this->checkoutLineItemsConverter->convert($provider->getData($entity)); |
88 | 88 | $lineItems = $lineItems->filter( |
89 | - function ($lineItem) { |
|
89 | + function($lineItem) { |
|
90 | 90 | return $this->isLineItemAvailable($lineItem); |
91 | 91 | } |
92 | 92 | ); |
93 | 93 | |
94 | 94 | if (!$disablePriceFilter) { |
95 | 95 | $lineItems = $lineItems->filter( |
96 | - function ($lineItem) use ($currency, $supportedStatuses) { |
|
96 | + function($lineItem) use ($currency, $supportedStatuses) { |
|
97 | 97 | return $this->isLineItemHasCurrencyAndSupportedStatus( |
98 | 98 | $lineItem, |
99 | 99 | $currency, |