Rx\Functional\Operator\MaterializeTest::materializedNotificationsEqual PHP Метод

materializedNotificationsEqual() публичный Метод

public materializedNotificationsEqual ( Rx\Notification $a, Rx\Notification $b )
$a Rx\Notification
$b Rx\Notification
    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);
    }