<?php

declare(strict_types=1);

namespace App\Service\Matricule;

final class MatriculeGenerator
{
    public function preview(string $prefix, int $sequence, ?\DateTimeInterface $date = null): string
    {
        $date ??= new \DateTimeImmutable();

        return sprintf('%s%s%03d', $date->format('y'), strtoupper($prefix), $sequence);
    }
}
