|
|
@@ -43,7 +43,7 @@ class FingersCrossedHandler extends Handler implements ProcessableHandlerInterfa
|
|
|
use ProcessableHandlerTrait;
|
|
|
|
|
|
/**
|
|
|
- * Handler or factory callable($record, $this)
|
|
|
+ * Handler or factory Closure($record, $this)
|
|
|
*
|
|
|
* @phpstan-var (Closure(LogRecord|null, HandlerInterface): HandlerInterface)|HandlerInterface
|
|
|
*/
|
|
|
@@ -67,7 +67,7 @@ class FingersCrossedHandler extends Handler implements ProcessableHandlerInterfa
|
|
|
/**
|
|
|
* @phpstan-param (Closure(LogRecord|null, HandlerInterface): HandlerInterface)|HandlerInterface $handler
|
|
|
*
|
|
|
- * @param Closure|HandlerInterface $handler Handler or factory callable($record|null, $fingersCrossedHandler).
|
|
|
+ * @param Closure|HandlerInterface $handler Handler or factory Closure($record|null, $fingersCrossedHandler).
|
|
|
* @param int|string|Level|LevelName|LogLevel::* $activationStrategy Strategy which determines when this handler takes action, or a level name/value at which the handler is activated
|
|
|
* @param int $bufferSize How many entries should be buffered at most, beyond that the oldest items are removed from the buffer.
|
|
|
* @param bool $bubble Whether the messages that are handled can bubble up the stack or not
|
|
|
@@ -198,14 +198,14 @@ class FingersCrossedHandler extends Handler implements ProcessableHandlerInterfa
|
|
|
/**
|
|
|
* Return the nested handler
|
|
|
*
|
|
|
- * If the handler was provided as a factory callable, this will trigger the handler's instantiation.
|
|
|
+ * If the handler was provided as a factory, this will trigger the handler's instantiation.
|
|
|
*/
|
|
|
public function getHandler(LogRecord $record = null): HandlerInterface
|
|
|
{
|
|
|
if (!$this->handler instanceof HandlerInterface) {
|
|
|
$handler = ($this->handler)($record, $this);
|
|
|
if (!$handler instanceof HandlerInterface) {
|
|
|
- throw new \RuntimeException("The factory callable should return a HandlerInterface");
|
|
|
+ throw new \RuntimeException("The factory Closure should return a HandlerInterface");
|
|
|
}
|
|
|
$this->handler = $handler;
|
|
|
}
|