src/Application/Config.php
public function set(string $key, $value): void
    {
        $key = explode('.', $key);
        $last = array_pop($key);
        $result = &$this->config;

        foreach ($key as $part) {
            if (!isset($result[$part]) || !is_array($result[$part])) {
                $result[$part] = [];
            }
            $result = &$result[$part];
        }
        $result[$last] = $value;
    }
public function set(string $key, $value): void
    {
        $key = explode('.', $key);
        $last = array_pop($key);
        $result = &$this->config;

        foreach ($key as $part) {
            if (!isset($result[$part]) || !is_array($result[$part])) {
                $result[$part] = [];
            }
            $result = &$result[$part];
        }
        $result[$last] = $value;
    }
Sets new value.

@param string $key
@param $value