mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
cs: Enable risky rule static_lambda
.
This commit is contained in:
@@ -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 "
|
||||
|
@@ -196,7 +196,7 @@ class CSVListFormatter implements FormatterInterface
|
||||
|
||||
foreach ($keys as $key) {
|
||||
// get an array with all values for this key if possible
|
||||
$values = array_map(function ($v) use ($key) { return $v[$key]; }, $this->result);
|
||||
$values = array_map(static function ($v) use ($key) { return $v[$key]; }, $this->result);
|
||||
// store the label in the labelsCache property
|
||||
$this->labelsCache[$key] = $export->getLabels($key, $values, $this->exportData);
|
||||
}
|
||||
|
@@ -184,7 +184,7 @@ class CSVPivotedListFormatter implements FormatterInterface
|
||||
|
||||
foreach ($keys as $key) {
|
||||
// get an array with all values for this key if possible
|
||||
$values = array_map(function ($v) use ($key) { return $v[$key]; }, $this->result);
|
||||
$values = array_map(static function ($v) use ($key) { return $v[$key]; }, $this->result);
|
||||
// store the label in the labelsCache property
|
||||
$this->labelsCache[$key] = $export->getLabels($key, $values, $this->exportData);
|
||||
}
|
||||
|
@@ -255,7 +255,7 @@ class SpreadsheetListFormatter implements FormatterInterface
|
||||
|
||||
foreach ($keys as $key) {
|
||||
// get an array with all values for this key if possible
|
||||
$values = array_map(function ($v) use ($key) { return $v[$key]; }, $this->result);
|
||||
$values = array_map(static function ($v) use ($key) { return $v[$key]; }, $this->result);
|
||||
// store the label in the labelsCache property
|
||||
$this->labelsCache[$key] = $export->getLabels($key, $values, $this->exportData);
|
||||
}
|
||||
|
Reference in New Issue
Block a user