| Total Complexity | 8 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | class MonologLogger implements LoggerInterface |
||
| 19 | { |
||
| 20 | private static $ignoreProperties = array('description', 'id', 'level'); |
||
| 21 | |||
| 22 | public function __construct(private \Psr\Log\LoggerInterface $logger) |
||
| 23 | { |
||
| 24 | } |
||
| 25 | |||
| 26 | #[\Override] |
||
| 27 | public function log(AuditLog $event = null) |
||
| 28 | { |
||
| 29 | if (null === $event) { |
||
| 30 | return; |
||
| 31 | } |
||
| 32 | |||
| 33 | $this->logger->log($event->getLevel(), $event->getDescription(), $this->getContextArray($event)); |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param \ReflectionObject $refObject |
||
| 38 | * |
||
| 39 | * @return ReflectionProperty[] |
||
| 40 | */ |
||
| 41 | protected function getAllProperties(\ReflectionObject $refObject) |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param AuditLog $event |
||
| 48 | * |
||
| 49 | * @return array |
||
| 50 | */ |
||
| 51 | protected function getContextArray(AuditLog $event) |
||
| 70 |