mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-25 00:53:48 +00:00
Apply rector rules + fix CS
This commit is contained in:
@@ -81,7 +81,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface
|
||||
'label' => 'Fields to include in export',
|
||||
'choice_attr' => static function ($val, $key, $index) {
|
||||
// add a 'data-display-target' for address fields
|
||||
if (str_starts_with($val, 'address_')) {
|
||||
if (str_starts_with((string) $val, 'address_')) {
|
||||
return ['data-display-target' => 'address_date'];
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface
|
||||
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));
|
||||
};
|
||||
|
||||
default:
|
||||
@@ -488,13 +488,13 @@ class ReportList implements ExportElementValidatedInterface, ListInterface
|
||||
|
||||
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)) {
|
||||
return function ($value) use ($cf, $cfType, $key) {
|
||||
$slugChoice = $this->extractInfosFromSlug($key)['additionnalInfos']['choiceSlug'];
|
||||
$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];
|
||||
|
Reference in New Issue
Block a user