DX: apply rector rulesets up to PHP 73

This commit is contained in:
2023-03-29 22:39:11 +02:00
parent b9a7530f7a
commit 4c5dae60a8
37 changed files with 129 additions and 131 deletions

View File

@@ -182,7 +182,7 @@ class ListAccompanyingPeriod implements ListInterface, GroupedExportInterface
return '';
}
return $this->translatableStringHelper->localize(json_decode($value, true));
return $this->translatableStringHelper->localize(json_decode($value, true, 512, JSON_THROW_ON_ERROR));
};
case 'locationPersonName':
@@ -226,7 +226,7 @@ class ListAccompanyingPeriod implements ListInterface, GroupedExportInterface
'|',
array_map(
fn ($s) => $this->translatableStringHelper->localize($s),
json_decode($value, true)
json_decode($value, true, 512, JSON_THROW_ON_ERROR)
)
);
};
@@ -245,7 +245,7 @@ class ListAccompanyingPeriod implements ListInterface, GroupedExportInterface
'|',
array_map(
fn ($s) => $this->socialIssueRender->renderString($this->socialIssueRepository->find($s), []),
json_decode($value, true)
json_decode($value, true, 512, JSON_THROW_ON_ERROR)
)
);
};

View File

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

View File

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

View File

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