Skip to content

Commit

Permalink
remove union type for nullable type declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
irinahpe committed Jun 24, 2024
1 parent 732050a commit 87dca24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion strategy/strategy03_lickert.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
4 changes: 2 additions & 2 deletions tests/generator/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 87dca24

Please sign in to comment.