original_string: public function refresh($document)
      {
          if (!is_object($document)) {
              throw new \InvalidArgumentException(gettype($document));
          }
          $this->errorIfClosed();
          $this->unitOfWork->refresh($document);
      }
code: public function refresh($document)
      {
          if (!is_object($document)) {
              throw new \InvalidArgumentException(gettype($document));
          }
          $this->errorIfClosed();
          $this->unitOfWork->refresh($document);
      }
code_tokens: public function refresh ( $ document ) { if ( ! is_object ( $ document ) ) { throw new \ InvalidArgumentException ( gettype ( $ document ) ) ; } $ this -> errorIfClosed ( ) ; $ this -> unitOfWork -> refresh ( $ document ) ; }
docstring: Refreshes the persistent state of a document from the database,
  overriding any local changes that have not yet been persisted.
  
  @param object $document The document to refresh.
  
  @throws \InvalidArgumentException When the given $document param is not an object
docstring_tokens: Refreshes the persistent state of a document from the database overriding any local changes that have not yet been persisted .