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