protected function getKey(string $key, bool $register = false): string
    {
        $lowercaseKey = strtolower($key);
        if (isset($this->keyMap[$lowercaseKey])) {
            $key = $this->keyMap[$lowercaseKey];
        } elseif ($register) {
            $this->keyMap[$lowercaseKey] = $key;
        }
        return $key;
    }
protected function getKey(string $key, bool $register = false): string
    {
        $lowercaseKey = strtolower($key);
        if (isset($this->keyMap[$lowercaseKey])) {
            $key = $this->keyMap[$lowercaseKey];
        } elseif ($register) {
            $this->keyMap[$lowercaseKey] = $key;
        }
        return $key;
    }
protected function getKey ( string $ key , bool $ register = false ) : string { $ lowercaseKey = strtolower ( $ key ) ; if ( isset ( $ this -> keyMap [ $ lowercaseKey ] ) ) { $ key = $ this -> keyMap [ $ lowercaseKey ] ; } elseif ( $ register ) { $ this -> keyMap [ $ lowercaseKey ] = $ key ; } return $ key ; }
Retrieve a key that can be used in a hashmap to prevent duplicate keys

@param string $key
@param bool $register Whether to register a new key
@return string
Retrieve a key that can be used in a hashmap to prevent duplicate keys