8000 [Notifier] Fix two minor issues · maidmaid/symfony@4f80d4d · GitHub
[go: up one dir, main page]

Skip to content

Commit 4f80d4d

Browse files
committed
[Notifier] Fix two minor issues
1 parent 905db59 commit 4f80d4d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/Notifier/Bridge/Nexmo/NexmoTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ protected function doSend(MessageInterface $message): void
6969

7070
$result = $response->toArray(false);
7171
foreach ($result['messages'] as $msg) {
72-
if ($msg['status'] ?? 0 > 0) {
72+
if ($msg['status'] ?? false) {
7373
throw new TransportException(sprintf('Unable to send the SMS: %s (%s).', $msg['error-text'], $msg['status']), $response);
7474
}
7575
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct(string $phone, string $subject)
3737
public static function fromNotification(Notification $notification, Recipient $recipient, string $transport = null): self
3838
{
3939
if (!$recipient instanceof SmsRecipientInterface) {
40-
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));
40+
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));
4141
}
4242

4343
return new self($recipient->getPhone(), $notification->getSubject());

0 commit comments

Comments
 (0)
0