original_string: public function removeRule(HTML_QuickForm2_Rule $rule)
      {
          foreach ($this->rules as $i => $r) {
              if ($r[0] === $rule) {
                  unset($this->rules[$i]);
                  break;
              }
          }
          return $rule;
      }
code: public function removeRule(HTML_QuickForm2_Rule $rule)
      {
          foreach ($this->rules as $i => $r) {
              if ($r[0] === $rule) {
                  unset($this->rules[$i]);
                  break;
              }
          }
          return $rule;
      }
code_tokens: public function removeRule ( HTML_QuickForm2_Rule $ rule ) { foreach ( $ this -> rules as $ i => $ r ) { if ( $ r [ 0 ] === $ rule ) { unset ( $ this -> rules [ $ i ] ) ; break ; } } return $ rule ; }
docstring: Removes a validation rule
  
  The method will *not* throw an Exception if the rule wasn't added to the
  element.
  
  @param    HTML_QuickForm2_Rule    Validation rule to remove
  @return   HTML_QuickForm2_Rule    Removed rule
docstring_tokens: Removes a validation rule