Apply rector rules + fix CS

This commit is contained in:
2023-08-30 14:55:26 +02:00
parent d01172274d
commit 1c0fd57913
26 changed files with 50 additions and 76 deletions

View File

@@ -320,7 +320,7 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface, Grou
return $this->customFieldProvider
->getCustomFieldByType($cf->getType())
->render(json_decode($value, true, 512, JSON_THROW_ON_ERROR), $cf, 'csv');
->render(json_decode((string) $value, true, 512, JSON_THROW_ON_ERROR), $cf, 'csv');
};
if ($cfType instanceof CustomFieldChoice && $cfType->isMultiple($cf)) {
@@ -330,7 +330,7 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface, Grou
if (null === $value) {
return '';
}
$decoded = json_decode($value, true, 512, JSON_THROW_ON_ERROR);
$decoded = json_decode((string) $value, true, 512, JSON_THROW_ON_ERROR);
if ('_header' === $value) {
$label = $cfType->getChoices($cf)[$slugChoice];

View File

@@ -33,7 +33,7 @@ class LabelPersonHelper
return '';
}
$decoded = json_decode($value, null, 512, JSON_THROW_ON_ERROR);
$decoded = json_decode((string) $value, null, 512, JSON_THROW_ON_ERROR);
if (0 === count($decoded)) {
return '';

View File

@@ -103,7 +103,7 @@ final readonly class ListAccompanyingPeriodHelper
return '';
}
return $this->translatableStringHelper->localize(json_decode($value, true, 512, JSON_THROW_ON_ERROR));
return $this->translatableStringHelper->localize(json_decode((string) $value, true, 512, JSON_THROW_ON_ERROR));
},
'locationPersonName', 'requestorPerson' => function ($value) use ($key) {
if ('_header' === $value) {
@@ -140,7 +140,7 @@ final readonly class ListAccompanyingPeriodHelper
'|',
array_map(
fn ($s) => $this->translatableStringHelper->localize($s),
json_decode($value, true, 512, JSON_THROW_ON_ERROR)
json_decode((string) $value, true, 512, JSON_THROW_ON_ERROR)
)
);
},
@@ -157,7 +157,7 @@ final readonly class ListAccompanyingPeriodHelper
'|',
array_map(
fn ($s) => $this->socialIssueRender->renderString($this->socialIssueRepository->find($s), []),
json_decode($value, true, 512, JSON_THROW_ON_ERROR)
json_decode((string) $value, true, 512, JSON_THROW_ON_ERROR)
)
);
},

View File

@@ -332,7 +332,7 @@ class ListPersonHelper
return '';
}
$ids = json_decode($value, null, 512, JSON_THROW_ON_ERROR);
$ids = json_decode((string) $value, null, 512, JSON_THROW_ON_ERROR);
return
implode(