<?php

namespace Snaju\Inception\Event\Types;

use Snaju\Inception\Event\Event;
use Snaju\Inception\Notification\Notification;

// TODO: add docs
class OnNotifyEvent extends Event
{
    private Notification $notification;

    private $handler;

    public function __construct($notification, $handler = null)
    {
        $this->notification = $notification;
        $this->handler = $handler;
    }

    public function run(Event $event): Event
    {
        return $event;
    }

    public function onEnd(Event $event)
    {
        return parent::onEnd($event); // TODO: Change the autogenerated stub
    }

    public function getNotification(): Notification
    {
        return $this->notification;
    }

    public function getHandler()
    {
        return $this->handler;
    }

}