Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
9 / 9 |
|
100.00% |
9 / 9 |
CRAP | |
100.00% |
1 / 1 |
| NullLogger | |
100.00% |
9 / 9 |
|
100.00% |
9 / 9 |
9 | |
100.00% |
1 / 1 |
| emergency | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| alert | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| critical | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| error | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| warning | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| notice | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| info | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| debug | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| log | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | // ╔════════════════════════════════════════════════════════════╗ |
| 4 | // ║ MIT Licence (#Expat) - https://opensource.org/licenses/MIT ║ |
| 5 | // ║ Copyright 2026 Frederic Poeydomenge <dyno@phexium.com> ║ |
| 6 | // ╚════════════════════════════════════════════════════════════╝ |
| 7 | |
| 8 | declare(strict_types=1); |
| 9 | |
| 10 | namespace Phexium\Plugin\Logger\Adapter; |
| 11 | |
| 12 | use Override; |
| 13 | use Phexium\Plugin\Logger\Port\LoggerInterface; |
| 14 | use Stringable; |
| 15 | |
| 16 | final readonly class NullLogger implements LoggerInterface |
| 17 | { |
| 18 | #[Override] |
| 19 | public function emergency(string|Stringable $message, array $context = []): void |
| 20 | { |
| 21 | // Null Object pattern: intentionally does nothing |
| 22 | } |
| 23 | |
| 24 | #[Override] |
| 25 | public function alert(string|Stringable $message, array $context = []): void |
| 26 | { |
| 27 | // Null Object pattern: intentionally does nothing |
| 28 | } |
| 29 | |
| 30 | #[Override] |
| 31 | public function critical(string|Stringable $message, array $context = []): void |
| 32 | { |
| 33 | // Null Object pattern: intentionally does nothing |
| 34 | } |
| 35 | |
| 36 | #[Override] |
| 37 | public function error(string|Stringable $message, array $context = []): void |
| 38 | { |
| 39 | // Null Object pattern: intentionally does nothing |
| 40 | } |
| 41 | |
| 42 | #[Override] |
| 43 | public function warning(string|Stringable $message, array $context = []): void |
| 44 | { |
| 45 | // Null Object pattern: intentionally does nothing |
| 46 | } |
| 47 | |
| 48 | #[Override] |
| 49 | public function notice(string|Stringable $message, array $context = []): void |
| 50 | { |
| 51 | // Null Object pattern: intentionally does nothing |
| 52 | } |
| 53 | |
| 54 | #[Override] |
| 55 | public function info(string|Stringable $message, array $context = []): void |
| 56 | { |
| 57 | // Null Object pattern: intentionally does nothing |
| 58 | } |
| 59 | |
| 60 | #[Override] |
| 61 | public function debug(string|Stringable $message, array $context = []): void |
| 62 | { |
| 63 | // Null Object pattern: intentionally does nothing |
| 64 | } |
| 65 | |
| 66 | #[Override] |
| 67 | public function log($level, string|Stringable $message, array $context = []): void |
| 68 | { |
| 69 | // Null Object pattern: intentionally does nothing |
| 70 | } |
| 71 | } |