Skip to content

Commit 8a8d837

Browse files
Merge pull request #4 from Treblle/feature/server-hostname
feature: adding server hostname
2 parents 70a19c3 + d90cefe commit 8a8d837

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/DataObjects/Server.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ final class Server
1414
* @param null|string $protocol The HTTP protocol used
1515
* @param null|OS $os The OS object
1616
* @param null|string $encoding
17+
* @param null|string $hostname
1718
*/
1819
public function __construct(
1920
public null|string $ip,
@@ -23,6 +24,7 @@ public function __construct(
2324
public null|string $protocol,
2425
public null|OS $os,
2526
public null|string $encoding,
27+
public null|string $hostname,
2628
) {
2729
}
2830

@@ -38,7 +40,8 @@ public function __construct(
3840
* release: null|string,
3941
* architecture: null|string
4042
* }|null,
41-
* encoding: null|string
43+
* encoding: null|string,
44+
* hostname: null|string
4245
* }
4346
*/
4447
public function __toArray(): array
@@ -51,6 +54,7 @@ public function __toArray(): array
5154
'protocol' => $this->protocol,
5255
'os' => $this->os?->__toArray(),
5356
'encoding' => $this->encoding,
57+
'hostname' => $this->hostname,
5458
];
5559
}
5660
}

0 commit comments

Comments
 (0)