original_string: public function addRules(array $rules, $ruleset = null)
      {
          if ($ruleset) {
              $newRules = array_merge($this->getRuleset($ruleset), $rules);
              $this->setRuleset($newRules, $ruleset);
          } else {
              $newRules = array_merge($this->getRules(), $rules);
              $this->setRules($newRules);
          }
      }
code: public function addRules(array $rules, $ruleset = null)
      {
          if ($ruleset) {
              $newRules = array_merge($this->getRuleset($ruleset), $rules);
              $this->setRuleset($newRules, $ruleset);
          } else {
              $newRules = array_merge($this->getRules(), $rules);
              $this->setRules($newRules);
          }
      }
code_tokens: public function addRules ( array $ rules , $ ruleset = null ) { if ( $ ruleset ) { $ newRules = array_merge ( $ this -> getRuleset ( $ ruleset ) , $ rules ) ; $ this -> setRuleset ( $ newRules , $ ruleset ) ; } else { $ newRules = array_merge ( $ this -> getRules ( ) , $ rules ) ; $ this -> setRules ( $ newRules ) ; } }
docstring: Add rules to the existing rules or ruleset, overriding any existing.
  
  @deprecated watson/validating@0.10.9
  
  @param array  $rules
  @param string $ruleset
docstring_tokens: Add rules to the existing rules or ruleset overriding any existing .