MDL-77350 calendar: Added class properties that are not declared

In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
This commit is contained in:
Meirza 2023-01-21 00:11:33 +07:00
parent 0d3a840154
commit 00bea84ed6
2 changed files with 16 additions and 4 deletions

View File

@ -1066,6 +1066,18 @@ class calendar_information {
/** @var string The calendar's view mode. */
protected $viewmode;
/** @var \stdClass course data. */
public $course;
/** @var int day. */
protected $day;
/** @var int month. */
protected $month;
/** @var int year. */
protected $year;
/**
* Creates a new instance
*

View File

@ -75,7 +75,10 @@ class event_factory_test extends \advanced_testcase {
}
if ($expectedattributevalue) {
$this->assertEquals($instance->testattribute, $expectedattributevalue);
$this->assertEquals(
$instance->get_description()->get_value(),
$expectedattributevalue
);
}
}
@ -368,7 +371,6 @@ class event_factory_test extends \advanced_testcase {
'location' => 'Test location',
],
'actioncallbackapplier' => function(event_interface $event) {
$event->testattribute = 'Hello';
return $event;
},
'visibilitycallbackapplier' => function(event_interface $event) {
@ -403,7 +405,6 @@ class event_factory_test extends \advanced_testcase {
'location' => 'Test location',
],
'actioncallbackapplier' => function(event_interface $event) {
$event->testattribute = 'Hello';
return $event;
},
'visibilitycallbackapplier' => function(event_interface $event) {
@ -438,7 +439,6 @@ class event_factory_test extends \advanced_testcase {
'location' => 'Test location',
],
'actioncallbackapplier' => function(event_interface $event) {
$event->testattribute = 'Hello';
return $event;
},
'visibilitycallbackapplier' => function(event_interface $event) {