From 3a3c76d41888ce4f1b461b262d86fb22c47deca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20PLANCHAT?= Date: Thu, 25 May 2023 09:45:51 +0200 Subject: [PATCH] Update src/WithMultipleOption.php --- src/WithMultipleOption.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WithMultipleOption.php b/src/WithMultipleOption.php index 28168c3..65fe654 100644 --- a/src/WithMultipleOption.php +++ b/src/WithMultipleOption.php @@ -23,8 +23,8 @@ private function compile(string $codes, string $attribute, string $labels, strin (function() { \$linkedData = array_map( function (string \$code) { - \$labels = {$labels}; - } + static \$labels = {$labels}; + return [ 'attribute' => {$attribute}, 'code' => \$code,