fix typing

This commit is contained in:
Julie Lenaerts 2024-02-12 18:55:00 +01:00
parent 4e0d8e4def
commit 25f93e8a89

View File

@ -12,7 +12,7 @@ declare(strict_types=1);
namespace Chill\MainBundle\Templating\Entity;
use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Templating\TranslatableStringHelper;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use DateTime;
use Monolog\DateTimeImmutable;
use Symfony\Component\Clock\ClockInterface;
@ -34,7 +34,7 @@ class UserRender implements ChillEntityRenderInterface
];
public function __construct(
private readonly TranslatableStringHelper $translatableStringHelper,
private readonly TranslatableStringHelperInterface $translatableStringHelper,
private readonly \Twig\Environment $engine,
private readonly TranslatorInterface $translator,
private readonly ClockInterface $clock,
@ -42,7 +42,7 @@ class UserRender implements ChillEntityRenderInterface
}
/**
* @param array{main_scope?: bool, user_job?: bool, absence?: bool, at_date?: DateTimeImmutable|\DateTime|null} $options
* @param array{main_scope?: bool, user_job?: bool, absence?: bool, at_date?: DateTimeImmutable|DateTime|null} $options
*
* @throws LoaderError
* @throws RuntimeError
@ -54,7 +54,7 @@ class UserRender implements ChillEntityRenderInterface
if (null === $opts['at_date']) {
$opts['at_date'] = $this->clock->now();
} elseif ($opts['at_date'] instanceof \DateTime) {
} elseif ($opts['at_date'] instanceof DateTime) {
$opts['at_date'] = DateTimeImmutable::createFromMutable($opts['at_date']);
}
@ -75,7 +75,7 @@ class UserRender implements ChillEntityRenderInterface
if (null === $opts['at_date']) {
$opts['at_date'] = $this->clock->now();
} elseif ($opts['at_date'] instanceof \DateTime) {
} elseif ($opts['at_date'] instanceof DateTime) {
$opts['at_date'] = DateTimeImmutable::createFromMutable($opts['at_date']);
}