mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 23:04:58 +00:00
apply rules rector up to php82
This commit is contained in:
@@ -26,7 +26,7 @@ class UserNormalizer implements ContextAwareNormalizerInterface, NormalizerAware
|
||||
{
|
||||
use NormalizerAwareTrait;
|
||||
|
||||
public const NULL_USER = [
|
||||
final public const NULL_USER = [
|
||||
'type' => 'user',
|
||||
'id' => '',
|
||||
'username' => '',
|
||||
@@ -36,7 +36,7 @@ class UserNormalizer implements ContextAwareNormalizerInterface, NormalizerAware
|
||||
'email' => '',
|
||||
];
|
||||
|
||||
public function __construct(private UserRender $userRender)
|
||||
public function __construct(private readonly UserRender $userRender)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -65,14 +65,7 @@ class UserNormalizer implements ContextAwareNormalizerInterface, NormalizerAware
|
||||
);
|
||||
|
||||
if (null === $object && 'docgen' === $format) {
|
||||
return array_merge(self::NULL_USER, [
|
||||
'civility' => $this->normalizer->normalize(null, $format, $civilityContext),
|
||||
'user_job' => $this->normalizer->normalize(null, $format, $userJobContext),
|
||||
'main_center' => $this->normalizer->normalize(null, $format, $centerContext),
|
||||
'main_scope' => $this->normalizer->normalize(null, $format, $scopeContext),
|
||||
'current_location' => $this->normalizer->normalize(null, $format, $locationContext),
|
||||
'main_location' => $this->normalizer->normalize(null, $format, $locationContext),
|
||||
]);
|
||||
return [...self::NULL_USER, 'civility' => $this->normalizer->normalize(null, $format, $civilityContext), 'user_job' => $this->normalizer->normalize(null, $format, $userJobContext), 'main_center' => $this->normalizer->normalize(null, $format, $centerContext), 'main_scope' => $this->normalizer->normalize(null, $format, $scopeContext), 'current_location' => $this->normalizer->normalize(null, $format, $locationContext), 'main_location' => $this->normalizer->normalize(null, $format, $locationContext)];
|
||||
}
|
||||
|
||||
$data = [
|
||||
|
Reference in New Issue
Block a user