diff --git a/public/main/gradebook/lib/be/category.class.php b/public/main/gradebook/lib/be/category.class.php index cbde600301..e0cc2b264c 100644 --- a/public/main/gradebook/lib/be/category.class.php +++ b/public/main/gradebook/lib/be/category.class.php @@ -45,7 +45,7 @@ class Category implements GradebookItem { $this->id = 0; $this->name = null; - $this->description = null; + $this->description = ''; $this->user_id = 0; $this->course_code = ''; $this->courseId = 0; diff --git a/src/CoreBundle/Entity/GradebookCategory.php b/src/CoreBundle/Entity/GradebookCategory.php index 1adb86dabf..ce444ccd38 100644 --- a/src/CoreBundle/Entity/GradebookCategory.php +++ b/src/CoreBundle/Entity/GradebookCategory.php @@ -211,7 +211,7 @@ class GradebookCategory /** * Set description. */ - public function setDescription(string $description): self + public function setDescription(?string $description): self { $this->description = $description; diff --git a/src/CoreBundle/Entity/GradebookEvaluation.php b/src/CoreBundle/Entity/GradebookEvaluation.php index e1410c0c15..15208aeb67 100644 --- a/src/CoreBundle/Entity/GradebookEvaluation.php +++ b/src/CoreBundle/Entity/GradebookEvaluation.php @@ -134,9 +134,6 @@ class GradebookEvaluation */ protected $userScoreList; - /** - * GradebookEvaluation constructor. - */ public function __construct() { $this->locked = 0; @@ -168,12 +165,8 @@ class GradebookEvaluation /** * Set description. - * - * @param string $description - * - * @return GradebookEvaluation */ - public function setDescription($description) + public function setDescription(?string $description): self { $this->description = $description;