| Conditions | 1 |
| Paths | 1 |
| Total Lines | 25 |
| Code Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 47 | public function encode() |
||
| 48 | { |
||
| 49 | $reserved = [ |
||
| 50 | ":" => '!%3A!ui', |
||
| 51 | "/" => '!%2F!ui', |
||
| 52 | "?" => '!%3F!ui', |
||
| 53 | "#" => '!%23!ui', |
||
| 54 | "[" => '!%5B!ui', |
||
| 55 | "]" => '!%5D!ui', |
||
| 56 | "@" => '!%40!ui', |
||
| 57 | "!" => '!%21!ui', |
||
| 58 | "$" => '!%24!ui', |
||
| 59 | "&" => '!%26!ui', |
||
| 60 | "'" => '!%27!ui', |
||
| 61 | "(" => '!%28!ui', |
||
| 62 | ")" => '!%29!ui', |
||
| 63 | "*" => '!%2A!ui', |
||
| 64 | "+" => '!%2B!ui', |
||
| 65 | "," => '!%2C!ui', |
||
| 66 | ";" => '!%3B!ui', |
||
| 67 | "=" => '!%3D!ui', |
||
| 68 | "%" => '!%25!ui' |
||
| 69 | ]; |
||
| 70 | return $this->url = preg_replace(array_values($reserved), array_keys($reserved), rawurlencode($this->url)); |
||
| 71 | } |
||
| 72 | |||
| 101 |