original_string: public function setMethods(array $methods)
      {
          $methods = array_map('strtoupper', $methods);
          $diff = array_diff($methods, static::VALID_METHODS);
          if ($diff !== []) {
              throw new InvalidArgumentException(
                  sprintf('Invalid HTTP method received. %s is invalid.', implode(', ', $diff))
              );
          }
          $this->defaults['_method'] = $methods;
  
          return $this;
      }
code: public function setMethods(array $methods)
      {
          $methods = array_map('strtoupper', $methods);
          $diff = array_diff($methods, static::VALID_METHODS);
          if ($diff !== []) {
              throw new InvalidArgumentException(
                  sprintf('Invalid HTTP method received. %s is invalid.', implode(', ', $diff))
              );
          }
          $this->defaults['_method'] = $methods;
  
          return $this;
      }
code_tokens: public function setMethods ( array $ methods ) { $ methods = array_map ( 'strtoupper' , $ methods ) ; $ diff = array_diff ( $ methods , static :: VALID_METHODS ) ; if ( $ diff !== [ ] ) { throw new InvalidArgumentException ( sprintf ( 'Invalid HTTP method received. %s is invalid.' , implode ( ', ' , $ diff ) ) ) ; } $ this -> defaults [ '_method' ] = $ methods ; return $ this ; }
docstring: Set the accepted HTTP methods for this route.
  
  @param array $methods The HTTP methods to accept.
  @return $this
  @throws \InvalidArgumentException
docstring_tokens: Set the accepted HTTP methods for this route .