mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-22 17:16:18 +02:00
Update return types
This commit is contained in:
@@ -36,11 +36,11 @@ class BufferHandler extends AbstractHandler implements ProcessableHandlerInterfa
|
||||
/**
|
||||
* @param HandlerInterface $handler Handler.
|
||||
* @param int $bufferLimit How many entries should be buffered at most, beyond that the oldest items are removed from the buffer.
|
||||
* @param int $level The minimum logging level at which this handler will be triggered
|
||||
* @param string|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 bool $flushOnOverflow If true, the buffer is flushed when the max size has been reached, by default oldest entries are discarded
|
||||
*/
|
||||
public function __construct(HandlerInterface $handler, $bufferLimit = 0, $level = Logger::DEBUG, bool $bubble = true, $flushOnOverflow = false)
|
||||
public function __construct(HandlerInterface $handler, int $bufferLimit = 0, $level = Logger::DEBUG, bool $bubble = true, bool $flushOnOverflow = false)
|
||||
{
|
||||
parent::__construct($level, $bubble);
|
||||
$this->handler = $handler;
|
||||
@@ -82,7 +82,7 @@ class BufferHandler extends AbstractHandler implements ProcessableHandlerInterfa
|
||||
return false === $this->bubble;
|
||||
}
|
||||
|
||||
public function flush()
|
||||
public function flush(): void
|
||||
{
|
||||
if ($this->bufferSize === 0) {
|
||||
return;
|
||||
@@ -112,7 +112,7 @@ class BufferHandler extends AbstractHandler implements ProcessableHandlerInterfa
|
||||
/**
|
||||
* Clears the buffer without flushing any messages down to the wrapped handler.
|
||||
*/
|
||||
public function clear()
|
||||
public function clear(): void
|
||||
{
|
||||
$this->bufferSize = 0;
|
||||
$this->buffer = [];
|
||||
|
Reference in New Issue
Block a user