| Total Complexity | 4 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | final class LogFactory implements LogsInterface |
||
| 21 | { |
||
| 22 | /** @var ListenerRegistryInterface */ |
||
| 23 | private $listenedRegistry; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param ListenerRegistryInterface $listenedRegistry |
||
| 27 | */ |
||
| 28 | public function __construct(ListenerRegistryInterface $listenedRegistry) |
||
| 29 | { |
||
| 30 | $this->listenedRegistry = $listenedRegistry; |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param string $channel |
||
| 35 | * @return LoggerInterface |
||
| 36 | */ |
||
| 37 | public function getLogger(string $channel): LoggerInterface |
||
| 38 | { |
||
| 39 | return new NullLogger([$this, 'log'], $channel); |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param string $channel |
||
| 44 | * @param mixed $level |
||
| 45 | * @param string $message |
||
| 46 | * @param array $context |
||
| 47 | */ |
||
| 48 | public function log($channel, $level, $message, array $context = []): void |
||
| 60 | } |
||
| 61 | } |
||
| 62 | } |
||
| 63 |