| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | public function __invoke(array $record): array |
||
| 35 | { |
||
| 36 | if ($this->userAgent) { |
||
| 37 | $record['contexts']['browser'] = [ |
||
| 38 | 'name' => $this->userAgent->getBrowseName(), |
||
| 39 | 'version' => $this->userAgent->getBrowserVersion(), |
||
| 40 | ]; |
||
| 41 | $record['contexts']['os'] = ['name' => $this->userAgent->getPlatform()]; |
||
| 42 | } |
||
| 43 | |||
| 44 | return $record; |
||
| 45 | } |
||
| 55 |