Skip to content

Commit

Permalink
Merge pull request #14 from maxmilhas/master
Browse files Browse the repository at this point in the history
Correção obrigatoriedade
  • Loading branch information
lucasmro authored Nov 28, 2016
2 parents 00e7e89 + 8c1540e commit dcc150d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/ClearSale/XmlEntity/SendOrder/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,11 @@ public function getNumber()

public function setNumber($number)
{
$number = preg_replace('/[^0-9]/', '', $number);

if (empty($number)) {
throw new InvalidArgumentException('Number is empty!');
}

$this->number = $number;
$this->number = (string)$number;

return $this;
}
Expand Down Expand Up @@ -135,10 +133,6 @@ public function getCountry()

public function setCountry($country)
{
if (empty($country)) {
throw new InvalidArgumentException('Country is empty!');
}

$this->country = $country;

return $this;
Expand Down

0 comments on commit dcc150d

Please sign in to comment.