MDL-77350 competency: 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 20:41:51 +07:00
parent 4937a1fd1c
commit 760a8c426e
3 changed files with 38 additions and 2 deletions

View File

@ -53,6 +53,9 @@ class competency extends persistent {
/** @var competency Object before update. */
protected $beforeupdate = null;
/** @var competency|null To store new parent. */
protected $newparent;
/**
* Return the definition of the properties of this model.
*

View File

@ -25,6 +25,36 @@ namespace core_competency;
*/
class competency_override_test extends \advanced_testcase {
/** @var \stdClass course record. */
protected $course;
/** @var \stdClass user record. */
protected $user;
/** @var \stdClass block instance record. */
protected $scale;
/** @var competency_framework loading competency frameworks from the DB. */
protected $framework;
/** @var plan loading competency plans from the DB. */
protected $plan;
/** @var competency loading competency from the DB. */
protected $comp1;
/** @var competency loading competency from the DB. */
protected $comp2;
/** @var \stdClass course module. */
protected $cm;
/** @var \completion_info completion information. */
protected $completion;
/** @var \context_course context course. */
protected $context;
public function setUp(): void {
$this->resetAfterTest(true);
$this->setAdminUser();

View File

@ -94,8 +94,11 @@ class external_test extends externallib_advanced_testcase {
/** @var string catscaleconfiguration */
protected $scaleconfiguration3 = null;
/** @var string catscaleconfiguration */
protected $catscaleconfiguration4 = null;
/** @var string category scale configuration. */
protected $scaleconfiguration4 = null;
/** @var \core_course_category course category record. */
protected $othercategory = null;
/**
* Setup function- we will create a course and add an assign instance to it.