| Total Complexity | 4 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 50% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | final class PirateLogger implements PirateLoggerInterface |
||
| 14 | { |
||
| 15 | private ?Logger $logger = null; |
||
| 16 | |||
| 17 | 1 | public function __construct( |
|
| 18 | private StuConfigInterface $stuConfig, |
||
| 19 | private Parser $parser |
||
| 20 | ) { |
||
| 21 | 1 | } |
|
| 22 | |||
| 23 | 1 | #[Override] |
|
| 24 | public function initRotating(): void |
||
| 25 | { |
||
| 26 | 1 | $this->logger = new Logger('KAZON'); |
|
| 27 | 1 | $this->logger->pushHandler( |
|
| 28 | 1 | new RotatingFileHandler( |
|
| 29 | 1 | $this->stuConfig->getGameSettings()->getPirateLogfilePath() |
|
| 30 | 1 | ), |
|
| 31 | 1 | ); |
|
| 32 | } |
||
| 33 | |||
| 34 | #[Override] |
||
| 35 | public function log(string $message): void |
||
| 36 | { |
||
| 37 | $method = LoggerEnum::LEVEL_METHODS[LoggerEnum::LEVEL_INFO]; |
||
| 38 | $this->logger->$method( |
||
| 39 | $this->parser->parse($message)->getAsText() |
||
| 40 | ); |
||
| 41 | } |
||
| 42 | |||
| 43 | #[Override] |
||
| 49 | )); |
||
| 50 | } |
||
| 51 | } |
||
| 52 |
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