[Notifier] Fix two minor issues
This commit is contained in:
parent
905db59b3a
commit
4f80d4d639
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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());
|
||||
|
Reference in New Issue
Block a user