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

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