Conditions | 5 |
Paths | 6 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 0 |
1 | <?php |
||
50 | public function __invoke(array $record) |
||
51 | { |
||
52 | if (null !== $this->host) { |
||
53 | $record['host'] = $this->host; |
||
54 | } |
||
55 | |||
56 | if (!empty($this->env)) { |
||
57 | $record['context']['env'] = $this->env; |
||
58 | |||
59 | if (!isset($record['host']) && isset($this->env['server_name'])) { |
||
60 | $record['host'] = $this->env['server_name']; |
||
61 | } |
||
62 | } |
||
63 | |||
64 | return $record; |
||
65 | } |
||
67 |