code: public function add($name, Rule $rule)
      {
          unset($this->rules[$name]);
  
          $this->rules[$name] = $rule;
      }
docs: Adds a rule.
  
  @param string $name The rule name
  @param Rule   $rule A Rule instance