Skip to content

Commit

Permalink
fix: scrutinizer bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
atymic committed Apr 8, 2020
1 parent 356a032 commit 4a12b17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Twilio.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected function sendSmsMessage(TwilioSmsMessage $message, ?string $to): Messa
$params['from'] = $from;
}

if (! $from && ! $messagingServiceSid) {
if (empty($from) && empty($messagingServiceSid)) {
throw CouldNotSendNotification::missingFrom();
}

Expand Down
4 changes: 2 additions & 2 deletions src/TwilioSmsMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function getFrom(): ?string
return $this->from;
}

if ($this->alphaNumSender && $this->alphaNumSender !== '') {
if ($this->alphaNumSender !== null && $this->alphaNumSender !== '') {
return $this->alphaNumSender;
}

Expand Down Expand Up @@ -112,7 +112,7 @@ public function applicationSid(string $applicationSid): self
* @param bool $forceDelivery
* @return $this
*/
public function forceDelivery(string $forceDelivery): self
public function forceDelivery(bool $forceDelivery): self
{
$this->forceDelivery = $forceDelivery;

Expand Down

0 comments on commit 4a12b17

Please sign in to comment.