public function getExampleNumberForNonGeoEntity($countryCallingCode)
{
$metadata = $this->getMetadataForNonGeographicalRegion($countryCallingCode);
if ($metadata !== null) {
// For geographical entities, fixed-line data is always present. However, for non-geographical
// entities, this is not the case, so we have to go through different types to find the
// example number. We don't check fixed-line or personal number since they aren't used by
// non-geographical entities (if this changes, a unit-test will catch this.)
/** @var PhoneNumberDesc[] $list */
$list = array($metadata->getMobile(), $metadata->getTollFree(), $metadata->getSharedCost(), $metadata->getVoip(), $metadata->getVoicemail(), $metadata->getUan(), $metadata->getPremiumRate());
foreach ($list as $desc) {
try {
if ($desc !== null && $desc->hasExampleNumber()) {
return $this->parse('+' . $countryCallingCode . $desc->getExampleNumber(), self::UNKNOWN_REGION);
}
} catch (NumberParseException $e) {
}
}
}
return null;
}