Skip to content

Commit

Permalink
Merge pull request #36 from roalvesrj/roalvesrj-patch-1
Browse files Browse the repository at this point in the history
Alteração no tratamento de espaços em branco
  • Loading branch information
cagartner committed Aug 6, 2020
2 parents 4cba94c + 9ff1851 commit 80a4d47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Cagartner/CorreiosConsulta/CorreiosConsulta.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public function cep($cep)
$innerHTML .= $child->ownerDocument->saveXML($child);
}
$texto = preg_replace("/&#?[a-z0-9]+;/i", "", $innerHTML);
$itens[] = trim($texto);
$itens[] = preg_replace(['(\s+)u', '(^\s|\s$)u'], [' ', ''], $texto);
}
$dados = array();
$dados['logradouro'] = trim($itens[0]);
Expand Down

0 comments on commit 80a4d47

Please sign in to comment.