1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-06 05:07:36 +02:00

FingersCrossedHandler: Clean up code

This commit is contained in:
Nils Adermann
2016-04-20 15:00:33 -04:00
parent e7c326782f
commit 0fc6734c6f

View File

@@ -88,10 +88,7 @@ class FingersCrossedHandler extends AbstractHandler
$this->buffering = false;
}
if (!$this->handler instanceof HandlerInterface) {
$record = end($this->buffer);
if ($record === false) {
$record = null;
}
$record = end($this->buffer) ?: null;
$this->handler = call_user_func($this->handler, $record, $this);
if (!$this->handler instanceof HandlerInterface) {
@@ -119,7 +116,7 @@ class FingersCrossedHandler extends AbstractHandler
array_shift($this->buffer);
}
if ($this->activationStrategy->isHandlerActivated($record)) {
$this->activate($record);
$this->activate();
}
} else {
$this->handler->handle($record);