1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-22 00:56:08 +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

@@ -32,7 +32,7 @@ class SyslogUdpHandler extends AbstractSyslogHandler
* @param bool $bubble Whether the messages that are handled can bubble up the stack or not
* @param string $ident Program name or tag for each log message.
*/
public function __construct($host, $port = 514, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true, $ident = 'php')
public function __construct($host, $port = 514, $facility = LOG_USER, $level = Logger::DEBUG, bool $bubble = true, $ident = 'php')
{
parent::__construct($facility, $level, $bubble);
@@ -41,7 +41,7 @@ class SyslogUdpHandler extends AbstractSyslogHandler
$this->socket = new UdpSocket($host, $port ?: 514);
}
protected function write(array $record)
protected function write(array $record): void
{
$lines = $this->splitMessageIntoLines($record['formatted']);
@@ -52,7 +52,7 @@ class SyslogUdpHandler extends AbstractSyslogHandler
}
}
public function close()
public function close(): void
{
$this->socket->close();
}