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

@@ -158,9 +158,7 @@ class PermissionsGroupController extends AbstractController
'edit_form' => $editForm->createView(),
'role_scopes_sorted' => $roleScopesSorted,
'expanded_roles' => $this->getExpandedRoles($permissionsGroup->getRoleScopes()->toArray()),
'delete_role_scopes_form' => array_map(static function ($form) {
return $form->createView();
}, $deleteRoleScopesForm),
'delete_role_scopes_form' => array_map(static fn($form) => $form->createView(), $deleteRoleScopesForm),
'add_role_scopes_form' => $addRoleScopesForm->createView(),
]);
}
@@ -305,9 +303,7 @@ class PermissionsGroupController extends AbstractController
'role_scopes_sorted' => $roleScopesSorted,
'edit_form' => $editForm->createView(),
'expanded_roles' => $this->getExpandedRoles($permissionsGroup->getRoleScopes()->toArray()),
'delete_role_scopes_form' => array_map(static function ($form) {
return $form->createView();
}, $deleteRoleScopesForm),
'delete_role_scopes_form' => array_map(static fn($form) => $form->createView(), $deleteRoleScopesForm),
'add_role_scopes_form' => $addRoleScopesForm->createView(),
]);
}
@@ -449,9 +445,7 @@ class PermissionsGroupController extends AbstractController
'role_scopes_sorted' => $roleScopesSorted,
'edit_form' => $editForm->createView(),
'expanded_roles' => $this->getExpandedRoles($permissionsGroup->getRoleScopes()->toArray()),
'delete_role_scopes_form' => array_map(static function ($form) {
return $form->createView();
}, $deleteRoleScopesForm),
'delete_role_scopes_form' => array_map(static fn($form) => $form->createView(), $deleteRoleScopesForm),
'add_role_scopes_form' => $addRoleScopesForm->createView(),
]);
}
@@ -573,9 +567,7 @@ class PermissionsGroupController extends AbstractController
if (!array_key_exists($roleScope->getRole(), $expandedRoles)) {
$expandedRoles[$roleScope->getRole()] =
array_map(
static function (Role $role) {
return $role->getRole();
},
static fn(Role $role) => $role->getRole(),
$this->roleHierarchy
->getReachableRoles(
[new Role($roleScope->getRole())]