]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Controller/SecurityController.php
unit test
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Controller / SecurityController.php
index 5007307afcafa26dbab50ec6082e79036a5314ca..a61a898bf1d07598fb9f54d36c5b0519db7b1dab 100644 (file)
@@ -30,9 +30,10 @@ class SecurityController extends Controller
     }
 
     /**
-     * Request forgot password: show form
+     * Request forgot password: show form.
      *
      * @Route("/forgot-password", name="forgot_password")
+     *
      * @Method({"GET", "POST"})
      */
     public function forgotPasswordAction(Request $request)
@@ -73,9 +74,10 @@ class SecurityController extends Controller
     }
 
     /**
-     * Tell the user to check his email provider
+     * Tell the user to check his email provider.
      *
      * @Route("/forgot-password/check-email", name="forgot_password_check_email")
+     *
      * @Method({"GET"})
      */
     public function checkEmailAction(Request $request)
@@ -93,9 +95,10 @@ class SecurityController extends Controller
     }
 
     /**
-     * Reset user password
+     * Reset user password.
      *
      * @Route("/forgot-password/{token}", name="forgot_password_reset")
+     *
      * @Method({"GET", "POST"})
      */
     public function resetAction(Request $request, $token)
@@ -103,7 +106,7 @@ class SecurityController extends Controller
         $user = $this->getDoctrine()->getRepository('WallabagCoreBundle:User')->findOneByConfirmationToken($token);
 
         if (null === $user) {
-            $this->createNotFoundException(sprintf('No user found with token "%s"', $token));
+            throw $this->createNotFoundException(sprintf('No user found with token "%s"', $token));
         }
 
         $form = $this->createForm(new ResetPasswordType());