| Total Complexity | 2 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 94.12% |
| Changes | 7 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | abstract class AbstractLogglyLogger extends AbstractLogger |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @param string $level |
||
| 18 | * @param array<mixed> $context |
||
| 19 | 26 | * |
|
| 20 | * @phpstan-ignore-next-line |
||
| 21 | 26 | * @psalm-suppress MoreSpecificImplementedParamType |
|
| 22 | 24 | */ |
|
| 23 | 24 | final public function log($level, string|Stringable $message, array $context = []): void // phpcs:disabled |
|
| 24 | { |
||
| 25 | 24 | checkCorrectLogLevel($level); |
|
| 26 | $this->send( |
||
| 27 | $this->format($level, $message, $context) |
||
| 28 | ); |
||
| 29 | 24 | } |
|
| 30 | |||
| 31 | 24 | abstract protected function send(string $data): void; |
|
| 32 | 24 | ||
| 33 | 24 | /** |
|
| 34 | 24 | * @param array<mixed> $context |
|
| 35 | 24 | */ |
|
| 36 | 24 | final protected function format(string $level, string|Stringable $message, array $context): string |
|
| 48 | ]); |
||
| 49 | 4 | } |
|
| 51 |