MDL-77350 report: 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-02-09 08:46:55 +07:00
parent f0aa52f75e
commit 94bda23532
6 changed files with 9 additions and 6 deletions

View File

@ -55,6 +55,8 @@ class report implements renderable, templatable {
protected $moduleid;
/** @var array $competencies */
protected $competencies;
/** @var int The user id */
protected $userid;
/**
* Construct this renderable.

View File

@ -37,6 +37,10 @@ require_once($CFG->libdir . '/tablelib.php');
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class infectedfiles_table extends \table_sql implements \renderable {
/** @var int current page. */
protected $page;
/**
* Table constructor
*

View File

@ -137,10 +137,6 @@ if (!empty($reportlog->selectedlogreader)) {
echo $output->reader_selector($reportlog);
if ($mode === 'all') {
$reportlog->selecteddate = 0;
}
// Print the graphic chart accordingly to the mode (all, today).
echo '<div class="graph">';
report_log_print_graph($course, $user, $mode, 0, $logreader);

View File

@ -63,7 +63,6 @@ class lib_test extends \advanced_testcase {
public function setUp(): void {
$this->user = $this->getDataGenerator()->create_user();
$this->user2 = $this->getDataGenerator()->create_user();
$this->course = $this->getDataGenerator()->create_course();
$this->tree = new \core_user\output\myprofile\tree();
$this->coursecontext = \context_course::instance($this->course->id);

View File

@ -147,7 +147,6 @@ if (!empty($instanceid) && !empty($roleid)) {
}
$table = new flexible_table('course-participation-'.$course->id.'-'.$cm->id.'-'.$roleid);
$table->course = $course;
$actionheader = !empty($action) ? get_string($action) : get_string('allactions');

View File

@ -32,6 +32,9 @@ defined('MOODLE_INTERNAL') || die();
*/
class report_progress_helper_testcase extends advanced_testcase {
/** @var testing_data_generator data generator.*/
protected $generator;
/**
* Set up testcase.
*/