| Total Complexity | 5 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | final class SlowRequestHandler extends HandlerWrapper |
||
| 22 | { |
||
| 23 | private $thresholdMs; |
||
| 24 | private $level; |
||
| 25 | |||
| 26 | public function __construct(HandlerInterface $handler, int $thresholdMs, int $level = Logger::WARNING) |
||
| 27 | { |
||
| 28 | parent::__construct($handler); |
||
| 29 | |||
| 30 | $this->thresholdMs = $thresholdMs; |
||
| 31 | $this->level = $level; |
||
| 32 | } |
||
| 33 | |||
| 34 | public function isHandling(array $record) : bool |
||
| 35 | { |
||
| 36 | // capture all levels |
||
| 37 | return true; |
||
| 38 | } |
||
| 39 | |||
| 40 | public function handle(array $record) : bool |
||
| 58 | } |
||
| 59 | } |
||
| 60 |