Skip to content

Commit

Permalink
Bug ZipCodeAddressInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
fulviocanducci committed Sep 11, 2020
1 parent f810584 commit f30cc99
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Canducci/ZipCode/ZipCodeAddressInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ class ZipCodeAddressInfo implements ZipCodeAddressInfoContract
* @param $valueJson
* @throws ZipCodeException
*/
public function __construct($valueJson)
public function __construct(string $valueJson)
{
if (is_string($valueJson)) {
$this->valueJson = $valueJson;
if ($this->json_validate_zipcodeaddress() === false) {
throw new ZipCodeException('Format invalid');
}
} else {
throw new ZipCodeException('JSON empty');
}
throw new ZipCodeException('JSON empty');
}

/**
Expand Down

0 comments on commit f30cc99

Please sign in to comment.