/**
  * {@inheritDoc}
  */
 public function compareState(SnapshotInterface $snapshot)
 {
     $state = $snapshot->getState();
     if (!is_array($state)) {
         throw new \UnexpectedValueException(__CLASS__ . ' can only handle array-serialized state');
     }
     $objectState = (array) $snapshot->getObject();
     $snapshotState = $snapshot->getState();
     if ($objectState === $snapshotState) {
         return null;
     }
     return array_diff($objectState, $snapshotState);
 }