Conditions | 4 |
Paths | 8 |
Total Lines | 6 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 4.128 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | 60 | public function log($level, $message, array $context = []): void |
|
33 | { |
||
34 | 60 | $stream = LogLevel::DEBUG === $level || LogLevel::INFO === $level ? \STDOUT : \STDERR; |
|
35 | 60 | fwrite($stream, '[' . strtoupper($level) . '] ' . $message . \PHP_EOL); |
|
36 | 60 | if (!empty($context)) { |
|
37 | fwrite($stream, var_export($context, true) . \PHP_EOL); |
||
38 | } |
||
41 |