| Conditions | 3 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 9 | public static function convertMd5BlobToMd5Standard(string $stringBase64): string |
|
| 33 | { |
||
| 34 | // base64 -> decoded string -> split to bytes -> map to hex -> implode all hex |
||
| 35 | 9 | return implode( |
|
| 36 | 9 | array_map( |
|
| 37 | 9 | function (string $input): string { |
|
| 38 | 9 | return bin2hex($input); |
|
| 39 | 9 | }, |
|
| 40 | 9 | str_split( |
|
| 41 | 9 | base64_decode($stringBase64) ? : '' // base64 can return FALSE |
|
| 42 | 9 | ) ? : [] // str_split can return FALSE |
|
| 43 | ) |
||
| 67 |