| Conditions | 4 |
| Paths | 3 |
| Total Lines | 7 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | 34 | public static function assertBase64Data(string $value, string $message = ''): void |
|
| 30 | { |
||
| 31 | 34 | $binaryData = base64_decode($value, true); |
|
| 32 | 34 | if (is_bool($binaryData) || '' === $binaryData) { |
|
| 33 | 8 | $format = '' === $message ? '%1$s must be base64 encoded' : $message; |
|
| 34 | 8 | $message = sprintf($format, self::valueToString($value)); |
|
| 35 | 8 | throw new InvalidArgumentException($message); |
|
| 36 | } |
||
| 39 |