original_string: private function getRequestBody(array $parameters, array $files)
      {
          $body = array();
          foreach ($parameters as $parameterName => $parameterValue) {
              if (is_scalar($parameterValue) || (is_null($parameterValue) && $parameterName !== 'id')) {
                  $body[] = array(
                      'name' => $parameterName,
                      'contents' => strval($parameterValue),
                  );
              }
          }
  
          foreach ($files as $parameterName => $fileResource) {
              if (is_resource($fileResource)) {
                  $metaData = stream_get_meta_data($fileResource);
  
                  $body[] = array(
                      'name' => $parameterName,
                      'contents' => $fileResource,
                      'filename' => basename($metaData['uri']),
                  );
              }
          }
  
          return new MultipartStream($body);
      }
code: private function getRequestBody(array $parameters, array $files)
      {
          $body = array();
          foreach ($parameters as $parameterName => $parameterValue) {
              if (is_scalar($parameterValue) || (is_null($parameterValue) && $parameterName !== 'id')) {
                  $body[] = array(
                      'name' => $parameterName,
                      'contents' => strval($parameterValue),
                  );
              }
          }
  
          foreach ($files as $parameterName => $fileResource) {
              if (is_resource($fileResource)) {
                  $metaData = stream_get_meta_data($fileResource);
  
                  $body[] = array(
                      'name' => $parameterName,
                      'contents' => $fileResource,
                      'filename' => basename($metaData['uri']),
                  );
              }
          }
  
          return new MultipartStream($body);
      }
code_tokens: private function getRequestBody ( array $ parameters , array $ files ) { $ body = array ( ) ; foreach ( $ parameters as $ parameterName => $ parameterValue ) { if ( is_scalar ( $ parameterValue ) || ( is_null ( $ parameterValue ) && $ parameterName !== 'id' ) ) { $ body [ ] = array ( 'name' => $ parameterName , 'contents' => strval ( $ parameterValue ) , ) ; } } foreach ( $ files as $ parameterName => $ fileResource ) { if ( is_resource ( $ fileResource ) ) { $ metaData = stream_get_meta_data ( $ fileResource ) ; $ body [ ] = array ( 'name' => $ parameterName , 'contents' => $ fileResource , 'filename' => basename ( $ metaData [ 'uri' ] ) , ) ; } } return new MultipartStream ( $ body ) ; }
docstring: Returns the multipart request body with the parameters and files.
  
  @param array $parameters
  @param array $files
  
  @return MultipartStream
docstring_tokens: Returns the multipart request body with the parameters and files .