original_string: public function add(DocumentInterface $document)
      {
          $this->documents[(string) $document->getIdentity()] = $document;
  
          return $this;
      }
code: public function add(DocumentInterface $document)
      {
          $this->documents[(string) $document->getIdentity()] = $document;
  
          return $this;
      }
code_tokens: public function add ( DocumentInterface $ document ) { $ this -> documents [ ( string ) $ document -> getIdentity ( ) ] = $ document ; return $ this ; }
docstring: Adds a document to the result set.
  
  @param \Phlexible\Bundle\IndexerBundle\Document\DocumentInterface $document
  
  @return $this
docstring_tokens: Adds a document to the result set .