mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fix bug and remove obsolete issue.
This commit is contained in:
parent
5615734123
commit
a1b381a3ea
@ -45,11 +45,6 @@ parameters:
|
||||
count: 3
|
||||
path: src/Bundle/ChillActivityBundle/Entity/ActivityType.php
|
||||
|
||||
-
|
||||
message: "#^Anonymous function has an unused use \\$data\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
|
@ -105,12 +105,12 @@ class ActivityTypeAggregator implements AggregatorInterface
|
||||
return new Role(ActivityStatsVoter::STATS);
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): \Closure
|
||||
{
|
||||
// for performance reason, we load data from db only once
|
||||
$this->typeRepository->findBy(array('id' => $values));
|
||||
|
||||
return function($value) use ($data) {
|
||||
return function($value): string {
|
||||
if ($value === '_header') {
|
||||
return 'Activity type';
|
||||
}
|
||||
@ -120,12 +120,11 @@ class ActivityTypeAggregator implements AggregatorInterface
|
||||
|
||||
return $this->stringHelper->localize($t->getName());
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
public function getQueryKeys($data)
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return array(self::KEY);
|
||||
return [self::KEY];
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user