public function evaluate(RuleInterface $rule, array $context = [])
    {
        $context = array_merge(
            $this->contextProvider->getContext(),
            $context
        );

        return $this
            ->expressionLanguage
            ->evaluate($rule->getExpression(), $context);
    }
public function evaluate(RuleInterface $rule, array $context = [])
    {
        $context = array_merge(
            $this->contextProvider->getContext(),
            $context
        );

        return $this
            ->expressionLanguage
            ->evaluate($rule->getExpression(), $context);
    }
public function evaluate ( RuleInterface $ rule , array $ context = [ ] ) { $ context = array_merge ( $ this -> contextProvider -> getContext ( ) , $ context ) ; return $ this -> expressionLanguage -> evaluate ( $ rule -> getExpression ( ) , $ context ) ; }
Evaluates a rule and returns result.

@param RuleInterface $rule
@param array         $context

@return mixed
Evaluates a rule and returns result .