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