Lines
0.00%
0 / 3
Methods
0.00%
0 / 1
Classes
0.00%
0 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| messageTemplate | 0.00% | 0 / 3 | 0.00% | 0 / 1 | 12 | ||
| 7 | enum SunError: string implements ExceptionReason | |
| 8 | { | |
| 9 | case CoordinateOutOfRange = 'coordinate_out_of_range'; | |
| 10 | case LocationUnknown = 'location_unknown'; | |
| 11 | ||
| 12 | public function messageTemplate(): string | |
| 13 | { | |
| 14 | return match ($this) { | |
| 15 | self::CoordinateOutOfRange => 'The {coordinate} {value} is outside -{limit} to {limit}.', | |
| 16 | self::LocationUnknown => 'Home Assistant reported no location, so sun times are unknown.', | |
| 17 | }; | |
| 18 | } | |
| 19 | } |