original_string: public function replace(UnitOfWork $unitOfWork)
      {
          if (!$this->contains($unitOfWork)) {
              throw new UnitNotPresentException;
          }
  
          $this->unitOfWorkStore[$unitOfWork->getUniqueId()] = $unitOfWork;
      }
code: public function replace(UnitOfWork $unitOfWork)
      {
          if (!$this->contains($unitOfWork)) {
              throw new UnitNotPresentException;
          }
  
          $this->unitOfWorkStore[$unitOfWork->getUniqueId()] = $unitOfWork;
      }
code_tokens: public function replace ( UnitOfWork $ unitOfWork ) { if ( ! $ this -> contains ( $ unitOfWork ) ) { throw new UnitNotPresentException ; } $ this -> unitOfWorkStore [ $ unitOfWork -> getUniqueId ( ) ] = $ unitOfWork ; }
docstring: Replaces with the given unit of work
  
  @param UnitOfWork $unitOfWork The unit of work to replace with
  
  @throws UnitNotPresentException
  
  @return void
docstring_tokens: Replaces with the given unit of work