protected function filterByAddress(array $taxTypes, AddressInterface $address)
    {
        $taxTypes = array_filter($taxTypes, function ($taxType) use ($address) {
            $zone = $taxType->getZone();

            return $zone->match($address);
        });

        return $taxTypes;
    }
protected function filterByAddress(array $taxTypes, AddressInterface $address)
    {
        $taxTypes = array_filter($taxTypes, function ($taxType) use ($address) {
            $zone = $taxType->getZone();

            return $zone->match($address);
        });

        return $taxTypes;
    }
protected function filterByAddress ( array $ taxTypes , AddressInterface $ address ) { $ taxTypes = array_filter ( $ taxTypes , function ( $ taxType ) use ( $ address ) { $ zone = $ taxType -> getZone ( ) ; return $ zone -> match ( $ address ) ; } ) ; return $ taxTypes ; }
Filters out tax types not matching the provided address.

@param TaxTypeInterface[] $taxTypes The tax types to filter.
@param AddressInterface   $address  The address to filter by.

@return TaxTypeInterface[] An array of tax types whose zones match the
provided address.
Filters out tax types not matching the provided address .