MDL-71439 core_grades: remove returning null when not possible

The method explicitly declares 'stdClass' as the return type.
This commit is contained in:
Mark Nelson 2021-06-17 17:25:21 +08:00
parent 2b2897bf10
commit 2e1c282ef6

View File

@ -377,9 +377,7 @@ abstract class component_gradeitem {
public function get_grade(int $gradeid): stdClass {
global $DB;
$grade = $DB->get_record($this->get_table_name(), ['id' => $gradeid]);
return $grade ?: null;
return $DB->get_record($this->get_table_name(), ['id' => $gradeid]);
}
/**