Skip to content

Commit

Permalink
Merge pull request #4 from Treblle/feature/server-hostname
Browse files Browse the repository at this point in the history
feature: adding server hostname
  • Loading branch information
JustSteveKing authored Sep 26, 2024
2 parents 70a19c3 + d90cefe commit 8a8d837
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/DataObjects/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ final class Server
* @param null|string $protocol The HTTP protocol used
* @param null|OS $os The OS object
* @param null|string $encoding
* @param null|string $hostname
*/
public function __construct(
public null|string $ip,
Expand All @@ -23,6 +24,7 @@ public function __construct(
public null|string $protocol,
public null|OS $os,
public null|string $encoding,
public null|string $hostname,
) {
}

Expand All @@ -38,7 +40,8 @@ public function __construct(
* release: null|string,
* architecture: null|string
* }|null,
* encoding: null|string
* encoding: null|string,
* hostname: null|string
* }
*/
public function __toArray(): array
Expand All @@ -51,6 +54,7 @@ public function __toArray(): array
'protocol' => $this->protocol,
'os' => $this->os?->__toArray(),
'encoding' => $this->encoding,
'hostname' => $this->hostname,
];
}
}

0 comments on commit 8a8d837

Please sign in to comment.