original_string: private function drain(
          StreamInterface $source,
          StreamInterface $sink,
          $contentLength
      ) {
          // If a content-length header is provided, then stop reading once
          // that number of bytes has been read. This can prevent infinitely
          // reading from a stream when dealing with servers that do not honor
          // Connection: Close headers.
          Psr7\copy_to_stream(
              $source,
              $sink,
              (strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1
          );
  
          $sink->seek(0);
          $source->close();
  
          return $sink;
      }
code: private function drain(
          StreamInterface $source,
          StreamInterface $sink,
          $contentLength
      ) {
          // If a content-length header is provided, then stop reading once
          // that number of bytes has been read. This can prevent infinitely
          // reading from a stream when dealing with servers that do not honor
          // Connection: Close headers.
          Psr7\copy_to_stream(
              $source,
              $sink,
              (strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1
          );
  
          $sink->seek(0);
          $source->close();
  
          return $sink;
      }
code_tokens: private function drain ( StreamInterface $ source , StreamInterface $ sink , $ contentLength ) { // If a content-length header is provided, then stop reading once // that number of bytes has been read. This can prevent infinitely // reading from a stream when dealing with servers that do not honor // Connection: Close headers. Psr7 \ copy_to_stream ( $ source , $ sink , ( strlen ( $ contentLength ) > 0 && ( int ) $ contentLength > 0 ) ? ( int ) $ contentLength : - 1 ) ; $ sink -> seek ( 0 ) ; $ source -> close ( ) ; return $ sink ; }
docstring: Drains the source stream into the "sink" client option.
  
  @param StreamInterface $source
  @param StreamInterface $sink
  @param string          $contentLength Header specifying the amount of
  data to read.
  
  @return StreamInterface
  @throws \RuntimeException when the sink option is invalid.
docstring_tokens: Drains the source stream into the sink client option .