mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-21 16:46:11 +02:00
Refactored the AbstractHandler to avoid having some dummy write() methods
This commit is contained in:
@@ -47,6 +47,14 @@ class FingersCrossedHandler extends AbstractHandler
|
||||
$this->stopBuffering = $stopBuffering;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function isHandling(array $record)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
@@ -84,12 +92,4 @@ class FingersCrossedHandler extends AbstractHandler
|
||||
{
|
||||
$this->buffering = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implemented to comply with the AbstractHandler requirements. Can not be called.
|
||||
*/
|
||||
protected function write(array $record)
|
||||
{
|
||||
throw new \BadMethodCallException('This method should not be called directly on the FingersCrossedHandler.');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user