original_string: protected function assertProtocolVersion($version)
      {
          if (!is_string($version) && !is_numeric($version)) {
              throw new \InvalidArgumentException("HTTP version must be a string or float");
          }
          
          if ($version != '' && $version !== "1.0" && $version !== "1.1" && $version !== "2") {
              throw new \InvalidArgumentException("Invalid HTTP protocol version '$version'");
          }
      }
code: protected function assertProtocolVersion($version)
      {
          if (!is_string($version) && !is_numeric($version)) {
              throw new \InvalidArgumentException("HTTP version must be a string or float");
          }
          
          if ($version != '' && $version !== "1.0" && $version !== "1.1" && $version !== "2") {
              throw new \InvalidArgumentException("Invalid HTTP protocol version '$version'");
          }
      }
code_tokens: protected function assertProtocolVersion ( $ version ) { if ( ! is_string ( $ version ) && ! is_numeric ( $ version ) ) { throw new \ InvalidArgumentException ( "HTTP version must be a string or float" ) ; } if ( $ version != '' && $ version !== "1.0" && $ version !== "1.1" && $ version !== "2" ) { throw new \ InvalidArgumentException ( "Invalid HTTP protocol version '$version'" ) ; } }
docstring: Set the HTTP protocol version.
  
  @param string $version HTTP protocol version
  @throws \InvalidArgumentException for invalid versions
docstring_tokens: Set the HTTP protocol version .