Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: adding server hostname #4

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
];
}
}
Loading