@@ -42,35 +42,25 @@ class User
4242 public const LOGOUT_MANUAL = self ::LogoutManual;
4343 public const LOGOUT_INACTIVITY = self ::LogoutInactivity;
4444
45- /** @var string default role for unauthenticated user */
46- public $ guestRole = 'guest ' ;
45+ /** default role for unauthenticated user */
46+ public string $ guestRole = 'guest ' ;
4747
48- /** @var string default role for authenticated user without own identity */
49- public $ authenticatedRole = 'authenticated ' ;
48+ /** default role for authenticated user without own identity */
49+ public string $ authenticatedRole = 'authenticated ' ;
5050
5151 /** @var callable[] function (User $sender): void; Occurs when the user is successfully logged in */
52- public $ onLoggedIn = [];
52+ public iterable $ onLoggedIn = [];
5353
5454 /** @var callable[] function (User $sender): void; Occurs when the user is logged out */
55- public $ onLoggedOut = [];
56-
57- /** @var UserStorage|IUserStorage Session storage for current user */
58- private $ storage ;
59-
60- /** @var IAuthenticator|null */
61- private $ authenticator ;
62-
63- /** @var Authorizator|null */
64- private $ authorizator ;
65-
66- /** @var IIdentity|null */
67- private $ identity ;
68-
69- /** @var bool|null */
70- private $ authenticated ;
71-
72- /** @var int|null */
73- private $ logoutReason ;
55+ public iterable $ onLoggedOut = [];
56+
57+ /** Session storage for current user */
58+ private UserStorage |IUserStorage $ storage ;
59+ private ?IAuthenticator $ authenticator ;
60+ private ?Authorizator $ authorizator ;
61+ private ?IIdentity $ identity = null ;
62+ private ?bool $ authenticated = null ;
63+ private ?int $ logoutReason = null ;
7464
7565
7666 public function __construct (
0 commit comments