| Conditions | 3 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | 42 | public static function assertBase64Data(string $value, string $message = '') |
|
| 35 | { |
||
| 36 | 42 | if (!base64_decode($value, true)) { |
|
| 37 | 12 | $format = '%s must be base64 encoded'; |
|
| 38 | 12 | $message = sprintf($message ?: $format, self::valueToString($value)); |
|
| 39 | 12 | self::reportInvalidArgument($message); |
|
| 40 | } |
||
| 41 | |||
| 42 | 30 | return null; |
|
| 43 | } |
||
| 45 |