mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 03:23:48 +00:00
cs: Enable risky rule static_lambda
.
This commit is contained in:
@@ -296,7 +296,7 @@ final class SingleTaskController extends AbstractController
|
||||
$filterOrder = $this->buildFilterOrder();
|
||||
$flags = array_merge(
|
||||
$filterOrder->getCheckboxData('status'),
|
||||
array_map(fn ($i) => 'state_' . $i, $filterOrder->getCheckboxData('states'))
|
||||
array_map(static fn ($i) => 'state_' . $i, $filterOrder->getCheckboxData('states'))
|
||||
);
|
||||
$nb = $this->singleTaskAclAwareRepository->countByAllViewable(
|
||||
$filterOrder->getQueryString(),
|
||||
@@ -341,7 +341,7 @@ final class SingleTaskController extends AbstractController
|
||||
$filterOrder = $this->buildFilterOrder();
|
||||
$flags = array_merge(
|
||||
$filterOrder->getCheckboxData('status'),
|
||||
array_map(fn ($i) => 'state_' . $i, $filterOrder->getCheckboxData('states'))
|
||||
array_map(static fn ($i) => 'state_' . $i, $filterOrder->getCheckboxData('states'))
|
||||
);
|
||||
$nb = $this->singleTaskAclAwareRepository->countByCourse(
|
||||
$course,
|
||||
@@ -390,7 +390,7 @@ final class SingleTaskController extends AbstractController
|
||||
$filterOrder = $this->buildFilterOrder();
|
||||
$flags = array_merge(
|
||||
$filterOrder->getCheckboxData('status'),
|
||||
array_map(fn ($i) => 'state_' . $i, $filterOrder->getCheckboxData('states'))
|
||||
array_map(static fn ($i) => 'state_' . $i, $filterOrder->getCheckboxData('states'))
|
||||
);
|
||||
$nb = $this->singleTaskAclAwareRepository->countByPerson(
|
||||
$person,
|
||||
@@ -440,7 +440,7 @@ final class SingleTaskController extends AbstractController
|
||||
$filterOrder = $this->buildFilterOrder();
|
||||
$flags = array_merge(
|
||||
$filterOrder->getCheckboxData('status'),
|
||||
array_map(fn ($i) => 'state_' . $i, $filterOrder->getCheckboxData('states'))
|
||||
array_map(static fn ($i) => 'state_' . $i, $filterOrder->getCheckboxData('states'))
|
||||
);
|
||||
$nb = $this->singleTaskAclAwareRepository->countByCurrentUsersTasks(
|
||||
$filterOrder->getQueryString(),
|
||||
|
@@ -91,7 +91,7 @@ class TaskController extends AbstractController
|
||||
$transitionInstance = array_values( // array_values needed to reset keys (array_filter preserves keys)
|
||||
array_filter(
|
||||
$workflow->getEnabledTransitions($task),
|
||||
function (Transition $t) use ($transition) {
|
||||
static function (Transition $t) use ($transition) {
|
||||
return $t->getName() === $transition;
|
||||
}
|
||||
))[0];
|
||||
|
@@ -215,9 +215,9 @@ class SingleTaskListType extends AbstractType
|
||||
$users = $this->getUsersAssigneedToTask($options);
|
||||
$choices = array_combine(
|
||||
// get usernames
|
||||
array_map(function (User $user) { return $user->getUsername(); }, $users),
|
||||
array_map(static function (User $user) { return $user->getUsername(); }, $users),
|
||||
// get ids
|
||||
array_map(function (User $user) { return $user->getId(); }, $users)
|
||||
array_map(static function (User $user) { return $user->getId(); }, $users)
|
||||
);
|
||||
$choices['Unassigned'] = '_unassigned';
|
||||
|
||||
|
@@ -90,7 +90,7 @@ class SingleTaskControllerTest extends WebTestCase
|
||||
|
||||
$center = array_filter(
|
||||
$centers,
|
||||
function (Center $c) use ($centerName) {
|
||||
static function (Center $c) use ($centerName) {
|
||||
return $c->getName() === $centerName;
|
||||
}
|
||||
)[0];
|
||||
|
@@ -83,7 +83,7 @@ class SingleTaskTaskLifeCycleEventTimelineProvider implements TimelineProviderIn
|
||||
->findBy(['id' => $ids]);
|
||||
|
||||
return array_combine(
|
||||
array_map(function ($e) { return $e->getId(); }, $events),
|
||||
array_map(static function ($e) { return $e->getId(); }, $events),
|
||||
$events
|
||||
);
|
||||
}
|
||||
|
@@ -94,7 +94,7 @@ class TaskLifeCycleEventTimelineProvider implements TimelineProviderInterface
|
||||
->findBy(['id' => $ids]);
|
||||
|
||||
return array_combine(
|
||||
array_map(function ($e) { return $e->getId(); }, $events),
|
||||
array_map(static function ($e) { return $e->getId(); }, $events),
|
||||
$events
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user