mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-23 09:36:11 +02:00
CS fixes
This commit is contained in:
@@ -76,7 +76,7 @@ class GroupHandler extends Handler implements ProcessableHandlerInterface
|
||||
public function handleBatch(array $records)
|
||||
{
|
||||
if ($this->processors) {
|
||||
$processed = array();
|
||||
$processed = [];
|
||||
foreach ($records as $record) {
|
||||
foreach ($this->processors as $processor) {
|
||||
$processed[] = call_user_func($processor, $record);
|
||||
|
@@ -36,19 +36,19 @@ class LogmaticHandler extends SocketHandler
|
||||
protected $appname;
|
||||
|
||||
/**
|
||||
* @param string $hostname Host name supplied by Logmatic.
|
||||
* @param string $appname Application name supplied by Logmatic.
|
||||
* @param string $token Log token supplied by Logmatic.
|
||||
* @param bool $useSSL Whether or not SSL encryption should be used.
|
||||
* @param int $level The minimum logging level to trigger this handler.
|
||||
* @param bool $bubble Whether or not messages that are handled should bubble up the stack.
|
||||
* @param string $token Log token supplied by Logmatic.
|
||||
* @param string $hostname Host name supplied by Logmatic.
|
||||
* @param string $appname Application name supplied by Logmatic.
|
||||
* @param bool $useSSL Whether or not SSL encryption should be used.
|
||||
* @param int|string $level The minimum logging level to trigger this handler.
|
||||
* @param bool $bubble Whether or not messages that are handled should bubble up the stack.
|
||||
*
|
||||
* @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing
|
||||
*/
|
||||
public function __construct($token, $hostname = '', $appname = '', $useSSL = true, $level = Logger::DEBUG, $bubble = true)
|
||||
public function __construct(string $token, string $hostname = '', string $appname = '', bool $useSSL = true, $level = Logger::DEBUG, bool $bubble = true)
|
||||
{
|
||||
if ($useSSL && !extension_loaded('openssl')) {
|
||||
throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for LogmaticHandler');
|
||||
throw new MissingExtensionException('The OpenSSL PHP extension is required to use SSL encrypted connection for LogmaticHandler');
|
||||
}
|
||||
|
||||
$endpoint = $useSSL ? 'ssl://api.logmatic.io:10515' : 'api.logmatic.io:10514';
|
||||
@@ -77,10 +77,10 @@ class LogmaticHandler extends SocketHandler
|
||||
$formatter = new LogmaticFormatter();
|
||||
|
||||
if (!empty($this->hostname)) {
|
||||
$formatter->setHostname($this->hostname);
|
||||
$formatter->setHostname($this->hostname);
|
||||
}
|
||||
if (!empty($this->appname)) {
|
||||
$formatter->setAppname($this->appname);
|
||||
$formatter->setAppname($this->appname);
|
||||
}
|
||||
|
||||
return $formatter;
|
||||
|
@@ -26,12 +26,12 @@ class SwiftMailerHandler extends MailHandler
|
||||
private $messageTemplate;
|
||||
|
||||
/**
|
||||
* @param \Swift_Mailer $mailer The mailer to use
|
||||
* @param \Swift_Mailer $mailer The mailer to use
|
||||
* @param callable|Swift_Message $message An example message for real messages, only the body will be replaced
|
||||
* @param int $level The minimum logging level at which this handler will be triggered
|
||||
* @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
|
||||
* @param int|string $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
|
||||
*/
|
||||
public function __construct(\Swift_Mailer $mailer, $message, $level = Logger::ERROR, $bubble = true)
|
||||
public function __construct(\Swift_Mailer $mailer, $message, $level = Logger::ERROR, bool $bubble = true)
|
||||
{
|
||||
parent::__construct($level, $bubble);
|
||||
|
||||
@@ -50,8 +50,8 @@ class SwiftMailerHandler extends MailHandler
|
||||
/**
|
||||
* Creates instance of Swift_Message to be sent
|
||||
*
|
||||
* @param string $content formatted email body to be sent
|
||||
* @param array $records Log records that formed the content
|
||||
* @param string $content formatted email body to be sent
|
||||
* @param array $records Log records that formed the content
|
||||
* @return Swift_Message
|
||||
*/
|
||||
protected function buildMessage(string $content, array $records): Swift_Message
|
||||
|
Reference in New Issue
Block a user