Skip to content

Commit fdeb741

Browse files
committed
bug #1179 Update setters (seb-jean)
This PR was merged into the main branch. Discussion ---------- Update setters Hi, I updated setters because there is error : `Expected argument of type "string", "null" given at property path "title". ` Commits ------- e1ba676 Update Post.php
2 parents 1035980 + e1ba676 commit fdeb741

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Entity/Post.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function getTitle(): ?string
132132
return $this->title;
133133
}
134134

135-
public function setTitle(string $title): void
135+
public function setTitle(?string $title): void
136136
{
137137
$this->title = $title;
138138
}
@@ -152,7 +152,7 @@ public function getContent(): ?string
152152
return $this->content;
153153
}
154154

155-
public function setContent(string $content): void
155+
public function setContent(?string $content): void
156156
{
157157
$this->content = $content;
158158
}
@@ -200,7 +200,7 @@ public function getSummary(): ?string
200200
return $this->summary;
201201
}
202202

203-
public function setSummary(string $summary): void
203+
public function setSummary(?string $summary): void
204204
{
205205
$this->summary = $summary;
206206
}

0 commit comments

Comments
 (0)