Skip to content

Commit 1e4a2ec

Browse files
norkunasnicolas-grekas
authored andcommitted
Do not use static::class for final messages
1 parent 8e68f6c commit 1e4a2ec

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Message/EmailMessage.php

+1-1
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)) {

Message/SmsMessage.php

+1-1
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)