public static function match($postalCode, $includeRule, $excludeRule = '')
    {
        $matchIncluded = true;
        if ($includeRule) {
            $matchIncluded = self::matchRule($postalCode, $includeRule);
        }
        $matchExcluded = false;
        if ($excludeRule) {
            $matchExcluded = self::matchRule($postalCode, $excludeRule);
        }

        return $matchIncluded && !$matchExcluded;
    }
public static function match($postalCode, $includeRule, $excludeRule = '')
    {
        $matchIncluded = true;
        if ($includeRule) {
            $matchIncluded = self::matchRule($postalCode, $includeRule);
        }
        $matchExcluded = false;
        if ($excludeRule) {
            $matchExcluded = self::matchRule($postalCode, $excludeRule);
        }

        return $matchIncluded && !$matchExcluded;
    }
public static function match ( $ postalCode , $ includeRule , $ excludeRule = '' ) { $ matchIncluded = true ; if ( $ includeRule ) { $ matchIncluded = self :: matchRule ( $ postalCode , $ includeRule ) ; } $ matchExcluded = false ; if ( $ excludeRule ) { $ matchExcluded = self :: matchRule ( $ postalCode , $ excludeRule ) ; } return $ matchIncluded && ! $ matchExcluded ; }
Checks whether the provided postal code matches the provided rules.

@param string $postalCode  The postal code.
@param string $includeRule The rule for included postal codes.
@param string $excludeRule (Optional) The rule for excluded postal codes.

@return bool True if the provided postal code matches the provided
rules, false otherwise.
Checks whether the provided postal code matches the provided rules .