src/PhoneNumberUtil.php
private function getSupportedTypesForMetadata(PhoneMetadata $metadata)
    {
        $types = array();
        foreach (array_keys(PhoneNumberType::values()) as $type) {
            if ($type === PhoneNumberType::FIXED_LINE_OR_MOBILE || $type === PhoneNumberType::UNKNOWN) {
                // Never return FIXED_LINE_OR_MOBILE (it is a convenience type, and represents that a
                // particular number type can't be determined) or UNKNOWN (the non-type).
                continue;
            }

            if (self::descHasData($this->getNumberDescByType($metadata, $type))) {
                $types[] = $type;
            }
        }

        return $types;
    }
private function getSupportedTypesForMetadata(PhoneMetadata $metadata)
    {
        $types = array();
        foreach (array_keys(PhoneNumberType::values()) as $type) {
            if ($type === PhoneNumberType::FIXED_LINE_OR_MOBILE || $type === PhoneNumberType::UNKNOWN) {
                // Never return FIXED_LINE_OR_MOBILE (it is a convenience type, and represents that a
                // particular number type can't be determined) or UNKNOWN (the non-type).
                continue;
            }

            if (self::descHasData($this->getNumberDescByType($metadata, $type))) {
                $types[] = $type;
            }
        }

        return $types;
    }
private function getSupportedTypesForMetadata ( PhoneMetadata $ metadata ) { $ types = array ( ) ; foreach ( array_keys ( PhoneNumberType :: values ( ) ) as $ type ) { if ( $ type === PhoneNumberType :: FIXED_LINE_OR_MOBILE || $ type === PhoneNumberType :: UNKNOWN ) { // Never return FIXED_LINE_OR_MOBILE (it is a convenience type, and represents that a // particular number type can't be determined) or UNKNOWN (the non-type). continue ; } if ( self :: descHasData ( $ this -> getNumberDescByType ( $ metadata , $ type ) ) ) { $ types [ ] = $ type ; } } return $ types ; }
Returns the types we have metadata for based on the PhoneMetadata object passed in

@param PhoneMetadata $metadata
@return array
Returns the types we have metadata for based on the PhoneMetadata object passed in