public function match(AddressInterface $address)
    {
        if ($address->getCountryCode() != $this->countryCode) {
            return false;
        }
        if ($this->administrativeArea && $this->administrativeArea != $address->getAdministrativeArea()) {
            return false;
        }
        if ($this->locality && $this->locality != $address->getLocality()) {
            return false;
        }
        if ($this->dependentLocality && $this->dependentLocality != $address->getDependentLocality()) {
            return false;
        }
        if (!PostalCodeHelper::match($address->getPostalCode(), $this->includedPostalCodes, $this->excludedPostalCodes)) {
            return false;
        }

        return true;
    }
public function match(AddressInterface $address)
    {
        if ($address->getCountryCode() != $this->countryCode) {
            return false;
        }
        if ($this->administrativeArea && $this->administrativeArea != $address->getAdministrativeArea()) {
            return false;
        }
        if ($this->locality && $this->locality != $address->getLocality()) {
            return false;
        }
        if ($this->dependentLocality && $this->dependentLocality != $address->getDependentLocality()) {
            return false;
        }
        if (!PostalCodeHelper::match($address->getPostalCode(), $this->includedPostalCodes, $this->excludedPostalCodes)) {
            return false;
        }

        return true;
    }
public function match ( AddressInterface $ address ) { if ( $ address -> getCountryCode ( ) != $ this -> countryCode ) { return false ; } if ( $ this -> administrativeArea && $ this -> administrativeArea != $ address -> getAdministrativeArea ( ) ) { return false ; } if ( $ this -> locality && $ this -> locality != $ address -> getLocality ( ) ) { return false ; } if ( $ this -> dependentLocality && $ this -> dependentLocality != $ address -> getDependentLocality ( ) ) { return false ; } if ( ! PostalCodeHelper :: match ( $ address -> getPostalCode ( ) , $ this -> includedPostalCodes , $ this -> excludedPostalCodes ) ) { return false ; } return true ; }
Checks whether the provided address belongs to the territory.

@param \CommerceGuys\Addressing\AddressInterfacee $address The address.

@return bool True if the address belongs to the territory, false otherwise.
Checks whether the provided address belongs to the territory .