| Conditions | 3 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | 17 | public function toString() |
|
| 41 | { |
||
| 42 | 17 | ksort($this->data); |
|
| 43 | 17 | $string = ''; |
|
| 44 | 17 | foreach ($this->data as $key => $value) { |
|
| 45 | 17 | $encode = urlencode($value); |
|
| 46 | 17 | $string .= "$key=$encode&"; |
|
| 47 | 17 | } |
|
| 48 | |||
| 49 | 17 | if (0 < count($this->data)) { |
|
| 50 | 17 | $string = substr($string, 0, -1); |
|
| 51 | 17 | } |
|
| 52 | |||
| 53 | 17 | return $string; |
|
| 54 | } |
||
| 56 |