mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-71439 core_grades: remove returning null when not possible
The method explicitly declares 'stdClass' as the return type.
This commit is contained in:
parent
2b2897bf10
commit
2e1c282ef6
@ -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]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user