diff --git a/src/Concerns/HasCases.php b/src/Concerns/HasCases.php index 8e9d8d2..ea72ec3 100644 --- a/src/Concerns/HasCases.php +++ b/src/Concerns/HasCases.php @@ -31,11 +31,11 @@ protected function convertKeysCase(array &$array): void $result = []; - array_walk($array, function ($value, $key) use (&$result) { + foreach ($array as $key => $item) { $key = $this->convertKeyCase($key); $result[$key] = $value; - }); + } $array = $result; }