original_string: public function submitForm(string $button, array $fieldValues = [], string $method = 'POST', array $serverParameters = []): Crawler
      {
          if (null === $this->crawler) {
              throw new BadMethodCallException(sprintf('The "request()" method must be called before "%s()".', __METHOD__));
          }
  
          $buttonNode = $this->crawler->selectButton($button);
          $form = $buttonNode->form($fieldValues, $method);
  
          return $this->submit($form, [], $serverParameters);
      }
code: public function submitForm(string $button, array $fieldValues = [], string $method = 'POST', array $serverParameters = []): Crawler
      {
          if (null === $this->crawler) {
              throw new BadMethodCallException(sprintf('The "request()" method must be called before "%s()".', __METHOD__));
          }
  
          $buttonNode = $this->crawler->selectButton($button);
          $form = $buttonNode->form($fieldValues, $method);
  
          return $this->submit($form, [], $serverParameters);
      }
code_tokens: public function submitForm ( string $ button , array $ fieldValues = [ ] , string $ method = 'POST' , array $ serverParameters = [ ] ) : Crawler { if ( null === $ this -> crawler ) { throw new BadMethodCallException ( sprintf ( 'The "request()" method must be called before "%s()".' , __METHOD__ ) ) ; } $ buttonNode = $ this -> crawler -> selectButton ( $ button ) ; $ form = $ buttonNode -> form ( $ fieldValues , $ method ) ; return $ this -> submit ( $ form , [ ] , $ serverParameters ) ; }
docstring: Finds the first form that contains a button with the given content and
  uses it to submit the given form field values.
  
  @param string $button           The text content, id, value or name of the form <button> or <input type="submit">
  @param array  $fieldValues      Use this syntax: ['my_form[name]' => '...', 'my_form[email]' => '...']
  @param string $method           The HTTP method used to submit the form
  @param array  $serverParameters These values override the ones stored in $_SERVER (HTTP headers must include a HTTP_ prefix as PHP does)
docstring_tokens: Finds the first form that contains a button with the given content and uses it to submit the given form field values .