Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3.0416 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | public function __invoke(LogRecord $record): LogRecord |
||
24 | 3 | { |
|
25 | foreach ($this->keys as $key) { |
||
26 | 3 | if (! array_key_exists($key, $record->toArray())) { |
|
27 | 3 | continue; |
|
28 | } |
||
29 | |||
30 | 3 | $record = $record->with(context: [$key => $record->toArray()[$key]] + $record->toArray()['context']); |
|
31 | } |
||
32 | |||
33 | 3 | return $record; |
|
34 | } |
||
36 |