original_string: public function setMethod($method)
      {
          $method = strtolower($method);
  
          if (in_array($method, [Form::METHOD_GET, Form::METHOD_POST])) {
              $this->method = $method;
          } else {
              throw new \Exception('Incorrect method value given');
          }
          return $this;
      }
code: public function setMethod($method)
      {
          $method = strtolower($method);
  
          if (in_array($method, [Form::METHOD_GET, Form::METHOD_POST])) {
              $this->method = $method;
          } else {
              throw new \Exception('Incorrect method value given');
          }
          return $this;
      }
code_tokens: public function setMethod ( $ method ) { $ method = strtolower ( $ method ) ; if ( in_array ( $ method , [ Form :: METHOD_GET , Form :: METHOD_POST ] ) ) { $ this -> method = $ method ; } else { throw new \ Exception ( 'Incorrect method value given' ) ; } return $ this ; }
docstring: Set the method how this form should be submitted
  
  @param string $method
  @return Form
  @throws \Exception
docstring_tokens: Set the method how this form should be submitted