diff --git a/src/Symfony/Component/Notifier/Bridge/Nexmo/NexmoTransport.php b/src/Symfony/Component/Notifier/Bridge/Nexmo/NexmoTransport.php index 9ce02fa0b7..ae46ffbea2 100644 --- a/src/Symfony/Component/Notifier/Bridge/Nexmo/NexmoTransport.php +++ b/src/Symfony/Component/Notifier/Bridge/Nexmo/NexmoTransport.php @@ -69,7 +69,7 @@ final class NexmoTransport extends AbstractTransport $result = $response->toArray(false); foreach ($result['messages'] as $msg) { - if ($msg['status'] ?? 0 > 0) { + if ($msg['status'] ?? false) { throw new TransportException(sprintf('Unable to send the SMS: %s (%s).', $msg['error-text'], $msg['status']), $response); } } diff --git a/src/Symfony/Component/Notifier/Message/SmsMessage.php b/src/Symfony/Component/Notifier/Message/SmsMessage.php index e704e169a9..9fbb75ce3a 100644 --- a/src/Symfony/Component/Notifier/Message/SmsMessage.php +++ b/src/Symfony/Component/Notifier/Message/SmsMessage.php @@ -37,7 +37,7 @@ final class SmsMessage implements MessageInterface public static function fromNotification(Notification $notification, Recipient $recipient, string $transport = null): self { if (!$recipient instanceof SmsRecipientInterface) { - throw new LogicException(sprintf('To send a SMS message, "%s" should implement "%s" or the recipient should implement "%s".', get_class($notification), SmsNotificationInterface::class, SmsRecipientInterface::class)); + throw new LogicException(sprintf('To send a SMS message, "%s" should implement "%s" or the recipient should implement "%s".', \get_class($notification), SmsNotificationInterface::class, SmsRecipientInterface::class)); } return new self($recipient->getPhone(), $notification->getSubject());