| Total Complexity | 1 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | enum UserStatus: string |
||
| 11 | { |
||
| 12 | use EnumToArray; |
||
| 13 | |||
| 14 | // First letter uppercase and rest lowercase because these names are used as labels in html form as they are |
||
| 15 | case Unverified = 'unverified'; // Default after registration |
||
| 16 | case Active = 'active'; // Verified via token received in email |
||
| 17 | case Locked = 'locked'; // Locked for security reasons, may be reactivated by account holder via email |
||
| 18 | case Suspended = 'suspended'; // User suspended, account holder not allowed to login even via email |
||
| 19 | |||
| 20 | // UserStatus::toArray() returns array for dropdown |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Get the enum case name that can be displayed by the frontend. |
||
| 24 | * |
||
| 25 | * @return string |
||
| 26 | */ |
||
| 27 | 7 | public function getDisplayName(): string |
|
| 37 |