public function equals(Rule $rule)
    {
        if ($this->ruleHash !== $rule->ruleHash) {
            return false;
        }

        if (count($this->literals) != count($rule->literals)) {
            return false;
        }

        for ($i = 0, $n = count($this->literals); $i < $n; $i++) {
            if ($this->literals[$i] !== $rule->literals[$i]) {
                return false;
            }
        }

        return true;
    }
public function equals(Rule $rule)
    {
        if ($this->ruleHash !== $rule->ruleHash) {
            return false;
        }

        if (count($this->literals) != count($rule->literals)) {
            return false;
        }

        for ($i = 0, $n = count($this->literals); $i < $n; $i++) {
            if ($this->literals[$i] !== $rule->literals[$i]) {
                return false;
            }
        }

        return true;
    }
public function equals ( Rule $ rule ) { if ( $ this -> ruleHash !== $ rule -> ruleHash ) { return false ; } if ( count ( $ this -> literals ) != count ( $ rule -> literals ) ) { return false ; } for ( $ i = 0 , $ n = count ( $ this -> literals ) ; $ i < $ n ; $ i ++ ) { if ( $ this -> literals [ $ i ] !== $ rule -> literals [ $ i ] ) { return false ; } } return true ; }
Checks if this rule is equal to another one

Ignores whether either of the rules is disabled.

@param  Rule $rule The rule to check against
@return bool Whether the rules are equal
Checks if this rule is equal to another one