protected function getConfiguration($rule) { if ($rule instanceof PromotionRuleInterface && null !== $rule->getConfiguration()) { return $rule->getConfiguration(); } return []; }