| Conditions | 7 |
| Paths | 4 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 7.049 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 26 | 3 | public function __invoke(array $record) |
|
| 27 | { |
||
| 28 | 3 | if (isset($record['context']['exception']) && $record['context']['exception'] instanceof Throwable) { |
|
| 29 | 1 | $record['extra']['trace'] = $record['context']['exception']->getTrace(); |
|
| 30 | 1 | foreach ($record['extra']['trace'] as $index => $line) { |
|
| 31 | 1 | if (!isset($line['args'])) { |
|
| 32 | continue; |
||
| 33 | } |
||
| 34 | |||
| 35 | 1 | unset($record['extra']['trace'][$index]['args']); |
|
| 36 | } |
||
| 37 | } |
||
| 38 | |||
| 39 | 3 | if ($this->always && !isset($record['extra']['trace'])) { |
|
| 40 | 1 | $record['extra']['trace'] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); |
|
| 41 | } |
||
| 42 | |||
| 43 | 3 | return $record; |
|
| 44 | } |
||
| 45 | } |
||
| 46 |