src/WebBundle/Validator/Locale/CountryAvailableLocaleValidator.php line 12

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace WebBundle\Validator\Locale;
  4. use WebBundle\Helper\App;
  5. class CountryAvailableLocaleValidator implements LocaleValidatorInterface
  6. {
  7.     public static function valid(?string $valuebool $nullAndEmptyIsValid false): bool
  8.     {
  9.         if (!$value) {
  10.             return $nullAndEmptyIsValid;
  11.         }
  12.         return array_key_exists($valueApp::getCountryList());
  13.     }
  14. }