| Total Complexity | 1 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class UserResultData extends UserData |
||
| 6 | { |
||
| 7 | public ?string $generalPrivilege = null; |
||
| 8 | // If the authenticated user is allowed to change status |
||
| 9 | public ?string $statusPrivilege = null; |
||
| 10 | // If the authenticated user is allowed to change the password without having to type in the old password |
||
| 11 | public ?string $passwordWithoutVerificationPrivilege = null; |
||
| 12 | |||
| 13 | // If the authenticated user is allowed to change role |
||
| 14 | public ?string $userRolePrivilege = null; |
||
| 15 | |||
| 16 | // Authorization limits which entries are in the user role dropdown |
||
| 17 | public array $availableUserRoles = []; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Not all object attributes should be passed to view. |
||
| 21 | * This function like the toArrayForDatabase returns only |
||
| 22 | * the relevant attributes. |
||
| 23 | * Private attributes could also be used as they are not |
||
| 24 | * serialized by json_encode, but it's a harder to hydrate a |
||
| 25 | * collection of results. |
||
| 26 | * It has also an added benefit of exactly controlling what and how its serialized. |
||
| 27 | */ |
||
| 28 | 4 | public function jsonSerialize(): array |
|
| 37 |