<?php
declare(strict_types=1);

namespace App\Mailer;

final class NullMailer implements MailerInterface
{
    /**
     * @var list<EmailMessage>
     */
    private array $messages = [];

    public function send(EmailMessage $message): void
    {
        $this->messages[] = $message;
    }

    /**
     * @return list<EmailMessage>
     */
    public function messages(): array
    {
        return $this->messages;
    }
}
