public function evaluateQueryRule(QueryValue $query, $params = [])
    {
        if(($rule = $query->getRule()) instanceof Rule) {
            $environment = $this->rulesEngineProvider->evaluate($rule);
            $this->rulesEngineProvider->setQueryParams($query->getId(), $params);
            
            return $environment->getQueryResults();
        }
        
        return [];
    }
public function evaluateQueryRule(QueryValue $query, $params = [])
    {
        if(($rule = $query->getRule()) instanceof Rule) {
            $environment = $this->rulesEngineProvider->evaluate($rule);
            $this->rulesEngineProvider->setQueryParams($query->getId(), $params);
            
            return $environment->getQueryResults();
        }
        
        return [];
    }
public function evaluateQueryRule ( QueryValue $ query , $ params = [ ] ) { if ( ( $ rule = $ query -> getRule ( ) ) instanceof Rule ) { $ environment = $ this -> rulesEngineProvider -> evaluate ( $ rule ) ; $ this -> rulesEngineProvider -> setQueryParams ( $ query -> getId ( ) , $ params ) ; return $ environment -> getQueryResults ( ) ; } return [ ] ; }
Evaluate rule with query parameters

@param QueryValue $query
@param array $params
@return mixed
Evaluate rule with query parameters