From 87dca24f3bc3c4dc897f1e885a70b82e2d0d5fab Mon Sep 17 00:00:00 2001 From: Irina Hoppe Date: Mon, 24 Jun 2024 09:55:28 +0200 Subject: [PATCH] remove union type for nullable type declaration --- strategy/strategy03_lickert.php | 2 +- tests/generator/lib.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/strategy/strategy03_lickert.php b/strategy/strategy03_lickert.php index db9ffd04..fcc65087 100644 --- a/strategy/strategy03_lickert.php +++ b/strategy/strategy03_lickert.php @@ -60,7 +60,7 @@ class strategy extends \strategytemplate_options { * @param array|null $strategysettings * @throws \coding_exception */ - public function __construct(?array $strategysettings) { + public function __construct(?array $strategysettings = null) { parent::__construct($strategysettings); if (isset($strategysettings) && array_key_exists(self::COUNTLICKERT, $strategysettings)) { $this->maxlickert = $strategysettings[self::COUNTLICKERT]; diff --git a/tests/generator/lib.php b/tests/generator/lib.php index 9b7bd5f0..65663a30 100644 --- a/tests/generator/lib.php +++ b/tests/generator/lib.php @@ -66,8 +66,8 @@ public function create_instance($record = null, array $options = null) { * @param null|array $options general options for ratingallocate * @return stdClass record from ratingallocate */ - public static function create_instance_with_choices(advanced_testcase $tc, array|stdClass|null $moduledata = null, - array|stdClass|null $choicedata = null, ?array $options = null) { + public static function create_instance_with_choices(advanced_testcase $tc, $moduledata = null, + $choicedata = null, ?array $options = null) { if ($choicedata === null) { $choicedata = self::get_default_choice_data(); }