From 438757217861be80e99c8648b3f4e57d207f4198 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Sun, 8 Aug 2021 15:40:18 +0200 Subject: [PATCH] Remove mixed strict type for data as it may be array or string Improve doc --- Util/SluggerUtil.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Util/SluggerUtil.php b/Util/SluggerUtil.php index 14a128d..0d8f346 100644 --- a/Util/SluggerUtil.php +++ b/Util/SluggerUtil.php @@ -84,14 +84,14 @@ class SluggerUtil { /** * Flatten recursively an array * - * @param array $data The data tree + * @param array|string $data The data tree * @param string|null $current The current prefix * @param string $sep The key separator * @param string $prefix The key prefix * @param string $suffix The key suffix * @return array The flattened data */ - public function flatten(array $data, mixed $current = null, string $sep = '.', string $prefix = '', string $suffix = ''): array { + public function flatten($data, ?string $current = null, string $sep = '.', string $prefix = '', string $suffix = ''): array { //Init result $ret = []; -- 2.41.0