public function checkCaptchaAfterUnSuccessfulLoginFromCountry(Captcha $captcha, Counter $counter) { $counter->increaseFailedLoginIpCountryCounter(); if ($counter->getFailedLoginIpCountryCounter() >= Counter::CAPTCHA_STATUS_SWITCH_FAILED_LOGIN_USERNAME_ATTEMPTS) { $captcha->setCaptchaStatus(true); } return $captcha->getCaptchaStatus(); }