original_string: protected function buildRulesArray()
      {
          if (method_exists($this, $this->context)) {
              $rules = $this->{$this->context}();
          } elseif (isset($this->rules[$this->context])) {
              $rules = $this->rules[$this->context];
          } else {
              throw new InvalidArgumentException("Undefined validation context: " . $this->context);
          }
          return $this->bindPlaceholders($rules);
      }
code: protected function buildRulesArray()
      {
          if (method_exists($this, $this->context)) {
              $rules = $this->{$this->context}();
          } elseif (isset($this->rules[$this->context])) {
              $rules = $this->rules[$this->context];
          } else {
              throw new InvalidArgumentException("Undefined validation context: " . $this->context);
          }
          return $this->bindPlaceholders($rules);
      }
code_tokens: protected function buildRulesArray ( ) { if ( method_exists ( $ this , $ this -> context ) ) { $ rules = $ this -> { $ this -> context } ( ) ; } elseif ( isset ( $ this -> rules [ $ this -> context ] ) ) { $ rules = $ this -> rules [ $ this -> context ] ; } else { throw new InvalidArgumentException ( "Undefined validation context: " . $ this -> context ) ; } return $ this -> bindPlaceholders ( $ rules ) ; }
docstring: Build rules array
  
  @throws InvalidArgumentException
  
  @return array
docstring_tokens: Build rules array