| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function __invoke(array $record) |
||
| 31 | { |
||
| 32 | if (!isset($record['context']['exception'])) { |
||
| 33 | return $record; |
||
| 34 | } |
||
| 35 | |||
| 36 | // Symfony 3 triggers this processor with SilencedErrorContext objects |
||
| 37 | // in case of PHP errors (deprecation notices, errors, etc). We should |
||
| 38 | // only generate Art codes for exceptions. |
||
| 39 | if (!$record['context']['exception'] instanceof Exception) { |
||
| 40 | return $record; |
||
| 41 | } |
||
| 42 | |||
| 43 | $record['extra']['art'] = Art::forException($record['context']['exception']); |
||
| 44 | |||
| 45 | return $record; |
||
| 46 | } |
||
| 47 | } |
||
| 48 |