original_string: public function resolve($reference, $class)
      {
          $result = $reference;
  
          while ($result instanceof Reference) {
              $result = $result->resolve(function ($data) use($result, $class) {
                  return $this->serializer->denormalize($data, $class, 'json', [
                      'document-origin' => (string) $result->getMergedUri()->withFragment('')
                  ]);
              });
          }
  
          return $result;
      }
code: public function resolve($reference, $class)
      {
          $result = $reference;
  
          while ($result instanceof Reference) {
              $result = $result->resolve(function ($data) use($result, $class) {
                  return $this->serializer->denormalize($data, $class, 'json', [
                      'document-origin' => (string) $result->getMergedUri()->withFragment('')
                  ]);
              });
          }
  
          return $result;
      }
code_tokens: public function resolve ( $ reference , $ class ) { $ result = $ reference ; while ( $ result instanceof Reference ) { $ result = $ result -> resolve ( function ( $ data ) use ( $ result , $ class ) { return $ this -> serializer -> denormalize ( $ data , $ class , 'json' , [ 'document-origin' => ( string ) $ result -> getMergedUri ( ) -> withFragment ( '' ) ] ) ; } ) ; } return $ result ; }
docstring: Resolve a reference with a denormalizer
  
  @param Reference $reference
  @param string    $class
  
  @return mixed
docstring_tokens: Resolve a reference with a denormalizer