mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-08 14:16:42 +02:00
Fix CS and add chainability to a few more setter methods, refs #221
This commit is contained in:
@@ -77,6 +77,8 @@ abstract class AbstractHandler implements HandlerInterface
|
||||
throw new \InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), '.var_export($callback, true).' given');
|
||||
}
|
||||
array_unshift($this->processors, $callback);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -97,7 +99,7 @@ abstract class AbstractHandler implements HandlerInterface
|
||||
public function setFormatter(FormatterInterface $formatter)
|
||||
{
|
||||
$this->formatter = $formatter;
|
||||
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -116,11 +118,14 @@ abstract class AbstractHandler implements HandlerInterface
|
||||
/**
|
||||
* Sets minimum logging level at which this handler will be triggered.
|
||||
*
|
||||
* @param integer $level
|
||||
* @param integer $level
|
||||
* @return self
|
||||
*/
|
||||
public function setLevel($level)
|
||||
{
|
||||
$this->level = $level;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -138,10 +143,13 @@ abstract class AbstractHandler implements HandlerInterface
|
||||
*
|
||||
* @param Boolean $bubble True means that bubbling is not permitted.
|
||||
* False means that this handler allows bubbling.
|
||||
* @return self
|
||||
*/
|
||||
public function setBubble($bubble)
|
||||
{
|
||||
$this->bubble = $bubble;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -61,7 +61,8 @@ interface HandlerInterface
|
||||
/**
|
||||
* Adds a processor in the stack.
|
||||
*
|
||||
* @param callable $callback
|
||||
* @param callable $callback
|
||||
* @return self
|
||||
*/
|
||||
public function pushProcessor($callback);
|
||||
|
||||
@@ -75,7 +76,8 @@ interface HandlerInterface
|
||||
/**
|
||||
* Sets the formatter.
|
||||
*
|
||||
* @param FormatterInterface $formatter
|
||||
* @param FormatterInterface $formatter
|
||||
* @return self
|
||||
*/
|
||||
public function setFormatter(FormatterInterface $formatter);
|
||||
|
||||
|
@@ -28,12 +28,12 @@ class NativeMailerHandler extends MailHandler
|
||||
protected $maxColumnWidth;
|
||||
|
||||
/**
|
||||
* @param string|array $to The receiver of the mail
|
||||
* @param string $subject The subject of the mail
|
||||
* @param string $from The sender of the mail
|
||||
* @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 int $maxColumnWidth The maximum column width that the message lines will have
|
||||
* @param string|array $to The receiver of the mail
|
||||
* @param string $subject The subject of the mail
|
||||
* @param string $from The sender of the mail
|
||||
* @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 int $maxColumnWidth The maximum column width that the message lines will have
|
||||
*/
|
||||
public function __construct($to, $subject, $from, $level = Logger::ERROR, $bubble = true, $maxColumnWidth = 70)
|
||||
{
|
||||
|
@@ -43,7 +43,7 @@ class PushoverHandler extends SocketHandler
|
||||
* 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 $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)
|
||||
|
Reference in New Issue
Block a user