Skip to content
Snippets Groups Projects

tuleap-108-add-stricter-code-quality-tools-configuration

5 files
+ 10
6
Compare changes
  • Side-by-side
  • Inline

Files

@@ -12,7 +12,6 @@ use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Mailer\MailerInterface;
use Symfony\Component\Mime\Address;
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
use Symfony\Component\Routing\Annotation\Route;
use SymfonyCasts\Bundle\ResetPassword\Controller\ResetPasswordControllerTrait;
@@ -102,6 +101,9 @@ class ResetPasswordController extends AbstractController
try {
$user = $this->resetPasswordHelper->validateTokenAndFetchUser($token);
if (! $user instanceof User) {
throw new \Exception("User should be an instance of UserPasswordHasherInterface");
}
} catch (ResetPasswordExceptionInterface $e) {
$this->addFlash('reset_password_error', sprintf(
'There was a problem validating your reset request - %s',
Loading