vendor/shopware/storefront/Framework/Captcha/Exception/CaptchaInvalidException.php line 11

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Storefront\Framework\Captcha\Exception;
  3. use Shopware\Core\Framework\Log\Package;
  4. use Shopware\Core\Framework\ShopwareHttpException;
  5. use Shopware\Storefront\Framework\Captcha\AbstractCaptcha;
  6. use Symfony\Component\HttpFoundation\Response;
  7. #[Package('storefront')]
  8. class CaptchaInvalidException extends ShopwareHttpException
  9. {
  10.     public function __construct(AbstractCaptcha $captcha)
  11.     {
  12.         parent::__construct(
  13.             'The provided value for captcha "{{ captcha }}" is not valid.',
  14.             [
  15.                 'captcha' => \get_class($captcha),
  16.             ]
  17.         );
  18.     }
  19.     public function getStatusCode(): int
  20.     {
  21.         return Response::HTTP_FORBIDDEN;
  22.     }
  23.     public function getErrorCode(): string
  24.     {
  25.         return 'FRAMEWORK__INVALID_CAPTCHA_VALUE';
  26.     }
  27. }