Skip to content

Commit 9bd695f

Browse files
committed
fix CS
1 parent b20275f commit 9bd695f

File tree

13 files changed

+27
-27
lines changed

13 files changed

+27
-27
lines changed

src/Command/RequeueCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public function execute(Arguments $args, ConsoleIo $io): void
138138
'config' => $failedJob->config,
139139
'priority' => $failedJob->priority,
140140
'queue' => $failedJob->queue,
141-
]
141+
],
142142
);
143143

144144
$failedJobsTable->deleteOrFail($failedJob);

src/Command/WorkerCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function getOptionParser(): ConsoleOptionParser
110110
'short' => 'a',
111111
]);
112112
$parser->setDescription(
113-
'Runs a queue worker that consumes from the named queue.'
113+
'Runs a queue worker that consumes from the named queue.',
114114
);
115115

116116
return $parser;

src/Consumption/LimitAttemptsExtension.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ public function onResult(MessageResult $context): void
6565

6666
if ($attemptNumber >= $maxAttempts) {
6767
$context->changeResult(
68-
Result::reject(sprintf('The maximum number of %d allowed attempts was reached.', $maxAttempts))
68+
Result::reject(sprintf('The maximum number of %d allowed attempts was reached.', $maxAttempts)),
6969
);
7070

7171
$exception = (string)$message->getProperty('jobException');
7272

7373
$this->dispatchEvent(
7474
'Consumption.LimitAttemptsExtension.failed',
7575
['exception' => $exception, 'logger' => $context->getLogger()],
76-
$jobMessage
76+
$jobMessage,
7777
);
7878

7979
return;
@@ -88,7 +88,7 @@ public function onResult(MessageResult $context): void
8888
$producer->send($consumer->getQueue(), $newMessage);
8989

9090
$context->changeResult(
91-
Result::reject('A copy of the message was sent with an incremented attempt count.')
91+
Result::reject('A copy of the message was sent with an incremented attempt count.'),
9292
);
9393
}
9494
}

src/Consumption/LimitConsumedMessagesExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ protected function shouldBeStopped(LoggerInterface $logger): bool
7979
$logger->debug(sprintf(
8080
'[LimitConsumedMessagesExtension] Message consumption is interrupted since the message limit ' .
8181
'reached. limit: "%s"',
82-
$this->messageLimit
82+
$this->messageLimit,
8383
));
8484

8585
return true;

src/Job/Message.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function getTarget(): array
114114
if (!is_array($target) || count($target) !== 2) {
115115
throw new RuntimeException(sprintf(
116116
'Message class should be in the form `[class, method]` got `%s`',
117-
json_encode($target)
117+
json_encode($target),
118118
));
119119
}
120120

src/Listener/FailedJobsListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ public function storeFailedJob(object $event): void
8383
throw new RuntimeException(
8484
sprintf('`logger` was not defined on %s event.', $event->getName()),
8585
0,
86-
$e
86+
$e,
8787
);
8888
}
8989

9090
if (!($logger instanceof LoggerInterface)) {
9191
throw new RuntimeException(
9292
sprintf('`logger` is not an instance of `LoggerInterface` on %s event.', $event->getName()),
9393
0,
94-
$e
94+
$e,
9595
);
9696
}
9797

src/Mailer/Transport/QueueTransport.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function send(Message $message): array
5454
'returnPath',
5555
'cc',
5656
'bcc',
57-
]
57+
],
5858
);
5959

6060
return ['headers' => $headers, 'message' => 'Message has been enqueued'];
@@ -72,7 +72,7 @@ protected function enqueueJob(array $data, array $options): void
7272
QueueManager::push(
7373
[SendMailJob::class, 'execute'],
7474
$data,
75-
$options
75+
$options,
7676
);
7777
}
7878

src/Plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function bootstrap(PluginApplicationInterface $app): void
5353
if (!Configure::read('Queue')) {
5454
throw new InvalidArgumentException(
5555
'Missing `Queue` configuration key, please check the CakePHP Queue documentation' .
56-
' to complete the plugin setup.'
56+
' to complete the plugin setup.',
5757
);
5858
}
5959

src/QueueManager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public static function push(string|array $className, array $data = [], array $op
231231
if (!empty($class::$shouldBeUnique)) {
232232
if (empty($config['uniqueCache'])) {
233233
throw new InvalidArgumentException(
234-
"$class::\$shouldBeUnique is set to `true` but `uniqueCache` configuration is missing."
234+
"$class::\$shouldBeUnique is set to `true` but `uniqueCache` configuration is missing.",
235235
);
236236
}
237237

@@ -240,7 +240,7 @@ public static function push(string|array $className, array $data = [], array $op
240240
if (Cache::read($uniqueId, $config['uniqueCacheKey'])) {
241241
if ($logger) {
242242
$logger->debug(
243-
"An identical instance of $class already exists on the queue. This push will be ignored."
243+
"An identical instance of $class already exists on the queue. This push will be ignored.",
244244
);
245245
}
246246

tests/TestCase/Job/MailerJobTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ public function testExecute()
7171
->with(
7272
$this->equalTo('welcome'),
7373
$this->equalTo($this->args),
74-
$this->equalTo($this->headers)
74+
$this->equalTo($this->headers),
7575
)
7676
->willReturn(['Message sent']);
7777

7878
$this->job->expects($this->once())
7979
->method('getMailer')
8080
->with(
8181
$this->equalTo('SampleTest'),
82-
$this->equalTo($this->mailerConfig)
82+
$this->equalTo($this->mailerConfig),
8383
)->willReturn($this->mailer);
8484

8585
$message = $this->createMessage();
@@ -101,7 +101,7 @@ public function testExecuteMissingMailerException()
101101
->method('getMailer')
102102
->with(
103103
$this->equalTo('SampleTest'),
104-
$this->equalTo($this->mailerConfig)
104+
$this->equalTo($this->mailerConfig),
105105
)->willThrowException(new MissingMailerException('Missing mailer for testExecuteMissingMailerException'));
106106

107107
$message = $this->createMessage();
@@ -121,15 +121,15 @@ public function testExecuteBadMethodCallException()
121121
->with(
122122
$this->equalTo('welcome'),
123123
$this->equalTo($this->args),
124-
$this->equalTo($this->headers)
124+
$this->equalTo($this->headers),
125125
)
126126
->willThrowException(new BadMethodCallException('Welcome is not a valid method'));
127127

128128
$this->job->expects($this->once())
129129
->method('getMailer')
130130
->with(
131131
$this->equalTo('SampleTest'),
132-
$this->equalTo($this->mailerConfig)
132+
$this->equalTo($this->mailerConfig),
133133
)->willReturn($this->mailer);
134134

135135
$message = $this->createMessage();

0 commit comments

Comments
 (0)