src/Controller/Plugin/EntitySnapshot.php
public function diff($entity)
    {
        if ($entity instanceof SnapshotGeneratorProviderInterface) {
            $this->entity = $entity;
            $generator = $this->getGenerator();
            $targetClass = $this->getTarget(false);
            $dataHead = $generator->getSnapshot();
            if (empty($dataHead) || empty($targetClass)) {
                return null;
            }
            $repositorySnapshotMeta = $this->getRepositories()->getRepository($targetClass . "Meta");
            $snapshot = $repositorySnapshotMeta->findSnapshot($this->entity);
            // an snapshot has to be so simple that there is no need for a special hydrator
            $hydrator = new EntityHydrator();
            $dataLast = $hydrator->extract($snapshot);
            if (empty($dataLast)) {
                // there is no Snapshot, but returning an empty array would make a wrong conclusion,
                // that there is a snapshot, and it has no differences.
                // actually, if there is a snapshot, it always differ (dateCreated)
                return null;
            }
            return $this->array_compare($dataLast, $dataHead);
        } else {
            // entity is not an implementation of SnapshotGeneratorProviderInterface
        }
        return $this;
    }
public function diff($entity)
    {
        if ($entity instanceof SnapshotGeneratorProviderInterface) {
            $this->entity = $entity;
            $generator = $this->getGenerator();
            $targetClass = $this->getTarget(false);
            $dataHead = $generator->getSnapshot();
            if (empty($dataHead) || empty($targetClass)) {
                return null;
            }
            $repositorySnapshotMeta = $this->getRepositories()->getRepository($targetClass . "Meta");
            $snapshot = $repositorySnapshotMeta->findSnapshot($this->entity);
            // an snapshot has to be so simple that there is no need for a special hydrator
            $hydrator = new EntityHydrator();
            $dataLast = $hydrator->extract($snapshot);
            if (empty($dataLast)) {
                // there is no Snapshot, but returning an empty array would make a wrong conclusion,
                // that there is a snapshot, and it has no differences.
                // actually, if there is a snapshot, it always differ (dateCreated)
                return null;
            }
            return $this->array_compare($dataLast, $dataHead);
        } else {
            // entity is not an implementation of SnapshotGeneratorProviderInterface
        }
        return $this;
    }
shows the differences between the last snapshot and the given entity
return Null = there is no snapshot
return array() = there is a snapshot but no difference

@param $entity
@return array|null