Convert Rolling date using the clock instead of the built-in pivot date

This commit is contained in:
Julien Fastré 2025-04-03 17:47:08 +02:00
parent 10f66afdcd
commit 128d365a72
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
2 changed files with 2 additions and 7 deletions

View File

@ -15,11 +15,7 @@ use Symfony\Component\Clock\ClockInterface;
final readonly class RollingDateConverter implements RollingDateConverterInterface
{
function __construct(private readonly ClockInterface $clock)
{
}
public function __construct(private readonly ClockInterface $clock) {}
public function convert(?RollingDate $rollingDate): ?\DateTimeImmutable
{

View File

@ -42,5 +42,4 @@ class RollingDateTest extends TestCase
self::assertEquals($fixed, $actual->getFixedDate());
self::assertEquals($date->getPivotDate()?->getTimestamp(), $actual->getPivotDate()?->getTimestamp());
}
}