From 61a8561dd60e64afeb1d00770abdaafd2cf44608 Mon Sep 17 00:00:00 2001 From: Olaf Date: Fri, 3 Jan 2020 00:04:18 +0100 Subject: [PATCH] fix (Captcha) allow null value for bypassCode --- Validator/CaptchaValidator.php | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/Validator/CaptchaValidator.php b/Validator/CaptchaValidator.php index 20e5e74..4bab9a5 100644 --- a/Validator/CaptchaValidator.php +++ b/Validator/CaptchaValidator.php @@ -49,20 +49,12 @@ class CaptchaValidator */ private $translator; - /** - * @param TranslatorInterface $translator - * @param SessionInterface $session - * @param string $key - * @param string $invalidMessage - * @param string $bypassCode - * @param int $humanity - */ public function __construct( TranslatorInterface $translator, SessionInterface $session, string $key, string $invalidMessage, - string $bypassCode, + ?string $bypassCode, int $humanity ) { $this->translator = $translator; @@ -146,9 +138,8 @@ class CaptchaValidator /** * Run a match comparison on the provided code and the expected code * - * @param $code - * @param $expectedCode - * + * @param string $code + * @param string|null $expectedCode * @return bool */ protected function compare($code, $expectedCode): bool