| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 36 | private function normalizeResponse($address) |
||
| 37 | { |
||
| 38 | if (sizeof($address) > 0) { |
||
| 39 | return [ |
||
| 40 | "status" => true, |
||
| 41 | "address" => $address["logradouro"], |
||
| 42 | "district" => $address["bairro"], |
||
| 43 | "city" => $address["cidade"], |
||
| 44 | "state" => $address["uf"], |
||
| 45 | "api" => "CepLa" |
||
| 46 | ]; |
||
| 47 | } else { |
||
| 48 | return [ |
||
| 49 | "status" => false, |
||
| 50 | "address" => null, |
||
| 51 | "district" => null, |
||
| 52 | "city" => null, |
||
| 53 | "state" => null, |
||
| 54 | "api" => "CepLa" |
||
| 55 | ]; |
||
| 59 |