Skip to content

Commit

Permalink
optional
Browse files Browse the repository at this point in the history
  • Loading branch information
ilzrv committed May 31, 2023
1 parent 0424d6e commit 8de26d4
Showing 1 changed file with 42 additions and 42 deletions.
84 changes: 42 additions & 42 deletions src/SteamUserDto.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ final class SteamUserDto
{
private function __construct(
private readonly string $steamId,
private readonly int $communityVisibilityState,
private readonly int $profileState,
private readonly string $personaName,
private readonly int $commentPermission,
private readonly string $profileUrl,
private readonly string $avatar,
private readonly string $avatarMedium,
private readonly string $avatarFull,
private readonly string $avatarHash,
private readonly ?int $communityVisibilityState,
private readonly ?int $profileState,
private readonly ?string $personaName,
private readonly ?int $commentPermission,
private readonly ?string $profileUrl,
private readonly ?string $avatar,
private readonly ?string $avatarMedium,
private readonly ?string $avatarFull,
private readonly ?string $avatarHash,
private readonly ?int $lastLogoff,
private readonly int $personaState,
private readonly string $primaryClanId,
private readonly int $timeCreated,
private readonly int $personaStateFlags,
private readonly string $locCountryCode,
private readonly ?int $personaState,
private readonly ?string $primaryClanId,
private readonly ?int $timeCreated,
private readonly ?int $personaStateFlags,
private readonly ?string $locCountryCode,
private readonly ?int $playerLevel,
) {
}
Expand All @@ -31,21 +31,21 @@ public static function create(array $data): self
{
return new self(
steamId: $data['steamid'],
communityVisibilityState: $data['communityvisibilitystate'],
profileState: $data['profilestate'],
personaName: $data['personaname'],
commentPermission: $data['commentpermission'],
profileUrl: $data['profileurl'],
avatar: $data['avatar'],
avatarMedium: $data['avatarmedium'],
avatarFull: $data['avatarfull'],
avatarHash: $data['avatarhash'],
communityVisibilityState: $data['communityvisibilitystate'] ?? null,
profileState: $data['profilestate'] ?? null,
personaName: $data['personaname'] ?? null,
commentPermission: $data['commentpermission'] ?? null,
profileUrl: $data['profileurl'] ?? null,
avatar: $data['avatar'] ?? null,
avatarMedium: $data['avatarmedium ?? null'],
avatarFull: $data['avatarfull'] ?? null,
avatarHash: $data['avatarhash'] ?? null,
lastLogoff: $data['lastlogoff'] ?? null,
personaState: $data['personastate'],
primaryClanId: $data['primaryclanid'],
timeCreated: $data['timecreated'],
personaStateFlags: $data['personastateflags'],
locCountryCode: $data['loccountrycode'],
personaState: $data['personastate'] ?? null,
primaryClanId: $data['primaryclanid'] ?? null,
timeCreated: $data['timecreated'] ?? null,
personaStateFlags: $data['personastateflags'] ?? null,
locCountryCode: $data['loccountrycode'] ?? null,
playerLevel: $data['player_level'] ?? null,
);
}
Expand All @@ -55,47 +55,47 @@ public function getSteamId(): string
return $this->steamId;
}

public function getCommunityVisibilityState(): int
public function getCommunityVisibilityState(): ?int
{
return $this->communityVisibilityState;
}

public function getProfileState(): int
public function getProfileState(): ?int
{
return $this->profileState;
}

public function getPersonaName(): string
public function getPersonaName(): ?string
{
return $this->personaName;
}

public function getCommentPermission(): int
public function getCommentPermission(): ?int
{
return $this->commentPermission;
}

public function getProfileUrl(): string
public function getProfileUrl(): ?string
{
return $this->profileUrl;
}

public function getAvatar(): string
public function getAvatar(): ?string
{
return $this->avatar;
}

public function getAvatarMedium(): string
public function getAvatarMedium(): ?string
{
return $this->avatarMedium;
}

public function getAvatarFull(): string
public function getAvatarFull(): ?string
{
return $this->avatarFull;
}

public function getAvatarHash(): string
public function getAvatarHash(): ?string
{
return $this->avatarHash;
}
Expand All @@ -105,27 +105,27 @@ public function getLastLogoff(): ?int
return $this->lastLogoff;
}

public function getPersonaState(): int
public function getPersonaState(): ?int
{
return $this->personaState;
}

public function getPrimaryClanId(): string
public function getPrimaryClanId(): ?string
{
return $this->primaryClanId;
}

public function getTimeCreated(): int
public function getTimeCreated(): ?int
{
return $this->timeCreated;
}

public function getPersonaStateFlags(): int
public function getPersonaStateFlags(): ?int
{
return $this->personaStateFlags;
}

public function getLocCountryCode(): string
public function getLocCountryCode(): ?string
{
return $this->locCountryCode;
}
Expand Down

0 comments on commit 8de26d4

Please sign in to comment.