1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-02 22:57:26 +02:00

feat: add default arg to Configuration::getConfig (#3331)

This commit is contained in:
Dag
2023-07-05 05:33:22 +02:00
committed by GitHub
parent cf920694d5
commit a21d496bc7
2 changed files with 3 additions and 2 deletions

View File

@@ -220,9 +220,9 @@ final class Configuration
}
}
public static function getConfig(string $section, string $key)
public static function getConfig(string $section, string $key, $default = null)
{
return self::$config[strtolower($section)][strtolower($key)] ?? null;
return self::$config[strtolower($section)][strtolower($key)] ?? $default;
}
private static function setConfig(string $section, string $key, $value): void