mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-23 01:26:11 +02:00
CS fixes
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
|
||||
namespace Monolog\Handler;
|
||||
|
||||
use Monolog\Logger;
|
||||
use Monolog\Formatter\LineFormatter;
|
||||
|
||||
/**
|
||||
@@ -103,7 +102,8 @@ class BrowserConsoleHandler extends AbstractProcessingHandler
|
||||
);
|
||||
}
|
||||
}
|
||||
return "(function(c){if (c && c.groupCollapsed) {\n" . implode("\n", $script) . "\n}})(console);";
|
||||
|
||||
return "(function (c) {if (c && c.groupCollapsed) {\n" . implode("\n", $script) . "\n}})(console);";
|
||||
}
|
||||
|
||||
private static function handleStyles($formatted)
|
||||
@@ -130,7 +130,7 @@ class BrowserConsoleHandler extends AbstractProcessingHandler
|
||||
static $colors = array('blue', 'green', 'red', 'magenta', 'orange', 'black', 'grey');
|
||||
static $labels = array();
|
||||
|
||||
return preg_replace_callback('/macro\s*:(.*?)(?:;|$)/', function($m) use($string, &$colors, &$labels) {
|
||||
return preg_replace_callback('/macro\s*:(.*?)(?:;|$)/', function ($m) use ($string, &$colors, &$labels) {
|
||||
if (trim($m[1]) === 'autolabel') {
|
||||
// Format the string as a label with consistent auto assigned background color
|
||||
if (!isset($labels[$string])) {
|
||||
@@ -160,6 +160,7 @@ class BrowserConsoleHandler extends AbstractProcessingHandler
|
||||
}
|
||||
$script[] = self::call('log', self::quote('%s: %o'), self::quote($key), $value);
|
||||
}
|
||||
|
||||
return $script;
|
||||
}
|
||||
|
||||
@@ -172,6 +173,7 @@ class BrowserConsoleHandler extends AbstractProcessingHandler
|
||||
{
|
||||
$args = func_get_args();
|
||||
$method = array_shift($args);
|
||||
|
||||
return self::call_array($method, $args);
|
||||
}
|
||||
|
||||
|
@@ -14,7 +14,6 @@ namespace Monolog\Handler;
|
||||
use Aws\Common\Aws;
|
||||
use Aws\DynamoDb\DynamoDbClient;
|
||||
use Monolog\Formatter\ScalarFormatter;
|
||||
use Monolog\Handler\AbstractProcessingHandler;
|
||||
use Monolog\Logger;
|
||||
|
||||
/**
|
||||
|
@@ -36,10 +36,10 @@ class FilterHandler extends AbstractHandler
|
||||
protected $bubble;
|
||||
|
||||
/**
|
||||
* @param callable|HandlerInterface $handler Handler or factory callable($record, $this).
|
||||
* @param callable|HandlerInterface $handler Handler or factory callable($record, $this).
|
||||
* @param int|array $minLevelOrList A list of levels to accept or a minimum level if maxLevel is provided
|
||||
* @param int $maxLevel Maximum level to accept, only used if $minLevelOrList is an array
|
||||
* @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
|
||||
* @param int $maxLevel Maximum level to accept, only used if $minLevelOrList is an array
|
||||
* @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
|
||||
*/
|
||||
public function __construct($handler, $minLevelOrList = Logger::DEBUG, $maxLevel = Logger::EMERGENCY, $bubble = true)
|
||||
{
|
||||
@@ -57,8 +57,8 @@ class FilterHandler extends AbstractHandler
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int|array $minLevelOrList A list of levels to accept or a minimum level if maxLevel is provided
|
||||
* @param int $maxLevel Maximum level to accept, only used if $minLevelOrList is an array
|
||||
* @param int|array $minLevelOrList A list of levels to accept or a minimum level if maxLevel is provided
|
||||
* @param int $maxLevel Maximum level to accept, only used if $minLevelOrList is an array
|
||||
*/
|
||||
public function setAcceptedLevels($minLevelOrList = Logger::DEBUG, $maxLevel = Logger::EMERGENCY)
|
||||
{
|
||||
|
@@ -32,9 +32,9 @@ class FlowdockHandler extends SocketHandler
|
||||
protected $apiToken;
|
||||
|
||||
/**
|
||||
* @param string $apiToken
|
||||
* @param bool|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 $apiToken
|
||||
* @param bool|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
|
||||
*
|
||||
* @throws MissingExtensionException if OpenSSL is missing
|
||||
*/
|
||||
|
@@ -31,9 +31,9 @@ class GelfHandler extends AbstractProcessingHandler
|
||||
protected $publisher;
|
||||
|
||||
/**
|
||||
* @param PublisherInterface|IMessagePublisher $publisher a publisher object
|
||||
* @param integer $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 PublisherInterface|IMessagePublisher $publisher a publisher object
|
||||
* @param integer $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
|
||||
*/
|
||||
public function __construct($publisher, $level = Logger::DEBUG, $bubble = true)
|
||||
{
|
||||
|
@@ -285,7 +285,7 @@ class HipChatHandler extends SocketHandler
|
||||
* system where `mb_strlen()` is unavailable.
|
||||
*
|
||||
* @param string $str
|
||||
* @param int $length
|
||||
* @param int $length
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
@@ -77,7 +77,7 @@ class NativeMailerHandler extends MailHandler
|
||||
/**
|
||||
* Add headers to the message
|
||||
*
|
||||
* @param string|array $headers Custom added headers
|
||||
* @param string|array $headers Custom added headers
|
||||
* @return null
|
||||
*/
|
||||
public function addHeader($headers)
|
||||
@@ -123,23 +123,25 @@ class NativeMailerHandler extends MailHandler
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $contentType The content type of the email - Defaults to text/plain. Use text/html for HTML
|
||||
* messages.
|
||||
* @param string $contentType The content type of the email - Defaults to text/plain. Use text/html for HTML
|
||||
* messages.
|
||||
* @return self
|
||||
*/
|
||||
public function setContentType($contentType)
|
||||
{
|
||||
$this->contentType = $contentType;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $encoding
|
||||
* @param string $encoding
|
||||
* @return self
|
||||
*/
|
||||
public function setEncoding($encoding)
|
||||
{
|
||||
$this->encoding = $encoding;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
@@ -14,7 +14,6 @@ namespace Monolog\Handler;
|
||||
use Monolog\Formatter\LineFormatter;
|
||||
use Monolog\Formatter\FormatterInterface;
|
||||
use Monolog\Logger;
|
||||
use Monolog\Handler\AbstractProcessingHandler;
|
||||
use Raven_Client;
|
||||
|
||||
/**
|
||||
|
@@ -21,9 +21,9 @@ class RollbarHandler extends AbstractProcessingHandler
|
||||
protected $rollbarNotifier;
|
||||
|
||||
/**
|
||||
* @param RollbarNotifier $rollbarNotifier RollbarNotifier object constructed with valid token
|
||||
* @param integer $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 RollbarNotifier $rollbarNotifier RollbarNotifier object constructed with valid token
|
||||
* @param integer $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
|
||||
*/
|
||||
public function __construct(RollbarNotifier $rollbarNotifier, $level = Logger::ERROR, $bubble = true)
|
||||
{
|
||||
|
Reference in New Issue
Block a user