original_string: protected function updateIdentityMap(EntityCollection $collection)
      {
          if ($collection->isEmpty()) {
              return $this;
          }
  
          foreach ($collection as $entity)
          {
              $this->repository->getIdentityMap()->set($entity);
          }
          return $this;
      }
code: protected function updateIdentityMap(EntityCollection $collection)
      {
          if ($collection->isEmpty()) {
              return $this;
          }
  
          foreach ($collection as $entity)
          {
              $this->repository->getIdentityMap()->set($entity);
          }
          return $this;
      }
code_tokens: protected function updateIdentityMap ( EntityCollection $ collection ) { if ( $ collection -> isEmpty ( ) ) { return $ this ; } foreach ( $ collection as $ entity ) { $ this -> repository -> getIdentityMap ( ) -> set ( $ entity ) ; } return $ this ; }
docstring: Registers every entity in collection to the repository identity map
  
  @param EntityCollection $collection
  
  @return self
docstring_tokens: Registers every entity in collection to the repository identity map