cs: Enable risky rule static_lambda.

This commit is contained in:
Pol Dellaiera
2021-11-30 11:43:34 +01:00
parent a9188355c5
commit 91d12c4a96
111 changed files with 212 additions and 212 deletions

View File

@@ -366,8 +366,8 @@ class ActivityControllerTest extends WebTestCase
$center
);
$reachableScopesId = array_intersect(
array_map(function ($s) { return $s->getId(); }, $reachableScopesDelete),
array_map(function ($s) { return $s->getId(); }, $reachableScopesUpdate)
array_map(static function ($s) { return $s->getId(); }, $reachableScopesDelete),
array_map(static function ($s) { return $s->getId(); }, $reachableScopesUpdate)
);
if (count($reachableScopesId) === 0) {

View File

@@ -186,7 +186,7 @@ class ActivityTypeTest extends KernelTestCase
// map all the values in an array
$values = array_map(
function ($choice) { return $choice->value; },
static function ($choice) { return $choice->value; },
$view['activity']['durationTime']->vars['choices']
);

View File

@@ -81,7 +81,7 @@ class TranslatableActivityReasonTest extends TypeTestCase
$request->getLocale()->willReturn($fallbackLocale);
$requestStack->willExtend('Symfony\Component\HttpFoundation\RequestStack');
$requestStack->getCurrentRequest()->will(function () use ($request) {
$requestStack->getCurrentRequest()->will(static function () use ($request) {
return $request;
});