Do not use static::class for final messages
This commit is contained in:
parent
53c06ea546
commit
69f6409731
@ -39,7 +39,7 @@ final class EmailMessage implements MessageInterface
|
||||
public static function fromNotification(Notification $notification, EmailRecipientInterface $recipient): self
|
||||
{
|
||||
if ('' === $recipient->getEmail()) {
|
||||
throw new InvalidArgumentException(sprintf('"%s" needs an email, it cannot be empty.', static::class));
|
||||
throw new InvalidArgumentException(sprintf('"%s" needs an email, it cannot be empty.', __CLASS__));
|
||||
}
|
||||
|
||||
if (!class_exists(NotificationEmail::class)) {
|
||||
|
@ -29,7 +29,7 @@ final class SmsMessage implements MessageInterface
|
||||
public function __construct(string $phone, string $subject)
|
||||
{
|
||||
if ('' === $phone) {
|
||||
throw new InvalidArgumentException(sprintf('"%s" needs a phone number, it cannot be empty.', static::class));
|
||||
throw new InvalidArgumentException(sprintf('"%s" needs a phone number, it cannot be empty.', __CLASS__));
|
||||
}
|
||||
|
||||
$this->subject = $subject;
|
||||
|
Reference in New Issue
Block a user