mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix typing
This commit is contained in:
parent
4e0d8e4def
commit
25f93e8a89
@ -12,7 +12,7 @@ declare(strict_types=1);
|
|||||||
namespace Chill\MainBundle\Templating\Entity;
|
namespace Chill\MainBundle\Templating\Entity;
|
||||||
|
|
||||||
use Chill\MainBundle\Entity\User;
|
use Chill\MainBundle\Entity\User;
|
||||||
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
||||||
use DateTime;
|
use DateTime;
|
||||||
use Monolog\DateTimeImmutable;
|
use Monolog\DateTimeImmutable;
|
||||||
use Symfony\Component\Clock\ClockInterface;
|
use Symfony\Component\Clock\ClockInterface;
|
||||||
@ -34,7 +34,7 @@ class UserRender implements ChillEntityRenderInterface
|
|||||||
];
|
];
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly TranslatableStringHelper $translatableStringHelper,
|
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||||
private readonly \Twig\Environment $engine,
|
private readonly \Twig\Environment $engine,
|
||||||
private readonly TranslatorInterface $translator,
|
private readonly TranslatorInterface $translator,
|
||||||
private readonly ClockInterface $clock,
|
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 LoaderError
|
||||||
* @throws RuntimeError
|
* @throws RuntimeError
|
||||||
@ -54,7 +54,7 @@ class UserRender implements ChillEntityRenderInterface
|
|||||||
|
|
||||||
if (null === $opts['at_date']) {
|
if (null === $opts['at_date']) {
|
||||||
$opts['at_date'] = $this->clock->now();
|
$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']);
|
$opts['at_date'] = DateTimeImmutable::createFromMutable($opts['at_date']);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ class UserRender implements ChillEntityRenderInterface
|
|||||||
|
|
||||||
if (null === $opts['at_date']) {
|
if (null === $opts['at_date']) {
|
||||||
$opts['at_date'] = $this->clock->now();
|
$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']);
|
$opts['at_date'] = DateTimeImmutable::createFromMutable($opts['at_date']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user