private function replaceReferences(array &$config)
    {
        foreach ($config as $key => &$value) {
            if (is_array($value)) {
                $this->replaceReferences($value);
                continue;
            }

            //~ Not string, skip
            if (!is_string($value)) {
                continue;
            }

            //~ Value not %my.reference.config%, skip
            if (!(bool) preg_match('`%(.*?)%`', $value, $matches)) {
                continue;
            }

            $referenceValue = $this->get($matches[1]);

            if ($referenceValue !== null) {
                $value = $referenceValue;
            }
        }
    }