mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 12:45:14 +02:00
Fix PHPStan errors
This commit is contained in:
parent
63558f92eb
commit
ed5de437be
2 changed files with 7 additions and 5 deletions
|
@ -48,8 +48,8 @@ final class SyslogLoggerFactory implements LoggerFactory
|
|||
*/
|
||||
public function createLogger(string $logLevel, string $logChannel): LoggerInterface
|
||||
{
|
||||
$logOpts = (string) $this->config->get('system', 'syslog_flags') ?? SyslogLogger::DEFAULT_FLAGS;
|
||||
$logFacility = (string) $this->config->get('system', 'syslog_facility') ?? SyslogLogger::DEFAULT_FACILITY;
|
||||
$logOpts = (int) $this->config->get('system', 'syslog_flags') ?? SyslogLogger::DEFAULT_FLAGS;
|
||||
$logFacility = (int) $this->config->get('system', 'syslog_facility') ?? SyslogLogger::DEFAULT_FACILITY;
|
||||
|
||||
if (!array_key_exists($logLevel, SyslogLogger::logLevels)) {
|
||||
throw new LogLevelException(sprintf('The log level "%s" is not supported by "%s".', $logLevel, SyslogLogger::class));
|
||||
|
@ -58,7 +58,7 @@ final class SyslogLoggerFactory implements LoggerFactory
|
|||
return new SyslogLogger(
|
||||
$logChannel,
|
||||
$this->introspection,
|
||||
(string) SyslogLogger::logLevels[$logLevel],
|
||||
SyslogLogger::logLevels[$logLevel],
|
||||
$logOpts,
|
||||
$logFacility
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue