Conditions | 3 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | private function normalizeResponse($address) |
||
25 | { |
||
26 | if (sizeof($address) > 0 && strlen($address['address']) > 0) { |
||
27 | return [ |
||
28 | "status" => true, |
||
29 | "address" => $address["address"], |
||
30 | "district" => $address["district"], |
||
31 | "city" => $address["city"], |
||
32 | "state" => $address["state"], |
||
33 | "api" => "ApiCEP" |
||
34 | ]; |
||
35 | } else { |
||
36 | return [ |
||
37 | "status" => false, |
||
38 | "address" => null, |
||
39 | "district" => null, |
||
40 | "city" => null, |
||
41 | "state" => null, |
||
42 | "api" => "ApiCEP" |
||
43 | ]; |
||
47 |