<?php

namespace Tests\Fakes;

use App\Auth\Clock;
use DateTimeImmutable;

class FakeClock implements Clock
{
    public function __construct(private DateTimeImmutable $currentTime)
    {
    }

    public function now(): DateTimeImmutable
    {
        return $this->currentTime;
    }

    public function setTime(DateTimeImmutable $newTime): void
    {
        $this->currentTime = $newTime;
    }
}
