| Conditions | 2 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 23 | public static function assertTemplateFormat(string $value, string $message = '') |
|
| 33 | { |
||
| 34 | 23 | $ucValue = strtoupper($value); |
|
| 35 | |||
| 36 | 23 | $format = '%s contains an unsupported template format file extension'; |
|
| 37 | 23 | $message = sprintf($message ?: $format, static::valueToString($value)); |
|
| 38 | |||
| 39 | 23 | return static::oneOf($ucValue, static::getTemplateFormats(), $message); |
|
| 40 | } |
||
| 42 |