Skip to content

Commit

Permalink
chore: running php-cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
JimTools committed Jan 19, 2025
1 parent cb95bfe commit fa4d941
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pkg/enqueue/Tests/Client/Driver/GpsDriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function testShouldSetupBroker()
->willReturnCallback(function ($topic, $queue) use ($invoked, $routerTopic, $processorTopic, $routerQueue, $processorQueue) {
match ($invoked->getInvocationCount()) {
1 => $this->assertSame([$routerTopic, $routerQueue], [$topic, $queue]),
2 => $this->assertSame([$processorTopic, $processorQueue] , [$topic, $queue]),
2 => $this->assertSame([$processorTopic, $processorQueue], [$topic, $queue]),
};
});

Expand Down
6 changes: 3 additions & 3 deletions pkg/enqueue/Tests/Client/Driver/RabbitMqStompDriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ public function testSetupBrokerShouldCreateDelayExchangeIfEnabled()
->expects($invoked)
->method('declareExchange')
->willReturnCallback(function (string $name, array $options) use ($invoked) {
match($invoked->getInvocationCount()) {
match ($invoked->getInvocationCount()) {
1 => $this->assertSame([
'aprefix.router',
['type' => 'fanout', 'durable' => true, 'auto_delete' => false],
Expand All @@ -406,8 +406,8 @@ public function testSetupBrokerShouldCreateDelayExchangeIfEnabled()
->expects($bindInvoked)
->method('bind')
->willReturnCallback(function (string $exchange, string $queue, ?string $routingKey = null, $arguments = null) use ($bindInvoked) {
match($bindInvoked->getInvocationCount()) {
1 =>$this->assertSame(
match ($bindInvoked->getInvocationCount()) {
1 => $this->assertSame(
['aprefix.router', 'aprefix.default', 'aprefix.default', null],
[$exchange, $queue, $routingKey, $arguments],
),
Expand Down
2 changes: 1 addition & 1 deletion pkg/enqueue/Tests/Client/SpoolProducerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function testShouldSendQueuedEventMessagesOnFlush()
->expects($invoked)
->method('sendEvent')
->willReturnCallback(function (string $topic, $argMessage) use ($invoked, $message) {
match($invoked->getInvocationCount()) {
match ($invoked->getInvocationCount()) {
1 => $this->assertSame(['foo_topic', 'first'], [$topic, $argMessage]),
2 => $this->assertSame(['bar_topic', ['second']], [$topic, $argMessage]),
3 => $this->assertSame(['baz_topic', $message], [$topic, $argMessage]),
Expand Down
10 changes: 5 additions & 5 deletions pkg/enqueue/Tests/Symfony/Client/ConsumeCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,12 @@ public function testShouldBindCustomExecuteConsumptionAndUseCustomClientDestinat
->expects($driverInvoked)
->method('createQueue')
->willReturnCallback(function (string $queueName, bool $prefix) use ($driverInvoked, $defaultQueue, $customQueue) {
match($driverInvoked->getInvocationCount()) {
match ($driverInvoked->getInvocationCount()) {
1 => $this->assertSame(['default', true], [$queueName, $prefix]),
2 => $this->assertSame(['custom', true], [$queueName, $prefix]),
};

return $driverInvoked->getInvocationCount() === 1 ? $defaultQueue : $customQueue;
return 1 === $driverInvoked->getInvocationCount() ? $defaultQueue : $customQueue;
})
;
$consumerInvoked = $this->exactly(2);
Expand Down Expand Up @@ -422,12 +422,12 @@ public function testShouldBindQueuesOnlyOnce()
->expects($invoked)
->method('createQueue')
->willReturnCallback(function (string $queueName, bool $prefix) use ($defaultQueue, $customQueue, $invoked) {
match($invoked->getInvocationCount()) {
match ($invoked->getInvocationCount()) {
1 => $this->assertSame(['default', true], [$queueName, $prefix]),
2 => $this->assertSame(['custom', true], [$queueName, $prefix]),
};

return $invoked->getInvocationCount() === 1 ? $defaultQueue : $customQueue;
return 1 === $invoked->getInvocationCount() ? $defaultQueue : $customQueue;
})
;

Expand All @@ -437,7 +437,7 @@ public function testShouldBindQueuesOnlyOnce()
->expects($consumerInvoked)
->method('bind')
->willReturnCallback(function ($queueName, Processor $argProcessor) use ($consumerInvoked, $defaultQueue, $processor, $consumer, $customQueue) {
match($consumerInvoked->getInvocationCount()) {
match ($consumerInvoked->getInvocationCount()) {
1 => $this->assertSame([$defaultQueue, $processor], [$queueName, $argProcessor]),
2 => $this->assertSame([$customQueue, $processor], [$queueName, $argProcessor]),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,11 @@ public function testShouldExecuteConsumptionWithSeveralCustomQueues()
->expects($invoked)
->method('bind')
->willReturnCallback(function ($queueName, Processor $argProcessor) use ($invoked, $processor, $consumer) {
match($invoked->getInvocationCount()) {
match ($invoked->getInvocationCount()) {
1 => $this->assertSame(['queue-name', $processor], [$queueName, $argProcessor]),
2 => $this->assertSame(['another-queue-name', $processor], [$queueName, $argProcessor]),
};

return $consumer;
})
;
Expand Down Expand Up @@ -219,7 +220,7 @@ public static function getSubscribedQueues()
->expects($invoked)
->method('bind')
->willReturnCallback(function ($queueName, Processor $argProcessor) use ($invoked, $processor, $consumer) {
match($invoked->getInvocationCount()) {
match ($invoked->getInvocationCount()) {
1 => $this->assertSame(['fooSubscribedQueues', $processor], [$queueName, $argProcessor]),
2 => $this->assertSame(['barSubscribedQueues', $processor], [$queueName, $argProcessor]),
};
Expand Down

0 comments on commit fa4d941

Please sign in to comment.