mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-22 17:16:18 +02:00
CS fixes
This commit is contained in:
@@ -30,7 +30,7 @@ class LogglyHandler extends AbstractProcessingHandler
|
||||
|
||||
protected $token;
|
||||
|
||||
protected $tag = array();
|
||||
protected $tag = [];
|
||||
|
||||
public function __construct($token, $level = Logger::DEBUG, $bubble = true)
|
||||
{
|
||||
@@ -45,14 +45,14 @@ class LogglyHandler extends AbstractProcessingHandler
|
||||
|
||||
public function setTag($tag)
|
||||
{
|
||||
$tag = !empty($tag) ? $tag : array();
|
||||
$this->tag = is_array($tag) ? $tag : array($tag);
|
||||
$tag = !empty($tag) ? $tag : [];
|
||||
$this->tag = is_array($tag) ? $tag : [$tag];
|
||||
}
|
||||
|
||||
public function addTag($tag)
|
||||
{
|
||||
if (!empty($tag)) {
|
||||
$tag = is_array($tag) ? $tag : array($tag);
|
||||
$tag = is_array($tag) ? $tag : [$tag];
|
||||
$this->tag = array_unique(array_merge($this->tag, $tag));
|
||||
}
|
||||
}
|
||||
@@ -79,7 +79,7 @@ class LogglyHandler extends AbstractProcessingHandler
|
||||
{
|
||||
$url = sprintf("https://%s/%s/%s/", self::HOST, $endpoint, $this->token);
|
||||
|
||||
$headers = array('Content-Type: application/json');
|
||||
$headers = ['Content-Type: application/json'];
|
||||
|
||||
if (!empty($this->tag)) {
|
||||
$headers[] = 'X-LOGGLY-TAG: '.implode(',', $this->tag);
|
||||
|
Reference in New Issue
Block a user