protected int
$count;
public function match(RuleScope
$scope): bool
{ if (!
$scope instanceof CheckoutRuleScope
) { return false;
} if (!
$customer =
$scope->
getSalesChannelContext()->
getCustomer()) { return RuleComparison::
isNegativeOperator($this->operator
);
} $numberOfReviews =
$customer->
getReviewCount();
return RuleComparison::
numeric($numberOfReviews,
$this->count,
$this->operator
);
} public function getConstraints(): array
{ return [ 'count' => RuleConstraints::
int(),
'operator' => RuleConstraints::
numericOperators(false
),
];
}