DX: rector rules upt to PHP 74

This commit is contained in:
2023-04-15 00:20:19 +02:00
parent a68190f0c6
commit 858ade467c
213 changed files with 433 additions and 1052 deletions

View File

@@ -306,7 +306,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface
}
// add the key from slugs and return
return array_merge($fields, array_keys($this->slugs));
return [...$fields, ...array_keys($this->slugs)];
}
public function getResult($query, $data)
@@ -331,9 +331,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
$centers = array_map(static function ($el) {
return $el['center'];
}, $acl);
$centers = array_map(static fn($el) => $el['center'], $acl);
// throw an error if any fields are present
if (!array_key_exists('fields', $data)) {
@@ -505,9 +503,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface
private function getCustomFields()
{
return array_filter($this->customfieldsGroup
->getCustomFields()->toArray(), static function (CustomField $cf) {
return $cf->getType() !== 'title';
});
->getCustomFields()->toArray(), static fn(CustomField $cf) => $cf->getType() !== 'title');
}
private function getLabelForCustomField($key, array $values, $data)