style(legacy): format config
This commit is contained in:
parent
fde7a760c6
commit
252ab00a8e
|
@ -113,7 +113,8 @@ class Config
|
||||||
try {
|
try {
|
||||||
$values = $processor->processConfiguration($schema, [$dirty]);
|
$values = $processor->processConfiguration($schema, [$dirty]);
|
||||||
} catch (InvalidConfigurationException $error) {
|
} catch (InvalidConfigurationException $error) {
|
||||||
echo "could not parse configuration: " . $error->getMessage();
|
echo 'could not parse configuration: ' . $error->getMessage();
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,10 +129,12 @@ class Config
|
||||||
// Storage path
|
// Storage path
|
||||||
if (!is_dir($values['storage']['path'])) {
|
if (!is_dir($values['storage']['path'])) {
|
||||||
echo "the configured storage.path '{$values['storage']['path']}' does not exists!";
|
echo "the configured storage.path '{$values['storage']['path']}' does not exists!";
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
if (!is_writable($values['storage']['path'])) {
|
if (!is_writable($values['storage']['path'])) {
|
||||||
echo "the configured storage.path '{$values['storage']['path']}' is not writable!";
|
echo "the configured storage.path '{$values['storage']['path']}' is not writable!";
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,13 +164,19 @@ class Config
|
||||||
|
|
||||||
public static function get(...$args)
|
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);
|
return self::$dot_values->get(...$args);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function has(...$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);
|
return self::$dot_values->has(...$args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue