final public const TECHNICAL_NAME = 'entire_country';
public function match(TaxRuleEntity
$taxRuleEntity, ?CustomerEntity
$customer, ShippingLocation
$shippingLocation): bool
{ if ($taxRuleEntity->
getType()->
getTechnicalName() !== self::TECHNICAL_NAME
|| !
$this->
metPreconditions($taxRuleEntity,
$shippingLocation) ) { return false;
} if ($taxRuleEntity->
getActiveFrom() !== null
) { return $this->
isTaxActive($taxRuleEntity);
} return true;
} private function metPreconditions(TaxRuleEntity
$taxRuleEntity, ShippingLocation
$shippingLocation): bool
{ return $shippingLocation->
getCountry()->
getId() ===
$taxRuleEntity->
getCountryId();
}}