mirror of
https://github.com/Seldaek/monolog.git
synced 2025-02-23 22:42:38 +01:00
CS fixes
This commit is contained in:
parent
cf2e93b1c3
commit
3926d95f8a
@ -141,8 +141,8 @@ abstract class AbstractHandler implements HandlerInterface
|
||||
/**
|
||||
* Sets the bubbling behavior.
|
||||
*
|
||||
* @param Boolean $bubble true means that this handler allows bubbling.
|
||||
* false means that bubbling is not permitted.
|
||||
* @param Boolean $bubble true means that this handler allows bubbling.
|
||||
* false means that bubbling is not permitted.
|
||||
* @return self
|
||||
*/
|
||||
public function setBubble($bubble)
|
||||
|
@ -32,8 +32,8 @@ class CubeHandler extends AbstractProcessingHandler
|
||||
* Create a Cube handler
|
||||
*
|
||||
* @throws UnexpectedValueException when given url is not a valid url.
|
||||
* A valid url must consists of three parts : protocol://host:port
|
||||
* Only valid protocol used by Cube are http and udp
|
||||
* A valid url must consists of three parts : protocol://host:port
|
||||
* Only valid protocol used by Cube are http and udp
|
||||
*/
|
||||
public function __construct($url, $level = Logger::DEBUG, $bubble = true)
|
||||
{
|
||||
|
@ -75,7 +75,7 @@ class DynamoDbHandler extends AbstractProcessingHandler
|
||||
*/
|
||||
protected function filterEmptyFields(array $record)
|
||||
{
|
||||
return array_filter($record, function($value) {
|
||||
return array_filter($record, function ($value) {
|
||||
return !empty($value) || false === $value || 0 === $value;
|
||||
});
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ interface HandlerInterface
|
||||
*
|
||||
* @param array $record The record to handle
|
||||
* @return Boolean true means that this handler handled the record, and that bubbling is not permitted.
|
||||
* false means the record was either not processed or that this handler allows bubbling.
|
||||
* false means the record was either not processed or that this handler allows bubbling.
|
||||
*/
|
||||
public function handle(array $record);
|
||||
|
||||
|
@ -32,19 +32,19 @@ class PushoverHandler extends SocketHandler
|
||||
private $emergencyLevel;
|
||||
|
||||
/**
|
||||
* @param string $token Pushover api token
|
||||
* @param string|array $users Pushover user id or array of ids the message will be sent to
|
||||
* @param string $title Title sent to the Pushover API
|
||||
* @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 Boolean $useSSL Whether to connect via SSL. Required when pushing messages to users that are not
|
||||
* the pushover.net app owner. OpenSSL is required for this option.
|
||||
* @param integer $highPriorityLevel The minimum logging level at which this handler will start
|
||||
* sending "high priority" requests to the Pushover API
|
||||
* @param integer $emergencyLevel The minimum logging level at which this handler will start
|
||||
* sending "emergency" requests to the Pushover API
|
||||
* @param integer $retry The retry parameter specifies how often (in seconds) the Pushover servers will send the same notification to the user.
|
||||
* @param integer $expire The expire parameter specifies how many seconds your notification will continue to be retried for (every retry seconds).
|
||||
* @param string $token Pushover api token
|
||||
* @param string|array $users Pushover user id or array of ids the message will be sent to
|
||||
* @param string $title Title sent to the Pushover API
|
||||
* @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 Boolean $useSSL Whether to connect via SSL. Required when pushing messages to users that are not
|
||||
* the pushover.net app owner. OpenSSL is required for this option.
|
||||
* @param integer $highPriorityLevel The minimum logging level at which this handler will start
|
||||
* sending "high priority" requests to the Pushover API
|
||||
* @param integer $emergencyLevel The minimum logging level at which this handler will start
|
||||
* sending "emergency" requests to the Pushover API
|
||||
* @param integer $retry The retry parameter specifies how often (in seconds) the Pushover servers will send the same notification to the user.
|
||||
* @param integer $expire The expire parameter specifies how many seconds your notification will continue to be retried for (every retry seconds).
|
||||
*/
|
||||
public function __construct($token, $users, $title = null, $level = Logger::CRITICAL, $bubble = true, $useSSL = true, $highPriorityLevel = Logger::CRITICAL, $emergencyLevel = Logger::EMERGENCY, $retry = 30, $expire = 25200)
|
||||
{
|
||||
|
@ -69,7 +69,7 @@ class RavenHandler extends AbstractProcessingHandler
|
||||
$level = $this->level;
|
||||
|
||||
// filter records based on their level
|
||||
$records = array_filter($records, function($record) use ($level) {
|
||||
$records = array_filter($records, function ($record) use ($level) {
|
||||
return $record['level'] >= $level;
|
||||
});
|
||||
|
||||
@ -78,7 +78,7 @@ class RavenHandler extends AbstractProcessingHandler
|
||||
}
|
||||
|
||||
// the record with the highest severity is the "main" one
|
||||
$record = array_reduce($records, function($highest, $record) {
|
||||
$record = array_reduce($records, function ($highest, $record) {
|
||||
if ($record['level'] >= $highest['level']) {
|
||||
return $record;
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ class RotatingFileHandler extends StreamHandler
|
||||
}
|
||||
|
||||
// Sorting the files by name to remove the older ones
|
||||
usort($logFiles, function($a, $b) {
|
||||
usort($logFiles, function ($a, $b) {
|
||||
return strcmp($b, $a);
|
||||
});
|
||||
|
||||
|
@ -129,9 +129,9 @@ class Logger implements LoggerInterface
|
||||
protected $processors;
|
||||
|
||||
/**
|
||||
* @param string $name The logging channel
|
||||
* @param HandlerInterface[] $handlers Optional stack of handlers, the first one in the array is called first, etc.
|
||||
* @param callable[] $processors Optional array of processors
|
||||
* @param string $name The logging channel
|
||||
* @param HandlerInterface[] $handlers Optional stack of handlers, the first one in the array is called first, etc.
|
||||
* @param callable[] $processors Optional array of processors
|
||||
*/
|
||||
public function __construct($name, array $handlers = array(), array $processors = array())
|
||||
{
|
||||
|
@ -30,7 +30,7 @@ class IntrospectionProcessor
|
||||
|
||||
private $skipClassesPartials;
|
||||
|
||||
public function __construct($level = Logger::DEBUG, array $skipClassesPartials = array('Monolog\\'))
|
||||
public function __construct($level = Logger::DEBUG, array $skipClassesPartials = array('Monolog\\'))
|
||||
{
|
||||
$this->level = $level;
|
||||
$this->skipClassesPartials = $skipClassesPartials;
|
||||
@ -56,18 +56,15 @@ class IntrospectionProcessor
|
||||
|
||||
$i = 0;
|
||||
|
||||
while (isset($trace[$i]['class']))
|
||||
{
|
||||
foreach ($this->skipClassesPartials as $part)
|
||||
{
|
||||
if (strpos($trace[$i]['class'], $part) !== false)
|
||||
{
|
||||
while (isset($trace[$i]['class'])) {
|
||||
foreach ($this->skipClassesPartials as $part) {
|
||||
if (strpos($trace[$i]['class'], $part) !== false) {
|
||||
$i++;
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// we should have the call source now
|
||||
$record['extra'] = array_merge(
|
||||
|
Loading…
x
Reference in New Issue
Block a user