mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
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:
parent
5a22258f42
commit
8fa53a336e
3 changed files with 38 additions and 2 deletions
|
@ -53,6 +53,9 @@ class competency extends persistent {
|
||||||
/** @var competency Object before update. */
|
/** @var competency Object before update. */
|
||||||
protected $beforeupdate = null;
|
protected $beforeupdate = null;
|
||||||
|
|
||||||
|
/** @var competency|null To store new parent. */
|
||||||
|
protected $newparent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the definition of the properties of this model.
|
* Return the definition of the properties of this model.
|
||||||
*
|
*
|
||||||
|
|
|
@ -25,6 +25,36 @@ namespace core_competency;
|
||||||
*/
|
*/
|
||||||
class competency_override_test extends \advanced_testcase {
|
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 {
|
public function setUp(): void {
|
||||||
$this->resetAfterTest(true);
|
$this->resetAfterTest(true);
|
||||||
$this->setAdminUser();
|
$this->setAdminUser();
|
||||||
|
|
7
competency/tests/external/external_test.php
vendored
7
competency/tests/external/external_test.php
vendored
|
@ -94,8 +94,11 @@ class external_test extends externallib_advanced_testcase {
|
||||||
/** @var string catscaleconfiguration */
|
/** @var string catscaleconfiguration */
|
||||||
protected $scaleconfiguration3 = null;
|
protected $scaleconfiguration3 = null;
|
||||||
|
|
||||||
/** @var string catscaleconfiguration */
|
/** @var string category scale configuration. */
|
||||||
protected $catscaleconfiguration4 = null;
|
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.
|
* Setup function- we will create a course and add an assign instance to it.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue