| 1 |
<?php |
| 2 |
|
| 3 |
declare (strict_types=1); |
| 4 |
/* |
| 5 |
* This file is part of the Monolog package. |
| 6 |
* |
| 7 |
* (c) Jordi Boggiano <[email protected]> |
| 8 |
* |
| 9 |
* For the full copyright and license information, please view the LICENSE |
| 10 |
* file that was distributed with this source code. |
| 11 |
*/ |
| 12 |
namespace Dudlewebs\WPMCS\Monolog\Handler; |
| 13 |
|
| 14 |
/** |
| 15 |
* No-op |
| 16 |
* |
| 17 |
* This handler handles anything, but does nothing, and does not stop bubbling to the rest of the stack. |
| 18 |
* This can be used for testing, or to disable a handler when overriding a configuration without |
| 19 |
* influencing the rest of the stack. |
| 20 |
* |
| 21 |
* @author Roel Harbers <[email protected]> |
| 22 |
*/ |
| 23 |
class NoopHandler extends Handler |
| 24 |
{ |
| 25 |
/** |
| 26 |
* {@inheritDoc} |
| 27 |
*/ |
| 28 |
public function isHandling(array $record): bool |
| 29 |
{ |
| 30 |
return \true; |
| 31 |
} |
| 32 |
/** |
| 33 |
* {@inheritDoc} |
| 34 |
*/ |
| 35 |
public function handle(array $record): bool |
| 36 |
{ |
| 37 |
return \false; |
| 38 |
} |
| 39 |
} |
| 40 |
|