Lines
0.00%
0 / 4
Methods
0.00%
0 / 1
Classes
0.00%
0 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| messageTemplate | 0.00% | 0 / 4 | 0.00% | 0 / 1 | 20 | ||
| 9 | enum ScaffoldError: string implements ExceptionReason | |
| 10 | { | |
| 11 | case ClassNameInvalid = 'class_name_invalid'; | |
| 12 | case FileExists = 'file_exists'; | |
| 13 | case IdTaken = 'id_taken'; | |
| 14 | ||
| 15 | public function messageTemplate(): string | |
| 16 | { | |
| 17 | return match ($this) { | |
| 18 | self::ClassNameInvalid => '"{name}" is not a class name; use letters and digits starting with a capital, such as PorchLight.', | |
| 19 | self::FileExists => '{path} already exists.', | |
| 20 | self::IdTaken => 'An automation already has the ID "{appId}".', | |
| 21 | }; | |
| 22 | } | |
| 23 | } |