public function checkIsCodeValid(string $code, ?DomainLanguages $locale = null): bool 	{ 		$locale = $locale ? $locale->value : DomainLanguages::getDefaultLanguage(); 		$applicant = Applicant::whereRaw('BINARY `code` = ?', [$code])->fillingOnlineSurvey();  		if ($applicant->doesntExist()) { 			abort(404, (string) __('applicants.validation.code', [], $locale)); 		}  		$applicant = $applicant->hasNotCompletedSurvey();  		if ($applicant->doesntExist()) { 			abort(403, (string) __('applicants.validation.filled', [], $locale)); 		}  		$applicant = $applicant->first(); 		$client_survey = $applicant->survey;  		if (!$client_survey) { 			abort(404, (string) __('client-surveys.validation.not-found', [], $locale)); 		}  		if (!$client_survey->isInFillablePeriod()) { 			abort(403, (string) __('client-surveys.validation.not-in-fillable-period', [], $locale)); 		}  		return true; 	}