original_string: protected static function getBody(PsrResponse $response)
      {
          $stream = $response->getBody();
          if ($stream->getMetadata('wrapper_type') === 'plainfile') {
              return ['body' => '', 'file' => $stream->getMetadata('uri')];
          }
          if ($stream->getSize() === 0) {
              return ['body' => '', 'file' => false];
          }
          $stream->rewind();
  
          return ['body' => $stream->getContents(), 'file' => false];
      }
code: protected static function getBody(PsrResponse $response)
      {
          $stream = $response->getBody();
          if ($stream->getMetadata('wrapper_type') === 'plainfile') {
              return ['body' => '', 'file' => $stream->getMetadata('uri')];
          }
          if ($stream->getSize() === 0) {
              return ['body' => '', 'file' => false];
          }
          $stream->rewind();
  
          return ['body' => $stream->getContents(), 'file' => false];
      }
code_tokens: protected static function getBody ( PsrResponse $ response ) { $ stream = $ response -> getBody ( ) ; if ( $ stream -> getMetadata ( 'wrapper_type' ) === 'plainfile' ) { return [ 'body' => '' , 'file' => $ stream -> getMetadata ( 'uri' ) ] ; } if ( $ stream -> getSize ( ) === 0 ) { return [ 'body' => '' , 'file' => false ] ; } $ stream -> rewind ( ) ; return [ 'body' => $ stream -> getContents ( ) , 'file' => false ] ; }
docstring: Get the response body from a PSR7 Response.
  
  @param \Psr\Http\Message\ResponseInterface $response The response to convert.
  @return array A hash of 'body' and 'file'
docstring_tokens: Get the response body from a PSR7 Response .