code: private function adjustNumbytes($numBytes): int
      {
          if (isset($this->headers['Content-Length'])) {
              // Try to read the whole payload at once
              $numBytes = intval($this->headers['Content-Length']);
          }
          
          return $numBytes;
      }
docs: Adjust number of bytes to read according content length header
  
  @param int $numBytes
  @return int