| Total Complexity | 3 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Coverage | 62.5% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class CommandHandlerLogger |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var LoggerInterface |
||
| 22 | */ |
||
| 23 | protected LoggerInterface $logger; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Logger constructor. |
||
| 27 | * |
||
| 28 | * @param LoggerInterface $logger |
||
| 29 | */ |
||
| 30 | 36 | public function __construct(LoggerInterface $logger) |
|
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param CommandHandler $commandHandler |
||
| 37 | * @param string $message |
||
| 38 | * @param string $level |
||
| 39 | */ |
||
| 40 | 32 | public function log(CommandHandler $commandHandler, string $message, string $level = 'info'): void |
|
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param Exception $exception |
||
| 48 | * |
||
| 49 | * @return bool |
||
| 50 | */ |
||
| 51 | public function logExceptionAndReturnFalse(Exception $exception): bool |
||
| 58 |