/** * Checks if images is modified by some other user * * @param ImageInterface $entity * @param string $hash * @throws ImageHashException */ protected function checksum(ImageInterface $entity, $hash) { $currentHash = $this->imageManager->getImageInfo($entity)->getTemporaryImageHash(); if ($hash !== $currentHash) { throw new ImageHashException($entity->getName()); } }