| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function process(\Throwable $t, array $context): array |
||
| 19 | { |
||
| 20 | $common = [ |
||
| 21 | Context::APP => [ |
||
| 22 | 'os' => php_uname(), |
||
| 23 | 'language' => 'PHP '.phpversion(), |
||
| 24 | ], |
||
| 25 | ]; |
||
| 26 | |||
| 27 | if (($hostname = gethostname()) !== false) { |
||
| 28 | $common[Context::APP]['hostname'] = $hostname; |
||
| 29 | } |
||
| 30 | |||
| 31 | return array_replace_recursive($common, $context); |
||
| 32 | } |
||
| 33 | } |
||
| 34 |