public function diff(Repository $otherRepository)
    {
        $diffRepository = new Memory();

        foreach ($this->unitOfWorkStore as $unitOfWork) {
            if (!$otherRepository->contains($unitOfWork)) {
                $diffRepository->add($unitOfWork);
            }
        }

        $diffRepository->sort();

        return $diffRepository;
    }
public function diff(Repository $otherRepository)
    {
        $diffRepository = new Memory();

        foreach ($this->unitOfWorkStore as $unitOfWork) {
            if (!$otherRepository->contains($unitOfWork)) {
                $diffRepository->add($unitOfWork);
            }
        }

        $diffRepository->sort();

        return $diffRepository;
    }
public function diff ( Repository $ otherRepository ) { $ diffRepository = new Memory ( ) ; foreach ( $ this -> unitOfWorkStore as $ unitOfWork ) { if ( ! $ otherRepository -> contains ( $ unitOfWork ) ) { $ diffRepository -> add ( $ unitOfWork ) ; } } $ diffRepository -> sort ( ) ; return $ diffRepository ; }
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
Calculates the diff to the given repository