return (new RuleConfig()) ->
operatorSet(RuleConfig::OPERATOR_SET_NUMBER, true
) ->
numberField('amount',
['unit' => RuleConfig::UNIT_DIMENSION
]);
} /**
* @throws CartException
* @throws UnsupportedOperatorException
*/
private function matchWidthDimension(LineItem
$lineItem): bool
{ $deliveryInformation =
$lineItem->
getDeliveryInformation();
if (!
$deliveryInformation instanceof DeliveryInformation
) { return RuleComparison::
isNegativeOperator($this->operator
);
} return RuleComparison::
numeric($deliveryInformation->
getWidth(),
$this->amount,
$this->operator
);
}}