verify($ticket, $rand); if (!$result) { throw new BadRequestException('security.invalid_captcha_code'); } } }