Skip to content

Commit

Permalink
Fixed bug; add destinations
Browse files Browse the repository at this point in the history
  • Loading branch information
cesargb committed Oct 4, 2017
1 parent 64ef6a4 commit 779cd0a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions src/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,14 @@ public function addTo($to, $control = true)
{
$destinations = (array) $to;

if ($control) {
foreach ($destinations as $destination) {
if (in_array($destinations, $this->destinations)) {
throw DestinationAlreadyExits::create($destination);
}
foreach ($destinations as $destination) {
if ($control && in_array($destinations, $this->destinations)) {
throw DestinationAlreadyExits::create($destination);
} else {
$this->destinations[] = $destination;
}
}

$this->destinations[] = $destination;

return $this;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Sms.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Sms
*
* @var string
*/
private $app = 'php-sms v1.0.9';
private $app = 'php-sms v1.0.10';

/**
* Define if then sent is dryrun.
Expand Down

0 comments on commit 779cd0a

Please # to comment.