original_string: protected static function convertFile($file)
      {
          $error = $file->getError();
          $tmpName = '';
          if ($error === UPLOAD_ERR_OK) {
              $tmpName = $file->getStream()->getMetadata('uri');
          }
  
          return [
              'name' => $file->getClientFilename(),
              'type' => $file->getClientMediaType(),
              'tmp_name' => $tmpName,
              'error' => $error,
              'size' => $file->getSize(),
          ];
      }
code: protected static function convertFile($file)
      {
          $error = $file->getError();
          $tmpName = '';
          if ($error === UPLOAD_ERR_OK) {
              $tmpName = $file->getStream()->getMetadata('uri');
          }
  
          return [
              'name' => $file->getClientFilename(),
              'type' => $file->getClientMediaType(),
              'tmp_name' => $tmpName,
              'error' => $error,
              'size' => $file->getSize(),
          ];
      }
code_tokens: protected static function convertFile ( $ file ) { $ error = $ file -> getError ( ) ; $ tmpName = '' ; if ( $ error === UPLOAD_ERR_OK ) { $ tmpName = $ file -> getStream ( ) -> getMetadata ( 'uri' ) ; } return [ 'name' => $ file -> getClientFilename ( ) , 'type' => $ file -> getClientMediaType ( ) , 'tmp_name' => $ tmpName , 'error' => $ error , 'size' => $ file -> getSize ( ) , ] ; }
docstring: Convert a single file back into an array.
  
  @param \Psr\Http\Message\UploadedFileInterface $file The file to convert.
  @return array
docstring_tokens: Convert a single file back into an array .