Skip to content

Commit a505462

Browse files
committed
Allow password and comments for StreamerDto to be null - fixes #15
1 parent 12c1442 commit a505462

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/Dto/StreamerDto.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class StreamerDto implements JsonSerializable
1818
protected $username;
1919

2020
/**
21-
* @var string
21+
* @var string|null
2222
*/
2323
protected $password;
2424

@@ -28,7 +28,7 @@ class StreamerDto implements JsonSerializable
2828
protected $displayName;
2929

3030
/**
31-
* @var string
31+
* @var string|null
3232
*/
3333
protected $comments;
3434

@@ -45,18 +45,18 @@ class StreamerDto implements JsonSerializable
4545
/**
4646
* @param int $id
4747
* @param string $username
48-
* @param string $password
48+
* @param string|null $password
4949
* @param string $displayName
50-
* @param string $comments
50+
* @param string|null $comments
5151
* @param bool $isActive
5252
* @param LinksDto $links
5353
*/
5454
public function __construct(
5555
int $id,
5656
string $username,
57-
string $password,
57+
?string $password,
5858
string $displayName,
59-
string $comments,
59+
?string $comments,
6060
bool $isActive,
6161
LinksDto $links
6262
) {
@@ -110,19 +110,19 @@ function setUsername(string $username): StreamerDto
110110
}
111111

112112
/**
113-
* @return string
113+
* @return string|null
114114
*/
115-
function getPassword(): string
115+
function getPassword(): ?string
116116
{
117117
return $this->password;
118118
}
119119

120120
/**
121-
* @param string $password
121+
* @param string|null $password
122122
*
123123
* @return StreamerDto
124124
*/
125-
function setPassword(string $password): StreamerDto
125+
function setPassword(?string $password): StreamerDto
126126
{
127127
$this->password = $password;
128128

@@ -150,19 +150,19 @@ function setDisplayName(string $displayName): StreamerDto
150150
}
151151

152152
/**
153-
* @return string
153+
* @return string|null
154154
*/
155-
function getComments(): string
155+
function getComments(): ?string
156156
{
157157
return $this->comments;
158158
}
159159

160160
/**
161-
* @param string $comments
161+
* @param string|null $comments
162162
*
163163
* @return StreamerDto
164164
*/
165-
function setComments(string $comments): StreamerDto
165+
function setComments(?string $comments): StreamerDto
166166
{
167167
$this->comments = $comments;
168168

0 commit comments

Comments
 (0)