1 | <?php |
||
21 | final class SecondFactorStatus |
||
22 | { |
||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | private $status; |
||
27 | |||
28 | public static function unverified() |
||
29 | { |
||
30 | return new self('unverified'); |
||
31 | } |
||
32 | |||
33 | public static function verified() |
||
34 | { |
||
35 | return new self('verified'); |
||
36 | } |
||
37 | |||
38 | public static function vetted() |
||
39 | { |
||
40 | return new self('vetted'); |
||
41 | } |
||
42 | |||
43 | public static function revoked() |
||
44 | { |
||
45 | return new self('revoked'); |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @param string $status |
||
50 | * @return bool |
||
51 | */ |
||
52 | public static function isValidStatus($status) |
||
56 | |||
57 | /** |
||
58 | * @param string $status |
||
59 | */ |
||
60 | private function __construct($status) |
||
64 | |||
65 | /** |
||
66 | * @param SecondFactorStatus $other |
||
67 | * @return bool |
||
68 | */ |
||
69 | public function equals(SecondFactorStatus $other) |
||
73 | |||
74 | /** |
||
75 | * @return string |
||
76 | */ |
||
77 | public function __toString() |
||
81 | } |
||
82 |