| Total Complexity | 4 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 7 | class CommandContextFunctions |
||
| 8 | { |
||
| 9 | public const CURRENT_USER = "currentUser"; |
||
| 10 | public const CURRENT_USER_GROUPS = "currentUserGroups"; |
||
| 11 | |||
| 12 | public static function currentUser(): ?string |
||
| 13 | { |
||
| 14 | $commandContext = Context::getCommandContext(); |
||
| 15 | if ($commandContext !== null) { |
||
| 16 | return $commandContext->getAuthenticatedUserId(); |
||
| 17 | } else { |
||
| 18 | return null; |
||
| 19 | } |
||
| 20 | } |
||
| 21 | |||
| 22 | public static function currentUserGroups(): array |
||
| 29 | } |
||
| 30 | } |
||
| 32 |