countryRepository = $countryRepository ?: new CountryRepository(); } /** * {@inheritdoc} */ public function validate($value, Constraint $constraint) { if ($value === null || $value === '') { return; } if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) { throw new UnexpectedTypeException($value, 'string'); } $countries = $this->countryRepository->getList(); $value = (string) $value; if (!isset($countries[$value])) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) ->addViolation(); } } } __halt_compiler();----SIGNATURE:----UIQTt5ci8gJnuGUyrFDF3GYDl/ZVNCRcMWtyAHW6Mm5loXCuYOtdkOhTwnRUn2JDXCdQnRuSKu/pbW2cmWRDRr+HHsAQLxC0tFZ96tkBwz4E9unL5v43Xh1eG7+yyF7s8tnCry6mfyE1TCvMpRYEqUxaVuP8tB3nh4U/4GkoSANXcV9KcEPOJBFSSPrNg0B6uKkaITEW+AM++tWRIe+BNT8f86qXS/bSYgkbNadTQibaVGSr1Uuig/ENrJb1jnc66LXOloKjGIm7iO9LGzF8g0Q2wABqItRd805eA5IJWWDqWJZpLrUJZcJfuZhUvEJwM37mj+cQfOdNQYoP1WhXgKEen8vhwixKBAj68l3CsuepQ74gQmzVKi95I+IuK32qI5uMA/484N6yF3YSnLDRqBPbEf4//egG5GWhHjsROFVkK2u1fSMupoLv0/a5DuLLhjYPJh8msoCeQYc0EtBS5rl+hXWvG/t1alXytFPik3AJbkPch4JoQeMBKOtOH72tBm2dd080ElLyGPVNkdXzccvsxujhUmLsY1onFzISeuu5iHrn44Ha5f7aRTYbthT5wIjRZoOvE/vp+QWprGLlr4JD8IZrOeVAfPWiU7PaZBQep+Fbkpn9498emYiDCkI9mL63wgixKhVPVLX2N5MKK5Nbrlkh+njKtAYfITYfC/g=----ATTACHMENT:----NDYzMTE0NjE4MzM5NDQ4NSA3NTYxMTM3NjA0NTk2Nzk4IDI4OTA2MTQ0MzAwNjY4MzE=