src/PhoneNumberUtil.php
public static function formattingRuleHasFirstGroupOnly($nationalPrefixFormattingRule)
    {
        $firstGroupOnlyPrefixPatternMatcher = new Matcher(static::FIRST_GROUP_ONLY_PREFIX_PATTERN,
            $nationalPrefixFormattingRule);

        return mb_strlen($nationalPrefixFormattingRule) === 0
            || $firstGroupOnlyPrefixPatternMatcher->matches();
    }
public static function formattingRuleHasFirstGroupOnly($nationalPrefixFormattingRule)
    {
        $firstGroupOnlyPrefixPatternMatcher = new Matcher(static::FIRST_GROUP_ONLY_PREFIX_PATTERN,
            $nationalPrefixFormattingRule);

        return mb_strlen($nationalPrefixFormattingRule) === 0
            || $firstGroupOnlyPrefixPatternMatcher->matches();
    }
public static function formattingRuleHasFirstGroupOnly ( $ nationalPrefixFormattingRule ) { $ firstGroupOnlyPrefixPatternMatcher = new Matcher ( static :: FIRST_GROUP_ONLY_PREFIX_PATTERN , $ nationalPrefixFormattingRule ) ; return mb_strlen ( $ nationalPrefixFormattingRule ) === 0 || $ firstGroupOnlyPrefixPatternMatcher -> matches ( ) ; }
Helper function to check if the national prefix formatting rule has the first group only, i.e.,
does not start with the national prefix.
@param string $nationalPrefixFormattingRule
@return bool
Helper function to check if the national prefix formatting rule has the first group only i . e . does not start with the national prefix .