| Total Complexity | 2 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class Db extends AbstractWriter |
||
| 12 | { |
||
| 13 | 1 | public function __construct(private readonly LogRepository $logRepository, private readonly EventCompleter $eventCompleter, $options = null) |
|
|
|
|||
| 14 | { |
||
| 15 | 1 | parent::__construct($options); |
|
| 16 | 1 | } |
|
| 17 | |||
| 18 | /** |
||
| 19 | * Write a message to the log. |
||
| 20 | * |
||
| 21 | * @param array $event log data event |
||
| 22 | */ |
||
| 23 | 1 | final protected function doWrite(array $event): void |
|
| 24 | { |
||
| 25 | 1 | $completedEvent = $this->eventCompleter->process($event); |
|
| 26 | 1 | $this->logRepository->log($completedEvent); |
|
| 27 | 1 | } |
|
| 28 | } |
||
| 29 |