| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | #[Override] |
||
| 26 | public function get(): Logger |
||
| 27 | { |
||
| 28 | $format = "[%datetime%] %level_name%: %message% %context%\n"; |
||
| 29 | $stream = new StreamHandler($this->appMeta->logDir . '/app.log'); |
||
| 30 | $stream->setFormatter(new LineFormatter($format)); |
||
| 31 | |||
| 32 | return new Logger($this->appMeta->name, [$stream]); |
||
|
|
|||
| 33 | } |
||
| 35 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: