mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +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
b8e5f7b428
commit
ea996d378b
1 changed files with 1 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue