original_string: protected function assertMethod($method)
      {
          if (!is_string($method)) {
              $type = (is_object($method) ? get_class($method) . ' ' : '') . gettype($method);
              throw new \InvalidArgumentException("Method should be a string, not a $type");
          }
          
          if (preg_match('/[^a-z\-]/i', $method)) {
              $type = (is_object($method) ? get_class($method) . ' ' : '') . gettype($method);
              throw new \InvalidArgumentException("Invalid method '$method': "
                  . "Method may only contain letters and dashes");
          }
      }
code: protected function assertMethod($method)
      {
          if (!is_string($method)) {
              $type = (is_object($method) ? get_class($method) . ' ' : '') . gettype($method);
              throw new \InvalidArgumentException("Method should be a string, not a $type");
          }
          
          if (preg_match('/[^a-z\-]/i', $method)) {
              $type = (is_object($method) ? get_class($method) . ' ' : '') . gettype($method);
              throw new \InvalidArgumentException("Invalid method '$method': "
                  . "Method may only contain letters and dashes");
          }
      }
code_tokens: protected function assertMethod ( $ method ) { if ( ! is_string ( $ method ) ) { $ type = ( is_object ( $ method ) ? get_class ( $ method ) . ' ' : '' ) . gettype ( $ method ) ; throw new \ InvalidArgumentException ( "Method should be a string, not a $type" ) ; } if ( preg_match ( '/[^a-z\-]/i' , $ method ) ) { $ type = ( is_object ( $ method ) ? get_class ( $ method ) . ' ' : '' ) . gettype ( $ method ) ; throw new \ InvalidArgumentException ( "Invalid method '$method': " . "Method may only contain letters and dashes" ) ; } }
docstring: Assert method is valid
  
  @param string $method
  @throws \InvalidArgumentException
docstring_tokens: Assert method is valid