From: Raphaƫl Gertz Date: Sun, 8 Aug 2021 13:40:18 +0000 (+0200) Subject: Remove mixed strict type for data as it may be array or string X-Git-Tag: 0.2.0~28 X-Git-Url: https://git.rapsys.eu/packbundle/commitdiff_plain/438757217861be80e99c8648b3f4e57d207f4198 Remove mixed strict type for data as it may be array or string Improve doc --- 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 = [];