| Total Complexity | 5 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 92.31% |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | final class PirateLogger implements PirateLoggerInterface |
||
| 15 | { |
||
| 16 | 2 | private ?Logger $logger = null; |
|
| 17 | |||
| 18 | 2 | public function __construct( |
|
| 22 | |||
| 23 | 2 | #[Override] |
|
| 24 | public function initRotating(): void |
||
| 25 | { |
||
| 26 | 1 | $this->logger = new Logger('KAZON'); |
|
| 27 | $this->logger->pushHandler( |
||
| 28 | new RotatingFileHandler( |
||
| 29 | 1 | $this->stuConfig->getGameSettings()->getPirateSettings()->getPirateLogfilePath() |
|
| 30 | ), |
||
| 31 | ); |
||
| 32 | } |
||
| 33 | 1 | ||
| 34 | #[Override] |
||
| 35 | public function log(string $message): void |
||
| 36 | 1 | { |
|
| 37 | if ($this->logger === null) { |
||
| 38 | throw new RuntimeException('logger has not been initialized'); |
||
| 39 | 1 | } |
|
| 40 | 1 | ||
| 41 | 1 | $method = LoggerEnum::LEVEL_METHODS[LoggerEnum::LEVEL_INFO]; |
|
| 42 | 1 | $this->logger->$method( |
|
| 43 | $this->parser->parse($message)->getAsText() |
||
| 44 | ); |
||
| 45 | } |
||
| 46 | |||
| 47 | #[Override] |
||
| 53 | )); |
||
| 54 | } |
||
| 55 | } |
||
| 56 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths