| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2.032 |
| Changes | 0 | ||
| 1 | <?php |
||
| 74 | 6 | private function generateRequestUrl($address, $region = '', $outputFormat = 'json', $sensor = false) |
|
| 75 | { |
||
| 76 | 6 | $baseUrl = self::API_URL.'/'.$outputFormat.'?address='.urlencode($address).'&sensor='.$sensor; |
|
| 77 | |||
| 78 | 6 | if (!empty($region)) { |
|
| 79 | $baseUrl .= "®ion={$region}"; |
||
| 80 | } |
||
| 81 | |||
| 82 | 6 | return $baseUrl; |
|
| 83 | } |
||
| 84 | } |
||
| 85 |