More type deconfusion
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2023-07-05 14:36:56 +00:00
parent f7b4a8f9cd
commit c1fb42c4ff
4 changed files with 21 additions and 15 deletions

View File

@ -58,6 +58,7 @@ class App
]);
$parser = new Yaml();
/** @var array<string, mixed> */
$parsedConfig = $parser->parseFile($configFile);
@ -66,7 +67,7 @@ class App
$logger = new Logger('app');
if ($this->config->get('log')) {
$logger->pushHandler(new StreamHandler($this->config->get('log')));
$logger->pushHandler(new StreamHandler((string)$this->config->get('log')));
$logger->info("Logging enabled");
}
$logger->info("Initialization complete");
@ -82,8 +83,9 @@ class App
*/
public function getConfig(string $key): mixed
{
/** @var mixed */
$ret = $this->config->get($key);
$this->logger->debug("Fetching configuration key", [$key,$ret]);
$this->logger->debug("Fetching configuration key", [$key, $ret]);
return $ret;
}