@@ -67,8 +67,6 @@ class User
6767 final public const ERROR_USER_LOGIN_INVALID = 'The chosen login is invalid. A valid login has at least four ' .
6868 'characters. Only letters, numbers and underscore _ are allowed. The first letter must be a letter. ' ;
6969
70- final public const ERROR_USER_NO_PERM = 'No permission container specified. ' ;
71-
7270 final public const ERROR_USER_NO_USERID = 'No user-ID found. ' ;
7371
7472 final public const ERROR_USER_NO_USERLOGINDATA = 'No user login data found. ' ;
@@ -106,7 +104,7 @@ class User
106104 /**
107105 * authentication container.
108106 *
109- * @var array<string, AuthDriverInterface>
107+ * @var array<string, Auth| AuthDriverInterface>
110108 */
111109 protected array $ authContainer = [];
112110
@@ -240,10 +238,10 @@ public function getAuthData(string $key): mixed
240238 /**
241239 * adds a new authentication object to the user object.
242240 *
243- * @param AuthDriverInterface $authDriver Driver object
241+ * @param Auth $authDriver Driver object
244242 * @param string $name Auth name
245243 */
246- public function addAuth (AuthDriverInterface $ authDriver , string $ name ): bool
244+ public function addAuth (Auth $ authDriver , string $ name ): bool
247245 {
248246 if ($ this ->checkAuth ($ authDriver )) {
249247 $ this ->authContainer [$ name ] = $ authDriver ;
@@ -257,9 +255,9 @@ public function addAuth(AuthDriverInterface $authDriver, string $name): bool
257255 /**
258256 * Returns true if auth is a valid authentication object.
259257 *
260- * @param AuthDriverInterface $auth Auth object
258+ * @param Auth $auth Auth object
261259 */
262- protected function checkAuth (AuthDriverInterface $ auth ): bool
260+ protected function checkAuth (Auth $ auth ): bool
263261 {
264262 $ methods = ['checkCredentials ' ];
265263 foreach ($ methods as $ method ) {
@@ -359,10 +357,10 @@ public function checkMailAddress(string $name): bool
359357 }
360358
361359 /**
362- * search users by login.
360+ * Search users by login.
363361 *
364362 * @param string $search Login name
365- * @return array<int, array >
363+ * @return array<string[] >
366364 */
367365 public function searchUsers (string $ search ): array
368366 {
@@ -626,6 +624,7 @@ public function deleteUser(): bool
626624 return false ;
627625 }
628626
627+ /** @phpstan-ignore-next-line */
629628 $ this ->perm ->refuseAllUserRights ($ this ->userId );
630629
631630 $ delete = sprintf (
0 commit comments