Total Complexity | 6 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | class LogCall { |
||
16 | |||
17 | private const ERROR_LEVELS = [ LogLevel::ERROR, LogLevel::CRITICAL, LogLevel::ALERT, LogLevel::EMERGENCY ]; |
||
18 | |||
19 | private mixed $level; |
||
20 | private string $message; |
||
21 | private array $context; |
||
22 | |||
23 | public function __construct( mixed $level, string $message, array $context = [] ) { |
||
24 | 4 | $this->level = $level; |
|
25 | 4 | $this->message = $message; |
|
26 | 4 | $this->context = $context; |
|
27 | 4 | } |
|
28 | 4 | ||
29 | public function getLevel(): mixed { |
||
31 | } |
||
32 | |||
33 | 1 | public function getMessage(): string { |
|
35 | } |
||
36 | |||
37 | 2 | public function getContext(): array { |
|
39 | } |
||
40 | |||
41 | 1 | /** |
|
42 | 1 | * Returns if the log level is error or above. |
|
43 | * @since 3.2 |
||
44 | */ |
||
45 | public function isError(): bool { |
||
46 | return in_array( $this->level, self::ERROR_LEVELS ); |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * @since 3.2 |
||
51 | */ |
||
52 | public function withoutContext(): self { |
||
54 | } |
||
55 | |||
56 | } |
||
57 |