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