original_string: public function removeRequired()
      {
          foreach ($this->getRules() as $key => $rules) {
              $newRules[$key] = preg_grep("/^required/", $rules, PREG_GREP_INVERT);
          }
          $this->rules = $newRules;
          return $this;
      }
code: public function removeRequired()
      {
          foreach ($this->getRules() as $key => $rules) {
              $newRules[$key] = preg_grep("/^required/", $rules, PREG_GREP_INVERT);
          }
          $this->rules = $newRules;
          return $this;
      }
code_tokens: public function removeRequired ( ) { foreach ( $ this -> getRules ( ) as $ key => $ rules ) { $ newRules [ $ key ] = preg_grep ( "/^required/" , $ rules , PREG_GREP_INVERT ) ; } $ this -> rules = $ newRules ; return $ this ; }
docstring: remove required rule from rules function
  
  @return array
docstring_tokens: remove required rule from rules function