original_string: private function validateProtocol($version)
      {
          $valid = [
              '1.0' => true,
              '1.1' => true,
              '2.0' => true,
          ];
  
          if (!isset($valid[$version])) {
              throw new InvalidArgumentException('Invalid HTTP version. Must be one of: 1.0, 1.1, 2.0');
          }
      }
code: private function validateProtocol($version)
      {
          $valid = [
              '1.0' => true,
              '1.1' => true,
              '2.0' => true,
          ];
  
          if (!isset($valid[$version])) {
              throw new InvalidArgumentException('Invalid HTTP version. Must be one of: 1.0, 1.1, 2.0');
          }
      }
code_tokens: private function validateProtocol ( $ version ) { $ valid = [ '1.0' => true , '1.1' => true , '2.0' => true , ] ; if ( ! isset ( $ valid [ $ version ] ) ) { throw new InvalidArgumentException ( 'Invalid HTTP version. Must be one of: 1.0, 1.1, 2.0' ) ; } }
docstring: Validate version of the HTTP protocol.
  
  @param string $version Version of the HTTP protocol.
  
  @throws \InvalidArgumentException When the protocol version is not valid.
docstring_tokens: Validate version of the HTTP protocol .