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
+2 -2
View File
@@ -533,7 +533,7 @@ class manager {
* @param int|null $newmodelid A new model to add to the list of models with insights in the provided context.
* @return int[]
*/
public static function cached_models_with_insights(\context $context, int $newmodelid = null) {
public static function cached_models_with_insights(\context $context, ?int $newmodelid = null) {
$cache = \cache::make('core', 'contextwithinsights');
$modelids = $cache->get($context->id);
@@ -941,7 +941,7 @@ class manager {
* @param string|null $query
* @return array Associative array with contextid as key and the short version of the context name as value.
*/
public static function get_potential_context_restrictions(?array $contextlevels = null, string $query = null) {
public static function get_potential_context_restrictions(?array $contextlevels = null, ?string $query = null) {
global $DB;
if (empty($contextlevels) && !is_null($contextlevels)) {