| Conditions | 2 |
| Paths | 1 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | 31 | public static function rawurlencode(array $parameters): array |
|
| 15 | { |
||
| 16 | return array_map(function ($param) { |
||
| 17 | // Null values are kept as is, so they'll get properly removed. |
||
| 18 | 20 | if (null === $param) { |
|
| 19 | 1 | return $param; |
|
| 20 | } |
||
| 21 | |||
| 22 | 20 | $param = rawurlencode($param); |
|
| 23 | |||
| 24 | 20 | $param = str_replace('%2F', '/', $param); |
|
| 25 | 20 | $param = str_replace('%3F', '?', $param); |
|
| 26 | 20 | $param = str_replace('%3D', '=', $param); |
|
| 27 | |||
| 28 | 20 | return $param; |
|
| 29 | 31 | }, $parameters); |
|
| 30 | } |
||
| 31 | } |
||
| 32 |