Skip to content

Commit 67a7be2

Browse files
committed
Fix CS
1 parent 954009a commit 67a7be2

File tree

2 files changed

+5
-45
lines changed

2 files changed

+5
-45
lines changed

src/Symfony/Component/Messenger/Command/AbstractFailedMessagesCommand.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,7 @@ protected function getReceiver(): ReceiverInterface
155155
protected function getLastRedeliveryStampWithException(Envelope $envelope): ?RedeliveryStamp
156156
{
157157
if (null === \func_get_args()[1]) {
158-
trigger_deprecation(
159-
'symfony/messenger',
160-
'5.2',
161-
sprintf(
162-
'Using the "getLastRedeliveryStampWithException" method in the "%s" class is deprecated, use the "Envelope::last(%s)" instead.',
163-
self::class,
164-
ErrorDetailsStamp::class
165-
)
166-
);
158+
trigger_deprecation('symfony/messenger', '5.2', sprintf('Using the "getLastRedeliveryStampWithException" method in the "%s" class is deprecated, use the "Envelope::last(%s)" instead.', self::class, ErrorDetailsStamp::class));
167159
}
168160

169161
// Use ErrorDetailsStamp instead if it is available

src/Symfony/Component/Messenger/Stamp/RedeliveryStamp.php

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,12 @@ public function __construct(int $retryCount, string $exceptionMessage = null, Fl
3030
$this->redeliveredAt = $redeliveredAt ?? new \DateTimeImmutable();
3131

3232
if (null !== $exceptionMessage) {
33-
trigger_deprecation(
34-
'symfony/messenger',
35-
'5.2',
36-
sprintf(
37-
'Using the "$exceptionMessage" parameter in the "%s" class is deprecated, use the "%s" class instead.',
38-
self::class,
39-
ErrorDetailsStamp::class
40-
)
41-
);
33+
trigger_deprecation('symfony/messenger', '5.2', sprintf('Using the "$exceptionMessage" parameter in the "%s" class is deprecated, use the "%s" class instead.', self::class, ErrorDetailsStamp::class));
4234
}
4335
$this->exceptionMessage = $exceptionMessage;
4436

4537
if (null !== $flattenException) {
46-
trigger_deprecation(
47-
'symfony/messenger',
48-
'5.2',
49-
sprintf(
50-
'Using the "$flattenException" parameter in the "%s" class is deprecated, use the "%s" class instead.',
51-
self::class,
52-
ErrorDetailsStamp::class
53-
)
54-
);
38+
trigger_deprecation('symfony/messenger', '5.2', sprintf('Using the "$flattenException" parameter in the "%s" class is deprecated, use the "%s" class instead.', self::class, ErrorDetailsStamp::class));
5539
}
5640
$this->flattenException = $flattenException;
5741
}
@@ -74,15 +58,7 @@ public function getRetryCount(): int
7458
*/
7559
public function getExceptionMessage(): ?string
7660
{
77-
trigger_deprecation(
78-
'symfony/messenger',
79-
'5.2',
80-
sprintf(
81-
'Using the "getExceptionMessage()" method of the "%s" class is deprecated, use the "%s" class instead.',
82-
self::class,
83-
ErrorDetailsStamp::class
84-
)
85-
);
61+
trigger_deprecation('symfony/messenger', '5.2', sprintf('Using the "getExceptionMessage()" method of the "%s" class is deprecated, use the "%s" class instead.', self::class, ErrorDetailsStamp::class));
8662

8763
return $this->exceptionMessage;
8864
}
@@ -92,15 +68,7 @@ public function getExceptionMessage(): ?string
9268
*/
9369
public function getFlattenException(): ?FlattenException
9470
{
95-
trigger_deprecation(
96-
'symfony/messenger',
97-
'5.2',
98-
sprintf(
99-
'Using the "getFlattenException()" method of the "%s" class is deprecated, use the "%s" class instead.',
100-
self::class,
101-
ErrorDetailsStamp::class
102-
)
103-
);
71+
trigger_deprecation('symfony/messenger', '5.2', sprintf('Using the "getFlattenException()" method of the "%s" class is deprecated, use the "%s" class instead.', self::class, ErrorDetailsStamp::class));
10472

10573
return $this->flattenException;
10674
}

0 commit comments

Comments
 (0)