username = trim($username); $this->serverId = trim($serverId); } public function getUsername(): string { return $this->username; } public function getServerId(): string { return $this->serverId; } public function validate(): bool { return $this->username !== '' && $this->serverId !== ''; } }