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