DX: fix cs

This commit is contained in:
2023-04-15 00:43:55 +02:00
parent 80647147ee
commit 746ed4f5e5
188 changed files with 309 additions and 308 deletions

View File

@@ -331,7 +331,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
$centers = array_map(static fn($el) => $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)) {
@@ -503,7 +503,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface
private function getCustomFields()
{
return array_filter($this->customfieldsGroup
->getCustomFields()->toArray(), static fn(CustomField $cf) => $cf->getType() !== 'title');
->getCustomFields()->toArray(), static fn (CustomField $cf) => $cf->getType() !== 'title');
}
private function getLabelForCustomField($key, array $values, $data)

View File

@@ -97,7 +97,7 @@ class ReportSearch extends AbstractSearch implements ContainerAwareInterface
foreach ($reachableCenters as $center) {
$reachableScopesId = array_map(
static fn(Scope $scope) => $scope->getId(),
static fn (Scope $scope) => $scope->getId(),
$this->helper->getReachableScopes($this->user, $role, $center)
);
$whereElement->add(

View File

@@ -68,7 +68,7 @@ final class ReportControllerNextTest extends WebTestCase
//filter customFieldsGroup to get only "situation de logement"
$filteredCustomFieldsGroupHouse = array_filter(
$customFieldsGroups,
static fn(CustomFieldsGroup $group) => in_array('Situation de logement', $group->getName(), true)
static fn (CustomFieldsGroup $group) => in_array('Situation de logement', $group->getName(), true)
);
$this->group = $filteredCustomFieldsGroupHouse[0];
}

View File

@@ -86,7 +86,7 @@ final class ReportControllerTest extends WebTestCase
//filter customFieldsGroup to get only "situation de logement"
$filteredCustomFieldsGroupHouse = array_filter(
$customFieldsGroups,
static fn(CustomFieldsGroup $group) => in_array('Situation de logement', $group->getName(), true)
static fn (CustomFieldsGroup $group) => in_array('Situation de logement', $group->getName(), true)
);
self::$group = $filteredCustomFieldsGroupHouse[0];

View File

@@ -67,7 +67,7 @@ final class TimelineProviderTest extends WebTestCase
self::$em
->getRepository(\Chill\MainBundle\Entity\Scope::class)
->findAll(),
static fn(Scope $scope) => $scope->getName()['en'] === 'social'
static fn (Scope $scope) => $scope->getName()['en'] === 'social'
);
$report = (new Report())