code: public function equals(Rule $rule)
      {
          // specialized fast-case
          if ($rule instanceof self) {
              if ($this->literal1 !== $rule->literal1) {
                  return false;
              }
  
              if ($this->literal2 !== $rule->literal2) {
                  return false;
              }
  
              return true;
          }
  
          $literals = $rule->getLiterals();
          if (2 != count($literals)) {
              return false;
          }
  
          if ($this->literal1 !== $literals[0]) {
              return false;
          }
  
          if ($this->literal2 !== $literals[1]) {
              return false;
          }
  
          return true;
      }
docs: 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