| Conditions | 2 |
| Paths | 2 |
| Total Lines | 7 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 40 | 12 | public static function assertImageFormat(string $value, string $message = ''): void |
|
| 41 | { |
||
| 42 | 12 | $ucValue = strtoupper($value); |
|
| 43 | 12 | $format = 0 === strlen($message) ? '%1$s contains an unsupported image format file extension' : $message; |
|
| 44 | 12 | $message = sprintf($format, self::valueToString($value)); |
|
| 45 | |||
| 46 | 12 | self::assertOneOf($ucValue, ReportingCloud::FILE_FORMATS_IMAGE, $message); |
|
| 47 | } |
||
| 49 |