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

@@ -168,7 +168,7 @@ class CSVFormatter implements FormatterInterface
// gather data in an array
foreach ($keys as $key) {
$values = array_map(function ($row) use ($key, $alias) {
$values = array_map(static function ($row) use ($key, $alias) {
if (!array_key_exists($key, $row)) {
throw new LogicException("the key '" . $key . "' is declared by "
. "the aggregator with alias '" . $alias . "' but is not "
@@ -195,7 +195,7 @@ class CSVFormatter implements FormatterInterface
$keys = $this->export->getQueryKeys($this->exportData);
foreach ($keys as $key) {
$values = array_map(function ($row) use ($key, $export) {
$values = array_map(static function ($row) use ($key, $export) {
if (!array_key_exists($key, $row)) {
throw new LogicException("the key '" . $key . "' is declared by "
. "the export with title '" . $export->getTitle() . "' but is not "