hasHeader('public-token')) { return false; } $captchaToken = $captchaTokenRepository->getCaptchaTokenByPublicToken($this->header('public-token')); if (is_null($captchaToken)) { return false; } $this->captchaToken = $captchaToken; return true; } /** * Get the validation rules that apply to the request. */ public function rules(): array { return [ ]; } public function getDto(): CaptchaPublicToken { $httpUserData = new HttpUserData( $this->getClientIp(), $this->userAgent(), $this->header('referer') ); return new CaptchaPublicToken( $this->captchaToken, $httpUserData ); } }