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

Bump phpstan to level 8

This commit is contained in:
Jordi Boggiano
2021-07-04 14:03:55 +02:00
parent 4ef5da80ad
commit 8b5278d8e1
47 changed files with 262 additions and 101 deletions

View File

@@ -45,7 +45,6 @@ class SyslogUdpHandler extends AbstractSyslogHandler
* @param string $host Either IP/hostname or a path to a unix socket (port must be 0 then)
* @param int $port Port number, or 0 if $host is a unix socket
* @param string|int $facility Either one of the names of the keys in $this->facilities, or a LOG_* facility constant
* @param string|int $level The minimum logging level at which this handler will be triggered
* @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.
* @param int $rfc RFC to format the message for.
@@ -88,7 +87,12 @@ class SyslogUdpHandler extends AbstractSyslogHandler
$message = implode("\n", $message);
}
return preg_split('/$\R?^/m', (string) $message, -1, PREG_SPLIT_NO_EMPTY);
$lines = preg_split('/$\R?^/m', (string) $message, -1, PREG_SPLIT_NO_EMPTY);
if (false === $lines) {
throw new \RuntimeException('Could not preg_split: '.preg_last_error().' / '.preg_last_error_msg());
}
return $lines;
}
/**