public function apply(ContextInterface $context);
/** * @param RuleInterface $rule * @param ContextInterface $context */ private function applyRule(RuleInterface $rule, ContextInterface $context) { if (!$rule->appliesToContext($context)) { return; } $rule->apply($context); }