original_string: public function open($method, $action = '', $attr = array())
      {
          // check if they wish to send a file
          // default to post method and add the enctype needed to send files
          $method = strtolower($method);
          if ($method === 'file') {
              $method = 'post';
              $attr['enctype'] = 'multipart/form-data';
          }
  
          if (! in_array($method, array('post', 'get'))) {
              $method = 'post';
          }
  
          $attr['method'] = $method;
          $attr['action'] = $action;
  
          return $this->Html->tag('form', $attr);
      }
code: public function open($method, $action = '', $attr = array())
      {
          // check if they wish to send a file
          // default to post method and add the enctype needed to send files
          $method = strtolower($method);
          if ($method === 'file') {
              $method = 'post';
              $attr['enctype'] = 'multipart/form-data';
          }
  
          if (! in_array($method, array('post', 'get'))) {
              $method = 'post';
          }
  
          $attr['method'] = $method;
          $attr['action'] = $action;
  
          return $this->Html->tag('form', $attr);
      }
code_tokens: public function open ( $ method , $ action = '' , $ attr = array ( ) ) { // check if they wish to send a file // default to post method and add the enctype needed to send files $ method = strtolower ( $ method ) ; if ( $ method === 'file' ) { $ method = 'post' ; $ attr [ 'enctype' ] = 'multipart/form-data' ; } if ( ! in_array ( $ method , array ( 'post' , 'get' ) ) ) { $ method = 'post' ; } $ attr [ 'method' ] = $ method ; $ attr [ 'action' ] = $ action ; return $ this -> Html -> tag ( 'form' , $ attr ) ; }
docstring: open a form
  
  @param   string  Type of form, get / post / file (adds as post and adds enctype) etc...
  @param   string  Action for the form
  @param   array   Array of extra params
  @return  string
docstring_tokens: open a form