| 1 | <?php |
||
| 7 | class Status |
||
| 8 | { |
||
| 9 | private const SCHEDULED = 'scheduled'; |
||
| 10 | private const POSTPONED = 'postponed'; |
||
| 11 | private const CANCELLED = 'cancelled'; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @var string |
||
| 15 | */ |
||
| 16 | private $value; |
||
| 17 | |||
| 18 | public function __construct(string $value) |
||
| 22 | |||
| 23 | public static function scheduled(): Status |
||
| 27 | |||
| 28 | public static function postponed(): Status |
||
| 32 | |||
| 33 | public static function cancelled(): Status |
||
| 37 | |||
| 38 | public function toNative(): string |
||
| 42 | |||
| 43 | public function equals(Status $status): bool |
||
| 47 | } |
||
| 48 |