protected function arrayMergeRecursiveDistinct(array $a, array $b, bool $mergeNumericKeys = false): array
    {
        $merged = $a;

        foreach($b as $key => $value) {
            if (!$mergeNumericKeys && is_numeric($key)) {
                $merged[] = $value;
                continue;
            }
            if (is_array($value) && array_key_exists($key, $merged) && is_array($merged[$key])) {
                $merged[$key] = $this->arrayMergeRecursiveDistinct($merged[$key], $value);
            } else {
                $merged[$key] = $value;
            }
        }

        return $merged;
    }