From a618334d2ac55eed1064908231b1cdd74e6df9c8 Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Mon, 22 Apr 2024 17:49:12 +0200 Subject: [PATCH] Refactor to arrow function --- src/Format.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Format.php b/src/Format.php index 44014288..b8b8b8f2 100644 --- a/src/Format.php +++ b/src/Format.php @@ -119,9 +119,7 @@ public function encoder(mixed ...$options): EncoderInterface } // filter only allowed options - $options = array_filter($options, function ($key) use ($parameters) { - return in_array($key, $parameters); - }, ARRAY_FILTER_USE_KEY); + $options = array_filter($options, fn ($key) => in_array($key, $parameters), ARRAY_FILTER_USE_KEY); return new $classname(...$options); }