public function materializedNotificationsEqual(Notification $a, Notification $b)
{
$aValue = $this->getNotificationValue($a);
$bValue = $this->getNotificationValue($b);
if (get_class($aValue) !== get_class($bValue)) {
return false;
}
if (!$aValue instanceof Notification) {
return false;
}
if ($aValue instanceof OnCompletedNotification) {
return true;
}
return $this->getNotificationValue($aValue) === $this->getNotificationValue($bValue);
}