Conditions | 4 |
Paths | 4 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4.0312 |
Changes | 0 |
1 | <?php |
||
7 | 9 | public function decode(string $string, string $from): string |
|
8 | { |
||
9 | 9 | if ($from == "base64") { |
|
10 | 3 | return base64_decode($string); |
|
11 | 7 | } elseif ($from == "7bit") { |
|
12 | return quoted_printable_decode($string); |
||
13 | 7 | } elseif ($from == "quoted-printable") { |
|
14 | 1 | return quoted_printable_decode($string); |
|
15 | } |
||
16 | 6 | return $string; |
|
17 | } |
||
18 | } |
||
19 |