mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 11:33:49 +00:00
DX: rector rules upt to PHP 74
This commit is contained in:
@@ -134,9 +134,7 @@ class ActivityContext implements
|
||||
$builder->add($key, EntityType::class, [
|
||||
'class' => Person::class,
|
||||
'choices' => $persons,
|
||||
'choice_label' => function (Person $p) {
|
||||
return $this->personRender->renderString($p, []);
|
||||
},
|
||||
'choice_label' => fn(Person $p) => $this->personRender->renderString($p, []),
|
||||
'multiple' => false,
|
||||
'required' => false,
|
||||
'expanded' => true,
|
||||
|
@@ -146,9 +146,7 @@ class ListActivitiesByAccompanyingPeriodContext implements
|
||||
return array_filter(
|
||||
$activities,
|
||||
function ($activity) use ($user) {
|
||||
$activityUsernames = array_map(static function ($user) {
|
||||
return $user['username'];
|
||||
}, $activity['users'] ?? []);
|
||||
$activityUsernames = array_map(static fn($user) => $user['username'], $activity['users'] ?? []);
|
||||
return in_array($user->getUsername(), $activityUsernames, true);
|
||||
}
|
||||
);
|
||||
@@ -159,9 +157,7 @@ class ListActivitiesByAccompanyingPeriodContext implements
|
||||
return array_filter(
|
||||
$works,
|
||||
function ($work) use ($user) {
|
||||
$workUsernames = array_map(static function ($user) {
|
||||
return $user['username'];
|
||||
}, $work['referrers'] ?? []);
|
||||
$workUsernames = array_map(static fn($user) => $user['username'], $work['referrers'] ?? []);
|
||||
|
||||
return in_array($user->getUsername(), $workUsernames, true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user