1 | <?php namespace Distilleries\Expendable\Helpers; |
||
6 | class UserUtils |
||
7 | { |
||
8 | |||
9 | 4 | public static function get() |
|
13 | |||
14 | 88 | public static function getEmail() |
|
18 | |||
19 | 88 | public static function getDisplayName() |
|
23 | |||
24 | 12 | public static function isNotSuperAdmin() |
|
28 | |||
29 | |||
30 | 24 | public static function setArea($area) |
|
34 | |||
35 | 12 | public static function getArea() |
|
39 | |||
40 | 16 | public static function forgotArea() |
|
44 | |||
45 | 8 | public static function hasAccess($key) |
|
53 | |||
54 | 276 | public static function hasDisplayAllStatus() |
|
58 | |||
59 | 16 | public static function forgotDisplayAllStatus() |
|
63 | |||
64 | 16 | public static function setDisplayAllStatus() |
|
68 | |||
69 | 16 | public static function setIsLoggedIn() |
|
79 | |||
80 | 16 | public static function forgotIsLoggedIn() |
|
90 | |||
91 | 8 | public static function securityCheckLockEnabled() |
|
95 | } |
Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable: