Conditions | 6 |
Paths | 4 |
Total Lines | 19 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
13 | public function __invoke(array $record) |
||
14 | { |
||
15 | if (isset($record['context']['exception']) && $record['context']['exception'] instanceof Throwable) { |
||
16 | $record['extra']['trace'] = $record['context']['exception']->getTrace(DEBUG_BACKTRACE_IGNORE_ARGS); |
||
17 | foreach ($record['extra']['trace'] as $index => $line) { |
||
18 | if (!isset($line['args'])) { |
||
19 | continue; |
||
20 | } |
||
21 | |||
22 | unset($record['extra']['trace'][$index]['args']); |
||
23 | } |
||
24 | } |
||
25 | |||
26 | if (!isset($record['extra']['trace'])) { |
||
27 | $record['extra']['trace'] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); |
||
28 | } |
||
29 | |||
30 | return $record; |
||
31 | } |
||
32 | } |
||
33 |