MDL-81634 core: Fix all implicitly defined nullables

Note: This does not impact third-party libraries.
This commit is contained in:
Andrew Nicols
2024-08-02 14:11:12 +08:00
parent 8a6e8563fd
commit 024e36be17
391 changed files with 782 additions and 782 deletions
@@ -49,8 +49,8 @@ class frontend extends \core_availability\frontend {
'label_cm', 'label_completion'];
}
protected function get_javascript_init_params($course, \cm_info $cm = null,
\section_info $section = null) {
protected function get_javascript_init_params($course, ?\cm_info $cm = null,
?\section_info $section = null) {
// Use cached result if available. The cache is just because we call it
// twice (once from allow_add) so it's nice to avoid doing all the
// print_string calls twice.
@@ -86,8 +86,8 @@ class frontend extends \core_availability\frontend {
return $this->cacheinitparams;
}
protected function allow_add($course, \cm_info $cm = null,
\section_info $section = null) {
protected function allow_add($course, ?\cm_info $cm = null,
?\section_info $section = null) {
global $CFG;
// Check if completion is enabled for the course.