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