apply rules rector up to php82

This commit is contained in:
2023-05-01 21:39:45 +02:00
parent 81e8928344
commit 6d63177ff4
733 changed files with 1257 additions and 1322 deletions

View File

@@ -25,7 +25,7 @@ use function strtr;
*/
class AddressRender implements ChillEntityRenderInterface
{
public const DEFAULT_OPTIONS = [
final public const DEFAULT_OPTIONS = [
'with_valid_from' => false,
'with_valid_to' => false,
'with_picto' => false,
@@ -36,7 +36,7 @@ class AddressRender implements ChillEntityRenderInterface
'extended_infos' => false,
];
public function __construct(private EngineInterface $templating, private TranslatableStringHelperInterface $translatableStringHelper)
public function __construct(private readonly EngineInterface $templating, private readonly TranslatableStringHelperInterface $translatableStringHelper)
{
}

View File

@@ -44,10 +44,10 @@ class ChillEntityRenderExtension extends AbstractExtension
public function getFilters()
{
return [
new TwigFilter('chill_entity_render_string', [$this, 'renderString'], [
new TwigFilter('chill_entity_render_string', $this->renderString(...), [
'is_safe' => ['html'],
]),
new TwigFilter('chill_entity_render_box', [$this, 'renderBox'], [
new TwigFilter('chill_entity_render_box', $this->renderBox(...), [
'is_safe' => ['html'],
]),
];

View File

@@ -25,7 +25,7 @@ class CommentRender implements ChillEntityRenderInterface
{
use BoxUtilsChillEntityRenderTrait;
public function __construct(private UserRepositoryInterface $userRepository, private EngineInterface $engine)
public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly EngineInterface $engine)
{
}

View File

@@ -24,13 +24,13 @@ use function array_merge;
*/
class UserRender implements ChillEntityRenderInterface
{
public const DEFAULT_OPTIONS = [
final public const DEFAULT_OPTIONS = [
'main_scope' => true,
'user_job' => true,
'absence' => true,
];
public function __construct(private TranslatableStringHelper $translatableStringHelper, private EngineInterface $engine, private TranslatorInterface $translator)
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly EngineInterface $engine, private readonly TranslatorInterface $translator)
{
}