mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 19:43:49 +00:00
DX: rector rules upt to PHP 74
This commit is contained in:
@@ -199,9 +199,7 @@ class CSVListFormatter implements FormatterInterface
|
||||
|
||||
foreach ($keys as $key) {
|
||||
// get an array with all values for this key if possible
|
||||
$values = array_map(static function ($v) use ($key) {
|
||||
return $v[$key];
|
||||
}, $this->result);
|
||||
$values = array_map(static fn($v) => $v[$key], $this->result);
|
||||
// store the label in the labelsCache property
|
||||
$this->labelsCache[$key] = $export->getLabels($key, $values, $this->exportData);
|
||||
}
|
||||
|
@@ -187,9 +187,7 @@ class CSVPivotedListFormatter implements FormatterInterface
|
||||
|
||||
foreach ($keys as $key) {
|
||||
// get an array with all values for this key if possible
|
||||
$values = array_map(static function ($v) use ($key) {
|
||||
return $v[$key];
|
||||
}, $this->result);
|
||||
$values = array_map(static fn($v) => $v[$key], $this->result);
|
||||
// store the label in the labelsCache property
|
||||
$this->labelsCache[$key] = $export->getLabels($key, $values, $this->exportData);
|
||||
}
|
||||
|
@@ -445,7 +445,7 @@ class SpreadSheetFormatter implements FormatterInterface
|
||||
$this->initializeCache($key);
|
||||
}
|
||||
|
||||
$value = $value ?? '';
|
||||
$value ??= '';
|
||||
|
||||
return call_user_func($this->cacheDisplayableResult[$key], $value);
|
||||
}
|
||||
|
@@ -249,7 +249,7 @@ class ExportAddressHelper
|
||||
if (($params & $bitmask) === $bitmask) {
|
||||
if ('geographical_units' === $key) {
|
||||
// geographical unit generate keys dynamically, depending on layers
|
||||
$prefixes = array_merge($prefixes, array_keys($this->generateKeysForUnitsNames($prefix)), array_keys($this->generateKeysForUnitsRefs($prefix)));
|
||||
$prefixes = [...$prefixes, ...array_keys($this->generateKeysForUnitsNames($prefix)), ...array_keys($this->generateKeysForUnitsRefs($prefix))];
|
||||
|
||||
continue;
|
||||
}
|
||||
@@ -257,9 +257,7 @@ class ExportAddressHelper
|
||||
$prefixes = array_merge(
|
||||
$prefixes,
|
||||
array_map(
|
||||
static function ($item) use ($prefix) {
|
||||
return $prefix . $item;
|
||||
},
|
||||
static fn($item) => $prefix . $item,
|
||||
self::COLUMN_MAPPING[$key]
|
||||
)
|
||||
);
|
||||
|
Reference in New Issue
Block a user