<?php

namespace App\User;

use App\Shared\ValueObject\EmailAddress;

interface UserRepository
{
    public function create(CreateUserDto $dto): User;

    public function findByEmail(EmailAddress $email): ?User;

    /**
     * @return User[]
     */
    public function findByEmailDomain(string $domain): array;

    public function find(int $id): ?User;
}
