style(legacy): format config

This commit is contained in:
jo 2022-09-04 15:27:14 +02:00 committed by Kyle Robbertze
parent fde7a760c6
commit 252ab00a8e
1 changed files with 12 additions and 3 deletions

View File

@ -113,7 +113,8 @@ class Config
try {
$values = $processor->processConfiguration($schema, [$dirty]);
} catch (InvalidConfigurationException $error) {
echo "could not parse configuration: " . $error->getMessage();
echo 'could not parse configuration: ' . $error->getMessage();
exit;
}
@ -128,10 +129,12 @@ class Config
// Storage path
if (!is_dir($values['storage']['path'])) {
echo "the configured storage.path '{$values['storage']['path']}' does not exists!";
exit;
}
if (!is_writable($values['storage']['path'])) {
echo "the configured storage.path '{$values['storage']['path']}' is not writable!";
exit;
}
@ -161,13 +164,19 @@ class Config
public static function get(...$args)
{
if (is_null(self::$dot_values)) self::load();
if (is_null(self::$dot_values)) {
self::load();
}
return self::$dot_values->get(...$args);
}
public static function has(...$args)
{
if (is_null(self::$dot_values)) self::load();
if (is_null(self::$dot_values)) {
self::load();
}
return self::$dot_values->has(...$args);
}