Skip to content

Commit

Permalink
Merge pull request #6 from prhost/master
Browse files Browse the repository at this point in the history
merge master to 5.0
  • Loading branch information
prhost authored Jul 1, 2020
2 parents 991d336 + f7ace49 commit dc4c8d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/CepGratis.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static function search(string $cep, array $options = [], int $timeout = n
* Performs provider CEP search.
*
* @param string $cep CEP
* @return Contracts\Address
* @return Address
* @throws CepGratisInvalidParameterException
* @throws CepGratisTimeoutException
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Providers/ApiCepProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function getAddress($cep, HttpClientContract $client, array $option = [])
}

$address = '';
if ($content->address) {
if (property_exists($content, 'address') && $content->address) {
$address = trim(explode('- até', $content->address)[0] ?? '');
$address = trim(explode('- de', $address)[0] ?? '');
}
Expand Down

0 comments on commit dc4c8d5

Please sign in to comment.