if ($this->
matchVolumeDimension($lineItem)) { return true;
} } return false;
} public function getConstraints(): array
{ return [ 'operator' => RuleConstraints::
numericOperators(false
),
'amount' => RuleConstraints::
float(),
];
} public function getConfig(): RuleConfig
{ return (new RuleConfig()) ->
operatorSet(RuleConfig::OPERATOR_SET_NUMBER
) ->
numberField('amount',
['unit' => RuleConfig::UNIT_VOLUME
]);
}