3939
4040class PasswordResetController extends Controller
4141{
42- private FormFactory $ formFactory ;
43-
44- private UserService $ userService ;
45-
46- private Environment $ twig ;
47-
48- private ActionResultHandler $ actionResultHandler ;
49-
50- private PermissionResolver $ permissionResolver ;
51-
52- private ConfigResolverInterface $ configResolver ;
53-
54- private NotificationServiceInterface $ notificationService ;
55-
5642 public function __construct (
57- FormFactory $ formFactory ,
58- UserService $ userService ,
59- Environment $ twig ,
60- ActionResultHandler $ actionResultHandler ,
61- PermissionResolver $ permissionResolver ,
62- ConfigResolverInterface $ configResolver ,
63- NotificationServiceInterface $ notificationService
43+ private readonly FormFactory $ formFactory ,
44+ private readonly UserService $ userService ,
45+ private readonly Environment $ twig ,
46+ private readonly ActionResultHandler $ actionResultHandler ,
47+ private readonly PermissionResolver $ permissionResolver ,
48+ private readonly ConfigResolverInterface $ configResolver ,
49+ private readonly NotificationServiceInterface $ notificationService
6450 ) {
65- $ this ->formFactory = $ formFactory ;
66- $ this ->userService = $ userService ;
67- $ this ->twig = $ twig ;
68- $ this ->actionResultHandler = $ actionResultHandler ;
69- $ this ->permissionResolver = $ permissionResolver ;
70- $ this ->configResolver = $ configResolver ;
71- $ this ->notificationService = $ notificationService ;
7251 }
7352
7453 /**
75- * @return \Ibexa\User\View\ForgotPassword\FormView|\Ibexa\User\View\ForgotPassword\SuccessView|\Symfony\Component\HttpFoundation\RedirectResponse
76- *
7754 * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentType
55+ * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException
7856 */
7957 public function userForgotPasswordAction (Request $ request , ?string $ reason = null ): RedirectResponse |SuccessView |FormView
8058 {
@@ -108,11 +86,8 @@ public function userForgotPasswordAction(Request $request, ?string $reason = nul
10886 }
10987
11088 /**
111- * @param \Symfony\Component\HttpFoundation\Request $request
112- *
113- * @return \Ibexa\User\View\ForgotPassword\LoginView|\Ibexa\User\View\ForgotPassword\SuccessView
114- *
11589 * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentType
90+ * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException
11691 */
11792 public function userForgotPasswordLoginAction (Request $ request ): SuccessView |LoginView
11893 {
@@ -125,7 +100,7 @@ public function userForgotPasswordLoginAction(Request $request): SuccessView|Log
125100
126101 try {
127102 $ user = $ this ->userService ->loadUserByLogin ($ data ->getLogin ());
128- } catch (NotFoundException $ e ) {
103+ } catch (NotFoundException ) {
129104 $ user = null ;
130105 }
131106
@@ -145,11 +120,6 @@ public function userForgotPasswordLoginAction(Request $request): SuccessView|Log
145120 }
146121
147122 /**
148- * @param \Symfony\Component\HttpFoundation\Request $request
149- * @param string $hashKey
150- *
151- * @return \Ibexa\User\View\ResetPassword\FormView|\Ibexa\User\View\ResetPassword\InvalidLinkView|\Ibexa\User\View\ResetPassword\SuccessView
152- *
153123 * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentType
154124 */
155125 public function userResetPasswordAction (Request $ request , string $ hashKey ): InvalidLinkView |UserResetPasswordSuccessView |UserResetPasswordFormView
@@ -210,10 +180,6 @@ public function userResetPasswordAction(Request $request, string $hashKey): Inva
210180 }
211181
212182 /**
213- * @param \Ibexa\Contracts\Core\Repository\Values\User\User $user
214- *
215- * @return string
216- *
217183 * @throws \Exception
218184 */
219185 private function updateUserToken (User $ user ): string
0 commit comments