1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-22 17:16:18 +02:00

Fix some resettableinterface usages

This commit is contained in:
Jordi Boggiano
2018-11-04 19:58:13 +01:00
parent 36b767dc02
commit dddc7ed781
6 changed files with 23 additions and 10 deletions

View File

@@ -19,7 +19,7 @@ use Monolog\ResettableInterface;
*
* @author Lenar Lõhmus <lenar@city.ee>
*/
class GroupHandler extends Handler implements ProcessableHandlerInterface
class GroupHandler extends Handler implements ProcessableHandlerInterface, ResettableInterface
{
use ProcessableHandlerTrait;
@@ -93,8 +93,6 @@ class GroupHandler extends Handler implements ProcessableHandlerInterface
public function reset()
{
parent::reset();
foreach ($this->handlers as $handler) {
if ($handler instanceof ResettableInterface) {
$handler->reset();
@@ -102,6 +100,15 @@ class GroupHandler extends Handler implements ProcessableHandlerInterface
}
}
public function close()
{
parent::close();
foreach ($this->handlers as $handler) {
$handler->close();
}
}
/**
* {@inheritdoc}
*/