final public const TECHNICAL_NAME = 'zip_code_range';
public function match(TaxRuleEntity
$taxRuleEntity, ?CustomerEntity
$customer, ShippingLocation
$shippingLocation): bool
{ if ($taxRuleEntity->
getType()->
getTechnicalName() !== self::TECHNICAL_NAME
|| !
$this->
metPreconditions($taxRuleEntity,
$shippingLocation) ) { return false;
} $zipCode =
$this->
getZipCode($shippingLocation);
$toZipCode =
$taxRuleEntity->
getData()['toZipCode'
];
$fromZipCode =
$taxRuleEntity->
getData()['fromZipCode'
];
if ($fromZipCode === null ||
$toZipCode === null ||
$zipCode <
$fromZipCode ||
$zipCode >
$toZipCode) { return false;
} if ($taxRuleEntity->
getActiveFrom() !== null
) { return $this->
isTaxActive($taxRuleEntity);
}