| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | public function __construct(public readonly int $userId, public readonly mixed $sessionId, public readonly ?string $userAgent, |
||
| 12 | public readonly DateTimeImmutable $startedAt, public readonly ?string $ipAddress, public readonly bool $isCurrentSession) { |
||
| 13 | if($this->userAgent !== null) { |
||
| 14 | $info = @get_browser($this->userAgent, true); |
||
| 15 | |||
| 16 | if($info === false) { |
||
| 17 | $this->browserInfo = [ ]; |
||
|
|
|||
| 18 | } else { |
||
| 19 | $this->browserInfo = $info; |
||
| 20 | } |
||
| 21 | } else { |
||
| 22 | $this->browserInfo = [ ]; |
||
| 23 | } |
||
| 25 | } |