public static function replace_key(array $array, $oldKey, $newKey) : array
  {
    $newArray = array();

    foreach ($array as $key => $value) {
      if ($key == $oldKey) {
        $newArray = array_merge($newArray, [$newKey => $value]);
      } else {
        $newArray = array_merge($newArray, [$key => $value]);
      }
    }

    return $newArray;
  }