original_string: public function diff(Repository $otherRepository)
      {
          $diffRepository = new Memory();
  
          foreach ($this->unitOfWorkStore as $unitOfWork) {
              if (!$otherRepository->contains($unitOfWork)) {
                  $diffRepository->add($unitOfWork);
              }
          }
  
          $diffRepository->sort();
  
          return $diffRepository;
      }
code: public function diff(Repository $otherRepository)
      {
          $diffRepository = new Memory();
  
          foreach ($this->unitOfWorkStore as $unitOfWork) {
              if (!$otherRepository->contains($unitOfWork)) {
                  $diffRepository->add($unitOfWork);
              }
          }
  
          $diffRepository->sort();
  
          return $diffRepository;
      }
code_tokens: public function diff ( Repository $ otherRepository ) { $ diffRepository = new Memory ( ) ; foreach ( $ this -> unitOfWorkStore as $ unitOfWork ) { if ( ! $ otherRepository -> contains ( $ unitOfWork ) ) { $ diffRepository -> add ( $ unitOfWork ) ; } } $ diffRepository -> sort ( ) ; return $ diffRepository ; }
docstring: Calculates the diff to the given repository
  
  The method returns a Repository including all Migrations present in this
  instance but not the given other repository.
  
  @param Repository $otherRepository The repository to diff to
  
  @throws \Bytepark\Component\Migration\Exception\UnitIsAlreadyPresentException
  
  @return Repository The diff
docstring_tokens: Calculates the diff to the given repository