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); }