public static function getArrayValueForKeyOrDefault(array &$array, string $key, $default, bool $ignoreCase = false, bool $deepSearchDotNotation = false)
    {
        $keyToCheck = $key;
        $arrayToCheck = &$array;
        
        if ($ignoreCase) {
            $keyToCheck = strtolower($keyToCheck);
            $arrayToCheck = array_change_key_case($arrayToCheck);
        }
        
        if (array_key_exists($keyToCheck, $arrayToCheck)) {
            return $arrayToCheck[$keyToCheck];
        }
        
        if (!$deepSearchDotNotation || strpos($keyToCheck, ".") === false) {
            return $default;
        }
        
        $keySeparated = explode('.', $keyToCheck);
        $checkOrReturn = $arrayToCheck;
        
        foreach ($keySeparated as $keyPart) {
            if (is_object($checkOrReturn)) {
                $checkOrReturn = ObjectUtils::getPropertyForKeyOrDefault($checkOrReturn, $keyPart, $default);
                continue;
            }
            
            if (!is_array($checkOrReturn) || !array_key_exists($keyPart, $checkOrReturn)) {
                $checkOrReturn = &$default;
                break;
            }
            
            $checkOrReturn = &$checkOrReturn[$keyPart];
        }
        
        return $checkOrReturn;
    }