/** * @param string $countyCode */ public function __construct($countyCode) { if (!is_string($countyCode)) { throw InvalidArgumentException::invalidType('string', 'countryCodeDefinition', $countyCode); } if (!preg_match('~^\\d+$~', $countyCode)) { throw new InvalidCountryCodeFormatException($countyCode); } if (!CountryCodeListing::isValidCountryCode($countyCode)) { throw UnknownCountryCodeException::unknownCountryCode($countyCode); } $this->countryCode = $countyCode; }