|
@@ -33,7 +33,7 @@ class Product
|
|
|
|
|
|
* @ORM\Column(type="text"))
|
|
|
*/
|
|
|
- private $description;
|
|
|
+ private $description = '';
|
|
|
|
|
|
|
|
|
* @ORM\Id
|
|
@@ -55,7 +55,7 @@ class Product
|
|
|
|
|
|
* @return \App\Entity\Category
|
|
|
*/
|
|
|
- public function getCategory(): Category {
|
|
|
+ public function getCategory(): ?Category {
|
|
|
return $this->category;
|
|
|
}
|
|
|
|
|
@@ -67,9 +67,9 @@ class Product
|
|
|
}
|
|
|
|
|
|
|
|
|
- * @return int
|
|
|
+ * @return int|null
|
|
|
*/
|
|
|
- public function getId(): int {
|
|
|
+ public function getId(): ?int {
|
|
|
return $this->id;
|
|
|
}
|
|
|
|
|
@@ -92,7 +92,7 @@ class Product
|
|
|
*
|
|
|
* @return \App\Entity\Product
|
|
|
*/
|
|
|
- public function setCategory(Category $category): self {
|
|
|
+ public function setCategory(?Category $category = null): self {
|
|
|
$this->category = $category;
|
|
|
return $this;
|
|
|
}
|