1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-21 16:46:11 +02:00

Add a bunch of return types and fix type inconsistencies reports from phan

This commit is contained in:
Jordi Boggiano
2018-07-04 14:10:04 +02:00
parent e5900c3814
commit 06143b03e5
73 changed files with 227 additions and 280 deletions

View File

@@ -38,7 +38,7 @@ class SyslogHandler extends AbstractSyslogHandler
* @param bool $bubble Whether the messages that are handled can bubble up the stack or not
* @param int $logopts Option flags for the openlog() call, defaults to LOG_PID
*/
public function __construct($ident, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true, $logopts = LOG_PID)
public function __construct($ident, $facility = LOG_USER, $level = Logger::DEBUG, bool $bubble = true, $logopts = LOG_PID)
{
parent::__construct($facility, $level, $bubble);
@@ -49,7 +49,7 @@ class SyslogHandler extends AbstractSyslogHandler
/**
* {@inheritdoc}
*/
public function close()
public function close(): void
{
closelog();
}
@@ -57,7 +57,7 @@ class SyslogHandler extends AbstractSyslogHandler
/**
* {@inheritdoc}
*/
protected function write(array $record)
protected function write(array $record): void
{
if (!openlog($this->ident, $this->logopts, $this->facility)) {
throw new \LogicException('Can\'t open syslog for ident "'.$this->ident.'" and facility "'.$this->facility.'"');