Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 1 |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | 9 | public function log(mixed $level, string | Stringable $message, array $context = []): void |
|
35 | { |
||
36 | 9 | $text = $this->interpolate($message, $context); |
|
37 | 9 | $jsMethod = match ($level) { |
|
38 | 1 | LogLevel::ERROR => 'error', |
|
39 | 1 | LogLevel::DEBUG => 'debug', |
|
40 | 1 | LogLevel::INFO => 'info', |
|
41 | 1 | LogLevel::WARNING => 'warn', |
|
42 | 5 | default => 'log', |
|
43 | }; |
||
44 | |||
45 | 9 | echo "<script>".printf( |
|
46 | "console.%s('%s [%s] %s');", |
||
47 | $jsMethod, |
||
48 | 9 | date('y-m-d H:i:s'), |
|
49 | $level, |
||
50 | 9 | $this->stringFormat($text), |
|
51 | )."</script>"; |
||
52 | } |
||
62 |
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