original_string: public function scheduleForUpdate($document)
      {
          $oid = spl_object_hash($document);
          if ( ! isset($this->documentIdentifiers[$oid])) {
              throw new \InvalidArgumentException("Document has no identity.");
          }
          if (isset($this->documentDeletions[$oid])) {
              throw new \InvalidArgumentException("Document is removed.");
          }
  
          if ( ! isset($this->documentUpdates[$oid]) && ! isset($this->documentInsertions[$oid]) && ! isset($this->documentUpserts[$oid])) {
              $this->documentUpdates[$oid] = $document;
          }
      }
code: public function scheduleForUpdate($document)
      {
          $oid = spl_object_hash($document);
          if ( ! isset($this->documentIdentifiers[$oid])) {
              throw new \InvalidArgumentException("Document has no identity.");
          }
          if (isset($this->documentDeletions[$oid])) {
              throw new \InvalidArgumentException("Document is removed.");
          }
  
          if ( ! isset($this->documentUpdates[$oid]) && ! isset($this->documentInsertions[$oid]) && ! isset($this->documentUpserts[$oid])) {
              $this->documentUpdates[$oid] = $document;
          }
      }
code_tokens: public function scheduleForUpdate ( $ document ) { $ oid = spl_object_hash ( $ document ) ; if ( ! isset ( $ this -> documentIdentifiers [ $ oid ] ) ) { throw new \ InvalidArgumentException ( "Document has no identity." ) ; } if ( isset ( $ this -> documentDeletions [ $ oid ] ) ) { throw new \ InvalidArgumentException ( "Document is removed." ) ; } if ( ! isset ( $ this -> documentUpdates [ $ oid ] ) && ! isset ( $ this -> documentInsertions [ $ oid ] ) && ! isset ( $ this -> documentUpserts [ $ oid ] ) ) { $ this -> documentUpdates [ $ oid ] = $ document ; } }
docstring: Schedules a document for being updated.
  
  @param object $document The document to schedule for being updated.
  @throws \InvalidArgumentException
docstring_tokens: Schedules a document for being updated .