Add extra output to stow

This commit is contained in:
Tim
2025-06-24 14:16:03 +02:00
parent b552933866
commit 033cb886ac
2 changed files with 10 additions and 1 deletions

View File

@ -38,9 +38,14 @@ readonly class config
private string $fileName = 'config.php',
) {}
public function configExists(): bool
{
return file_exists($this->getConfigFile());
}
public function get(string $key, mixed $default = null): mixed
{
if (!file_exists($this->getConfigFile())) {
if (!$this->configExists()) {
return $default;
}
$config = include $this->getConfigFile();