1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-23 17:46:09 +02:00

Update a few more callable to Closure

This commit is contained in:
Jordi Boggiano
2022-04-22 14:26:03 +02:00
parent 0dac87975c
commit a7de8dd0c2
4 changed files with 17 additions and 13 deletions

View File

@@ -212,8 +212,10 @@ class Logger implements LoggerInterface, ResettableInterface
/**
* Adds a processor on to the stack.
*
* @phpstan-param ProcessorInterface|(callable(LogRecord): LogRecord) $callback
*/
public function pushProcessor(callable $callback): self
public function pushProcessor(ProcessorInterface|callable $callback): self
{
array_unshift($this->processors, $callback);
@@ -223,6 +225,7 @@ class Logger implements LoggerInterface, ResettableInterface
/**
* Removes the processor on top of the stack and returns it.
*
* @phpstan-return ProcessorInterface|(callable(LogRecord): LogRecord)
* @throws \LogicException If empty processor stack
*/
public function popProcessor(): callable
@@ -236,6 +239,7 @@ class Logger implements LoggerInterface, ResettableInterface
/**
* @return callable[]
* @phpstan-return array<ProcessorInterface|(callable(LogRecord): LogRecord)>
*/
public function getProcessors(): array
{
@@ -433,7 +437,7 @@ class Logger implements LoggerInterface, ResettableInterface
/**
* Set a custom exception handler that will be called if adding a new record fails
*
* The callable will receive an exception object and the record that failed to be logged
* The Closure will receive an exception object and the record that failed to be logged
*/
public function setExceptionHandler(Closure|null $callback): self
{