| Conditions | 2 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | 94 | public static function assertTemplateExtension(string $value, string $message = '') |
|
| 35 | { |
||
| 36 | 94 | $extension = pathinfo($value, PATHINFO_EXTENSION); |
|
| 37 | 94 | $extension = strtoupper($extension); |
|
| 38 | |||
| 39 | 94 | $format = '%s contains an unsupported template format file extension'; |
|
| 40 | 94 | $message = sprintf($message ?: $format, self::valueToString($value)); |
|
| 41 | |||
| 42 | 94 | return self::oneOf($extension, self::getTemplateFormats(), $message); |
|
| 43 | } |
||
| 45 |