1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-22 17:16:18 +02:00

Add missing types to constructor args

This commit is contained in:
Jordi Boggiano
2022-04-24 11:17:17 +02:00
parent 6627c092d8
commit bd5968a567
27 changed files with 52 additions and 31 deletions

View File

@@ -14,6 +14,7 @@ namespace Monolog\Handler;
use DateTimeInterface;
use Monolog\Level;
use Monolog\Handler\SyslogUdp\UdpSocket;
use Monolog\LevelName;
use Monolog\Utils;
use Monolog\LogRecord;
@@ -52,7 +53,7 @@ class SyslogUdpHandler extends AbstractSyslogHandler
*
* @phpstan-param self::RFC* $rfc
*/
public function __construct(string $host, int $port = 514, $facility = LOG_USER, $level = Level::Debug, bool $bubble = true, string $ident = 'php', int $rfc = self::RFC5424)
public function __construct(string $host, int $port = 514, string|int $facility = LOG_USER, int|string|Level|LevelName $level = Level::Debug, bool $bubble = true, string $ident = 'php', int $rfc = self::RFC5424)
{
if (!extension_loaded('sockets')) {
throw new MissingExtensionException('The sockets extension is required to use the SyslogUdpHandler');