protected function checkRuleCorrect($rule)
    {
        if (!isset($rule->value)) {
            // We will assume a missing value for the rule is to be interpreted as empty.
            $rule->value = null;
        }
        if (!isset($rule->id, $rule->field, $rule->type, $rule->input, $rule->operator)) {
            return false;
        }
        if (!isset($this->operators[$rule->operator])) {
            return false;
        }

        return true;
    }
protected function checkRuleCorrect($rule)
    {
        if (!isset($rule->value)) {
            // We will assume a missing value for the rule is to be interpreted as empty.
            $rule->value = null;
        }
        if (!isset($rule->id, $rule->field, $rule->type, $rule->input, $rule->operator)) {
            return false;
        }
        if (!isset($this->operators[$rule->operator])) {
            return false;
        }

        return true;
    }
protected function checkRuleCorrect ( $ rule ) { if ( ! isset ( $ rule -> value ) ) { // We will assume a missing value for the rule is to be interpreted as empty. $ rule -> value = null ; } if ( ! isset ( $ rule -> id , $ rule -> field , $ rule -> type , $ rule -> input , $ rule -> operator ) ) { return false ; } if ( ! isset ( $ this -> operators [ $ rule -> operator ] ) ) { return false ; } return true ; }
Check if a given rule is correct.
Just before making a query for a rule, we want to make sure that the field, operator and value are set.

@param $rule

@return bool true if values are correct
Check if a given rule is correct . Just before making a query for a rule we want to make sure that the field operator and value are set .