/** * @param $firstEntity * @param $secondEntity * @return bool * @throws \Isolate\UnitOfWork\Exception\InvalidArgumentException */ public function areEqual($firstEntity, $secondEntity) { $firstTarget = ($firstEntity instanceof WrappedObject) ? $firstEntity->getWrappedObject() : $firstEntity; $secondTarget = ($secondEntity instanceof WrappedObject) ? $secondEntity->getWrappedObject() : $secondEntity; return parent::areEqual($firstTarget, $secondTarget); }
/** * @param $entity * @return bool * @throws RuntimeException */ private function isChanged($entity) { return !$this->comparer->areEqual($entity, $this->registry->getSnapshot($entity)); }