mirror of
https://github.com/moodle/moodle.git
synced 2025-07-12 18:06:41 +02:00
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:
@ -1066,6 +1066,18 @@ class calendar_information {
|
|||||||
/** @var string The calendar's view mode. */
|
/** @var string The calendar's view mode. */
|
||||||
protected $viewmode;
|
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
|
* Creates a new instance
|
||||||
*
|
*
|
||||||
|
@ -75,7 +75,10 @@ class event_factory_test extends \advanced_testcase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($expectedattributevalue) {
|
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',
|
'location' => 'Test location',
|
||||||
],
|
],
|
||||||
'actioncallbackapplier' => function(event_interface $event) {
|
'actioncallbackapplier' => function(event_interface $event) {
|
||||||
$event->testattribute = 'Hello';
|
|
||||||
return $event;
|
return $event;
|
||||||
},
|
},
|
||||||
'visibilitycallbackapplier' => function(event_interface $event) {
|
'visibilitycallbackapplier' => function(event_interface $event) {
|
||||||
@ -403,7 +405,6 @@ class event_factory_test extends \advanced_testcase {
|
|||||||
'location' => 'Test location',
|
'location' => 'Test location',
|
||||||
],
|
],
|
||||||
'actioncallbackapplier' => function(event_interface $event) {
|
'actioncallbackapplier' => function(event_interface $event) {
|
||||||
$event->testattribute = 'Hello';
|
|
||||||
return $event;
|
return $event;
|
||||||
},
|
},
|
||||||
'visibilitycallbackapplier' => function(event_interface $event) {
|
'visibilitycallbackapplier' => function(event_interface $event) {
|
||||||
@ -438,7 +439,6 @@ class event_factory_test extends \advanced_testcase {
|
|||||||
'location' => 'Test location',
|
'location' => 'Test location',
|
||||||
],
|
],
|
||||||
'actioncallbackapplier' => function(event_interface $event) {
|
'actioncallbackapplier' => function(event_interface $event) {
|
||||||
$event->testattribute = 'Hello';
|
|
||||||
return $event;
|
return $event;
|
||||||
},
|
},
|
||||||
'visibilitycallbackapplier' => function(event_interface $event) {
|
'visibilitycallbackapplier' => function(event_interface $event) {
|
||||||
|
Reference in New Issue
Block a user