original_string: public function set($route)
      {
          if (is_string($route)) {
              $this->routes[] = array(
                      'pattern' => $route
                  ) + $this->routeOptions;
          } elseif (is_array($route)) {
              $this->routes[] = $route + $this->routeOptions;
          } else {
              throw new \InvalidArgumentException(sprintf(
                  'Expected argument of type string or array, "%s" given',
                  is_object($route) ? get_class($route) : gettype($route)
              ));
          }
  
          return $this;
      }
code: public function set($route)
      {
          if (is_string($route)) {
              $this->routes[] = array(
                      'pattern' => $route
                  ) + $this->routeOptions;
          } elseif (is_array($route)) {
              $this->routes[] = $route + $this->routeOptions;
          } else {
              throw new \InvalidArgumentException(sprintf(
                  'Expected argument of type string or array, "%s" given',
                  is_object($route) ? get_class($route) : gettype($route)
              ));
          }
  
          return $this;
      }
code_tokens: public function set ( $ route ) { if ( is_string ( $ route ) ) { $ this -> routes [ ] = array ( 'pattern' => $ route ) + $ this -> routeOptions ; } elseif ( is_array ( $ route ) ) { $ this -> routes [ ] = $ route + $ this -> routeOptions ; } else { throw new \ InvalidArgumentException ( sprintf ( 'Expected argument of type string or array, "%s" given' , is_object ( $ route ) ? get_class ( $ route ) : gettype ( $ route ) ) ) ; } return $ this ; }
docstring: Add one route
  
  @param  array $route the options of the route
  @throws \InvalidArgumentException When argument is not string or array
  @return $this
docstring_tokens: Add one route