8000 minor #41736 [Notifier] Do not use static::class for final messages (… · symfony/symfony@46befa8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 46befa8

Browse files
minor #41736 [Notifier] Do not use static::class for final messages (norkunas)
This PR was submitted for the 5.4 branch but it was merged into the 5.2 branch instead. Discussion ---------- [Notifier] Do not use static::class for final messages | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | #39402 (comment) | License | MIT | Doc PR | N/A Micro optimization Commits ------- 69f6409 Do not use static::class for final messages
2 parents 53c06ea + 69f6409 commit 46befa8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/Notifier/Message/EmailMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct(RawMessage $message, Envelope $envelope = null)
3939
public static function fromNotification(Notification $notification, EmailRecipientInterface $recipient): self
4040
{
4141
if ('' === $recipient->getEmail()) {
42-
throw new InvalidArgumentException(sprintf('"%s" needs an email, it cannot be empty.', static::class));
42+
throw new InvalidArgumentException(sprintf('"%s" needs an email, it cannot be empty.', __CLASS__));
4343
}
4444

4545
if (!class_exists(NotificationEmail::class)) {

src/Symfony/Component/Notifier/Message/SmsMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ final class SmsMessage implements MessageInterface
2929
public function __construct(string $phone, string $subject)
3030
{
3131
if ('' === $phone) {
32-
throw new InvalidArgumentException(sprintf('"%s" needs a phone number, it cannot be empty.', static::class));
32+
throw new InvalidArgumentException(sprintf('"%s" needs a phone number, it cannot be empty.', __CLASS__));
3333
}
3434

3535
$this->subject = $subject;

0 commit comments

Comments
 (0)
0