| Conditions | 3 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | 12 | public function getUrl() |
|
| 37 | { |
||
| 38 | 12 | $url = $this->scheme . $this->subdomain . "." . $this->hostname; |
|
| 39 | 12 | $url .= $this->getCleanPath($this->resource->getPath()); |
|
| 40 | 12 | $verb = strtoupper($this->resource->getVerb()); |
|
| 41 | 12 | $params = $this->resource->getParams(); |
|
| 42 | |||
| 43 | 12 | if ($verb === 'GET' && empty($params) !== true) { |
|
| 44 | 4 | $url .= '?' . http_build_query($params); |
|
| 45 | } |
||
| 46 | |||
| 47 | 12 | return $url; |
|
| 48 | } |
||
| 49 | |||
| 63 |