Skip to content

Commit 3eb0a65

Browse files
authored
Change name property to be nullable in DTO
1 parent 7732869 commit 3eb0a65

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/DTO/UserRepresentationDTO.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function __construct(
1818
public string $id,
1919
public string $username,
2020
public bool $emailVerified,
21-
public string $name,
21+
public ?string $name,
2222
public ?string $firstName,
2323
public ?string $lastName,
2424
public string $email,
@@ -85,7 +85,7 @@ public static function fromArray(array $data, ?string $client_id = null): self
8585
id: $data['sub'],
8686
username: $data['preferred_username'],
8787
emailVerified: $data['email_verified'],
88-
name: $data['name'],
88+
name: $data['name'] ?? null,
8989
firstName: $data['given_name'] ?? null,
9090
lastName: $data['family_name'] ?? null,
9191
email: $data['email'],

0 commit comments

Comments
 (0)