Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
21 | 1 | public function decode($string) |
|
22 | { |
||
23 | 1 | $decoded = []; |
|
24 | |||
25 | 1 | foreach (explode(DIRECTORY_SEPARATOR, $string) as $word) { |
|
26 | 1 | if (false === $this->isASafeString($word)) { |
|
27 | 1 | $word = urldecode($word); |
|
28 | } |
||
29 | |||
30 | 1 | $decoded[] = $word; |
|
31 | } |
||
32 | |||
33 | 1 | return implode(DIRECTORY_SEPARATOR, $decoded); |
|
34 | } |
||
56 |