forked from SymfonyCasts/symfony-ux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpre-turbo-making-entity-setters-relaxed.diff
44 lines (36 loc) · 1.15 KB
/
pre-turbo-making-entity-setters-relaxed.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
diff --git a/src/Entity/Product.php b/src/Entity/Product.php
index c160e54..ca28409 100644
--- a/src/Entity/Product.php
+++ b/src/Entity/Product.php
@@ -98,7 +98,7 @@ class Product
return $this->name;
}
- public function setName(string $name): self
+ public function setName(?string $name): self
{
$this->name = $name;
@@ -122,7 +122,7 @@ class Product
return $this->brand;
}
- public function setBrand(string $brand): self
+ public function setBrand(?string $brand): self
{
$this->brand = $brand;
diff --git a/src/Entity/Review.php b/src/Entity/Review.php
index 418b4a0..f411062 100644
--- a/src/Entity/Review.php
+++ b/src/Entity/Review.php
@@ -70,7 +70,7 @@ class Review
return substr($this->content, 0, 50).'...';
}
- public function setContent(string $content): self
+ public function setContent(?string $content): self
{
$this->content = $content;
@@ -92,7 +92,7 @@ class Review
return $this->stars;
}
- public function setStars(int $stars): self
+ public function setStars(?int $stars): self
{
$this->stars = $stars;