From a324121f01046c754ae82b9c2e8ecd47ec347ffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 22:39:00 +0200 Subject: [PATCH] ACP IntensityFilter: Do not loop on choices to show the picked one --- .../Filter/AccompanyingCourseFilters/IntensityFilter.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php index 82468c4ff..b0c2205a0 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php @@ -73,15 +73,9 @@ class IntensityFilter implements FilterInterface public function describeAction($data, $format = 'string'): array { - foreach (self::CHOICES as $k => $v) { - if ($v === $data['accepted_intensities']) { - $choice = $k; - } - } - return [ 'Filtered by intensity: only %intensity%', [ - '%intensity%' => $this->translator->trans($choice), + '%intensity%' => $this->translator->trans($data['accepted_intensities']), ], ]; }