<?php

declare(strict_types=1);

namespace KupShop\UserBundle\Event;

use Symfony\Contracts\EventDispatcher\Event;

class UserRegisteredEvent extends Event
{
    private \User $user;

    private string $method;

    public function __construct(\User $user, string $method = 'web')
    {
        $this->user = $user;
        $this->method = $method;
    }

    public function getUser(): \User
    {
        return $this->user;
    }

    public function getMethod(): string
    {
        return $this->method;
    }
}
