diff --git a/admin/presets/classes/local/setting/adminpresets_admin_setting_configselect.php b/admin/presets/classes/local/setting/adminpresets_admin_setting_configselect.php index 2d3396833ae..d8a9109fa60 100644 --- a/admin/presets/classes/local/setting/adminpresets_admin_setting_configselect.php +++ b/admin/presets/classes/local/setting/adminpresets_admin_setting_configselect.php @@ -34,7 +34,7 @@ class adminpresets_admin_setting_configselect extends adminpresets_setting { */ protected function set_value($value) { // When we intantiate the class we need the choices. - if (empty($this->settindata->choices) && method_exists($this->settingdata, 'load_choices')) { + if (empty($this->settingdata->choices) && method_exists($this->settingdata, 'load_choices')) { $this->settingdata->load_choices(); } diff --git a/admin/presets/classes/local/setting/adminpresets_setting.php b/admin/presets/classes/local/setting/adminpresets_setting.php index aca5bb8b118..92103872603 100644 --- a/admin/presets/classes/local/setting/adminpresets_setting.php +++ b/admin/presets/classes/local/setting/adminpresets_setting.php @@ -68,6 +68,9 @@ class adminpresets_setting { */ protected $attributesvalues; + /** @var array To store the behaviors. */ + protected array $behaviors = []; + /** * Stores the setting data and the selected value * diff --git a/admin/tool/brickfield/classes/area_base.php b/admin/tool/brickfield/classes/area_base.php index 75a8f5cf1f8..1f2eea63d61 100644 --- a/admin/tool/brickfield/classes/area_base.php +++ b/admin/tool/brickfield/classes/area_base.php @@ -86,6 +86,15 @@ abstract class area_base { */ const TYPE_FILE = 1; + /** @var string To store the filter. */ + protected string $filter = ''; + + /** @var array To store the filter parameters. */ + protected array $filterparams = []; + + /** @var string To store the filter field name. */ + protected $filterfieldname; + /** * Return the name for the specified checkgroup value, or 'unknown' if no valid name for the value. Preferably, use this rather * than direct access to CHECKGROUP_NAMES, since it checks value boundaries. diff --git a/admin/tool/brickfield/classes/local/htmlchecker/brickfield_accessibility_guideline.php b/admin/tool/brickfield/classes/local/htmlchecker/brickfield_accessibility_guideline.php index 4e97ac19be3..7cbdd1ebe11 100644 --- a/admin/tool/brickfield/classes/local/htmlchecker/brickfield_accessibility_guideline.php +++ b/admin/tool/brickfield/classes/local/htmlchecker/brickfield_accessibility_guideline.php @@ -45,6 +45,9 @@ class brickfield_accessibility_guideline { /** @var array An array of all the severity levels for every test */ public $severity = []; + /** @var array To store all the tests. */ + public array $tests = []; + /** * The class constructor. * @param object $dom The current DOMDocument object diff --git a/admin/tool/brickfield/classes/local/htmlchecker/brickfield_accessibility_report_item.php b/admin/tool/brickfield/classes/local/htmlchecker/brickfield_accessibility_report_item.php index 7f67912ee30..a245647f715 100644 --- a/admin/tool/brickfield/classes/local/htmlchecker/brickfield_accessibility_report_item.php +++ b/admin/tool/brickfield/classes/local/htmlchecker/brickfield_accessibility_report_item.php @@ -42,6 +42,9 @@ class brickfield_accessibility_report_item { /** @var object For issues with more than two possible states, this contains information about the state */ public $state; + /** @var int the line number of the report item */ + public $line; + /** * Returns the line number of the report item. Unfortunately we can't use getLineNo * if we are before PHP 5.3, so if not we try to get the line number through a more diff --git a/admin/tool/brickfield/classes/local/htmlchecker/brickfield_accessibility_reporter.php b/admin/tool/brickfield/classes/local/htmlchecker/brickfield_accessibility_reporter.php index f977a410b5f..ca6db0dacdd 100644 --- a/admin/tool/brickfield/classes/local/htmlchecker/brickfield_accessibility_reporter.php +++ b/admin/tool/brickfield/classes/local/htmlchecker/brickfield_accessibility_reporter.php @@ -47,6 +47,9 @@ class brickfield_accessibility_reporter { /** @var array An array of attributes to search for to turn into absolute paths rather than relative paths */ public $absoluteattributes = ['src', 'href']; + /** @var object|null A guideline object. */ + public ?object $guideline = null; + /** * The class constructor * @param object $dom The current DOMDocument object diff --git a/admin/tool/brickfield/classes/local/htmlchecker/common/brickfield_accessibility_css.php b/admin/tool/brickfield/classes/local/htmlchecker/common/brickfield_accessibility_css.php index 3af93874352..f3691da4cf2 100644 --- a/admin/tool/brickfield/classes/local/htmlchecker/common/brickfield_accessibility_css.php +++ b/admin/tool/brickfield/classes/local/htmlchecker/common/brickfield_accessibility_css.php @@ -67,6 +67,12 @@ class brickfield_accessibility_css { /** @var array A list of all the elements which support deprecated styles such as 'background' or 'bgcolor' */ public $deprecatedstyleelements = ['body', 'table', 'tr', 'td', 'th']; + /** @var array */ + public array $path = []; + + /** @var array To store additional CSS files to load. */ + public array $css_files = []; + /** * Class constructor. We are just building and importing variables here and then loading the CSS * @param \DOMDocument $dom The DOMDocument object diff --git a/admin/tool/brickfield/classes/local/htmlchecker/common/brickfield_accessibility_test.php b/admin/tool/brickfield/classes/local/htmlchecker/common/brickfield_accessibility_test.php index 1b2738cf6b3..df32c48ada3 100644 --- a/admin/tool/brickfield/classes/local/htmlchecker/common/brickfield_accessibility_test.php +++ b/admin/tool/brickfield/classes/local/htmlchecker/common/brickfield_accessibility_test.php @@ -57,6 +57,9 @@ class brickfield_accessibility_test { /** @var array An array of translatable strings */ public $strings = array('en' => ''); + /** @var mixed Any additional options passed by htmlchecker. */ + public $options; + /** * The class constructor. We pass items by reference so we can alter the DOM if necessary * @param object $dom The DOMDocument object diff --git a/admin/tool/brickfield/classes/local/htmlchecker/guidelines/brickfield_guideline.php b/admin/tool/brickfield/classes/local/htmlchecker/guidelines/brickfield_guideline.php index b390caf0897..0c36116bfae 100644 --- a/admin/tool/brickfield/classes/local/htmlchecker/guidelines/brickfield_guideline.php +++ b/admin/tool/brickfield/classes/local/htmlchecker/guidelines/brickfield_guideline.php @@ -28,11 +28,6 @@ use tool_brickfield\manager; */ class brickfield_guideline extends brickfield_accessibility_guideline { - /** - * @var array An array of test class names which will be called for this guideline - */ - public $tests = []; - /** * brickfield_guideline constructor. * @param \DOMDocument $dom diff --git a/admin/tool/brickfield/classes/local/htmlchecker/guidelines/brickfield_textonly_guideline.php b/admin/tool/brickfield/classes/local/htmlchecker/guidelines/brickfield_textonly_guideline.php index 57936bdf71d..b2a4e753aea 100644 --- a/admin/tool/brickfield/classes/local/htmlchecker/guidelines/brickfield_textonly_guideline.php +++ b/admin/tool/brickfield/classes/local/htmlchecker/guidelines/brickfield_textonly_guideline.php @@ -30,7 +30,7 @@ class brickfield_textonly_guideline extends brickfield_accessibility_guideline { /** * @var array An array of test class names which will be called for this guideline */ - public $tests = array( + public array $tests = [ 'aSuspiciousLinkText', 'cssTextHasContrast', 'contentTooLong', @@ -43,5 +43,5 @@ class brickfield_textonly_guideline extends brickfield_accessibility_guideline { 'tableDataShouldHaveTh', 'tableThShouldHaveScope', 'tableTdShouldNotMerge', - ); + ]; } diff --git a/admin/tool/cohortroles/classes/output/cohort_role_assignments_table.php b/admin/tool/cohortroles/classes/output/cohort_role_assignments_table.php index 6172ef5e59f..e9b57e7db83 100644 --- a/admin/tool/cohortroles/classes/output/cohort_role_assignments_table.php +++ b/admin/tool/cohortroles/classes/output/cohort_role_assignments_table.php @@ -42,6 +42,12 @@ use table_sql; */ class cohort_role_assignments_table extends table_sql { + /** @var context_system */ + protected ?context_system $context = null; + + /** @var array */ + protected array $rolenames = []; + /** * Sets up the table. * diff --git a/admin/tool/cohortroles/tests/api_test.php b/admin/tool/cohortroles/tests/api_test.php index 3e7a0523bfc..08ca2061e22 100644 --- a/admin/tool/cohortroles/tests/api_test.php +++ b/admin/tool/cohortroles/tests/api_test.php @@ -36,6 +36,9 @@ class api_test extends \advanced_testcase { /** @var \stdClass $role */ protected $role = null; + /** @var int $roleid */ + protected $roleid; + /** * Setup function- we will create a course and add an assign instance to it. */ diff --git a/admin/tool/dataprivacy/classes/output/data_requests_table.php b/admin/tool/dataprivacy/classes/output/data_requests_table.php index 929ad178f10..0d7492c1b3c 100644 --- a/admin/tool/dataprivacy/classes/output/data_requests_table.php +++ b/admin/tool/dataprivacy/classes/output/data_requests_table.php @@ -71,6 +71,9 @@ class data_requests_table extends table_sql { /** @var int[] The available options for the number of data request to be displayed per page. */ protected $perpageoptions = [25, 50, 100, 250]; + /** @var int[] The request creation method filters. */ + protected array $creationmethods = []; + /** * data_requests_table constructor. * diff --git a/admin/tool/log/classes/helper/reader.php b/admin/tool/log/classes/helper/reader.php index ae0a376c816..e8543e2e7fe 100644 --- a/admin/tool/log/classes/helper/reader.php +++ b/admin/tool/log/classes/helper/reader.php @@ -38,6 +38,13 @@ defined('MOODLE_INTERNAL') || die(); * @property string $store short plugin name initialised in store trait. */ trait reader { + + /** @var string Frankenstyle plugin name initialised in store trait. */ + protected $component; + + /** @var string short plugin name initialised in store trait. */ + protected $store; + /** * Default get name api. * diff --git a/admin/tool/lp/classes/output/course_competencies_page.php b/admin/tool/lp/classes/output/course_competencies_page.php index 830cf8ad82b..21ee38048bc 100644 --- a/admin/tool/lp/classes/output/course_competencies_page.php +++ b/admin/tool/lp/classes/output/course_competencies_page.php @@ -75,6 +75,18 @@ class course_competencies_page implements renderable, templatable { /** @var string $manageurl manage url. */ protected $manageurl = null; + /** @var bool */ + protected bool $canconfigurecoursecompetencies = false; + + /** @var bool */ + protected bool $cangradecompetencies = false; + + /** @var \core\persistent|null */ + protected $coursecompetencysettings = null; + + /** @var \tool_lp\course_competency_statistics|null */ + protected $coursecompetencystatistics = null; + /** * Construct this renderable. * @param int $courseid The course record for this page. diff --git a/admin/tool/lp/classes/output/manage_competencies_page.php b/admin/tool/lp/classes/output/manage_competencies_page.php index c4fbf0400dd..5541900be6f 100644 --- a/admin/tool/lp/classes/output/manage_competencies_page.php +++ b/admin/tool/lp/classes/output/manage_competencies_page.php @@ -65,6 +65,9 @@ class manage_competencies_page implements renderable, templatable { /** @var \core_competency\competency $competency The competency to show when the page loads. */ protected $competency = null; + /** @var array */ + protected array $navigation = []; + /** * Construct this renderable. * diff --git a/admin/tool/lp/classes/output/related_competencies.php b/admin/tool/lp/classes/output/related_competencies.php index cd753fc9b85..04dae72a9a6 100644 --- a/admin/tool/lp/classes/output/related_competencies.php +++ b/admin/tool/lp/classes/output/related_competencies.php @@ -44,6 +44,12 @@ class related_competencies implements renderable, templatable { /** @var array Related competencies. */ protected $relatedcompetencies = null; + /** @var \core_competency\competency|null */ + protected $competency = null; + + /** @var \context|null */ + protected $context = null; + /** * Construct this renderable. * diff --git a/admin/tool/lp/classes/output/template_cohorts_page.php b/admin/tool/lp/classes/output/template_cohorts_page.php index 0964778ffbd..495146cd587 100644 --- a/admin/tool/lp/classes/output/template_cohorts_page.php +++ b/admin/tool/lp/classes/output/template_cohorts_page.php @@ -34,6 +34,15 @@ defined('MOODLE_INTERNAL') || die(); */ class template_cohorts_page implements \renderable { + /** @var \core_competency\template|null */ + protected $template = null; + + /** @var \moodle_url|null */ + protected $url = null; + + /** @var template_cohorts_table|null */ + public $table = null; + /** * Constructor. * @param \core_competency\template $template diff --git a/admin/tool/lp/classes/output/template_competencies_page.php b/admin/tool/lp/classes/output/template_competencies_page.php index 2fb3558479e..8214e6ba2a7 100644 --- a/admin/tool/lp/classes/output/template_competencies_page.php +++ b/admin/tool/lp/classes/output/template_competencies_page.php @@ -68,6 +68,9 @@ class template_competencies_page implements renderable, templatable { /** @var template_statistics $templatestatistics The generated summary statistics for this template. */ protected $templatestatistics = null; + /** @var bool true if the user has this capability. Otherwise false. */ + protected bool $canmanagetemplatecompetencies = false; + /** * Construct this renderable. * diff --git a/admin/tool/lp/classes/output/template_plans_page.php b/admin/tool/lp/classes/output/template_plans_page.php index 0042b7f0113..f6bd29108d2 100644 --- a/admin/tool/lp/classes/output/template_plans_page.php +++ b/admin/tool/lp/classes/output/template_plans_page.php @@ -34,6 +34,15 @@ defined('MOODLE_INTERNAL') || die(); */ class template_plans_page implements \renderable { + /** @var \core_competency\template|null */ + protected $template = null; + + /** @var \moodle_url|null */ + protected $url = null; + + /** @var template_plans_table|null */ + public $table = null; + /** * Constructor. * @param \core_competency\template $template diff --git a/admin/tool/lpmigrate/classes/output/migrate_framework_results.php b/admin/tool/lpmigrate/classes/output/migrate_framework_results.php index 5665bc6dca3..ffa4e168116 100644 --- a/admin/tool/lpmigrate/classes/output/migrate_framework_results.php +++ b/admin/tool/lpmigrate/classes/output/migrate_framework_results.php @@ -51,6 +51,14 @@ class migrate_framework_results implements renderable, templatable { protected $pagecontext; /** @var framework_processor The processor. */ protected $processor; + /** @var array $unmappedfrom Competencies from unmapped. */ + protected array $unmappedfrom = []; + /** @var array $unmappedto competencies to unmapped. */ + protected array $unmappedto = []; + /* @var competency_framework|null $frameworkfrom Framework from. */ + protected $frameworkfrom = null; + /* @var competency_framework|null $frameworkto Framework to. */ + protected $frameworkto = null; /** * Construct. diff --git a/admin/tool/lpmigrate/tests/processor_test.php b/admin/tool/lpmigrate/tests/processor_test.php index fb2eda42cd4..5d1c427ba7b 100644 --- a/admin/tool/lpmigrate/tests/processor_test.php +++ b/admin/tool/lpmigrate/tests/processor_test.php @@ -28,6 +28,33 @@ use core_competency\course_module_competency; */ class processor_test extends \advanced_testcase { + /** @var \core_competency\competency_framework|null $f1 */ + protected $f1 = null; + + /** @var \core_competency\competency_framework|null $f2 */ + protected $f2 = null; + + /** @var object|null $c1 course instance. */ + protected ?object $c1 = null; + + /** @var object|null $c2 course instance. */ + protected ?object $c2 = null; + + /** @var array $f1comps */ + protected array $f1comps = []; + + /** @var array $f2comps */ + protected array $f2comps = []; + + /** @var array $cms */ + protected array $cms = []; + + /** @var array $ccs */ + protected array $ccs = []; + + /** @var array $cmcs */ + protected array $cmcs = []; + /** * This sets up a few things, and assign class variables. * diff --git a/admin/tool/policy/classes/output/page_viewalldoc.php b/admin/tool/policy/classes/output/page_viewalldoc.php index 801aac0c516..9a2f2936b9b 100644 --- a/admin/tool/policy/classes/output/page_viewalldoc.php +++ b/admin/tool/policy/classes/output/page_viewalldoc.php @@ -51,6 +51,9 @@ class page_viewalldoc implements renderable, templatable { /** @var string Return url */ private $returnurl; + /** @var array List current (active) policy versions. */ + private array $policies = []; + /** * Prepare the page for rendering. * diff --git a/admin/tool/policy/classes/output/page_viewdoc.php b/admin/tool/policy/classes/output/page_viewdoc.php index e5d7751983c..3cbe4f45d31 100644 --- a/admin/tool/policy/classes/output/page_viewdoc.php +++ b/admin/tool/policy/classes/output/page_viewdoc.php @@ -55,6 +55,15 @@ class page_viewdoc implements renderable, templatable { /** @var int User id who wants to view this page. */ protected $behalfid = null; + /** @var bool View the policy as a part of the management UI. */ + protected $manage; + + /** @var int Position of the current policy with respect to the total of policy docs to display. */ + protected $numpolicy = 0; + + /** @var int Total number of policy documents which the user has to agree to. */ + protected $totalpolicies = 0; + /** * Prepare the page for rendering. * diff --git a/admin/tool/policy/tests/externallib_test.php b/admin/tool/policy/tests/externallib_test.php index b09a3b9a3e8..6d502866235 100644 --- a/admin/tool/policy/tests/externallib_test.php +++ b/admin/tool/policy/tests/externallib_test.php @@ -35,6 +35,24 @@ require_once($CFG->dirroot . '/user/externallib.php'); */ class externallib_test extends externallib_advanced_testcase { + /** @var \tool_policy\policy_version $policy1 Policy document 1. */ + protected $policy1; + + /** @var \tool_policy\policy_version $policy2 Policy document 2. */ + protected $policy2; + + /** @var \tool_policy\policy_version $policy3 Policy document 3. */ + protected $policy3; + + /** @var \stdClass $child user record. */ + protected $child; + + /** @var \stdClass $parent user record. */ + protected $parent; + + /** @var \stdClass $adult user record. */ + protected $adult; + /** * Setup function- we will create some policy docs. */ diff --git a/admin/tool/task/classes/check/adhocqueue.php b/admin/tool/task/classes/check/adhocqueue.php index 85f98b8f502..2ec463da3ca 100644 --- a/admin/tool/task/classes/check/adhocqueue.php +++ b/admin/tool/task/classes/check/adhocqueue.php @@ -38,6 +38,12 @@ use core\check\result; */ class adhocqueue extends check { + /** @var string adhocqueue id. */ + protected string $id = ''; + + /** @var string adhocqueue name. */ + protected string $name = ''; + /** * Constructor */ diff --git a/admin/tool/task/classes/check/cronrunning.php b/admin/tool/task/classes/check/cronrunning.php index 7a37ae40fe9..171300e8046 100644 --- a/admin/tool/task/classes/check/cronrunning.php +++ b/admin/tool/task/classes/check/cronrunning.php @@ -37,6 +37,15 @@ use core\check\result; */ class cronrunning extends check { + /** @var string adhocqueue id. */ + protected string $id = ''; + + /** @var string adhocqueue name. */ + protected string $name = ''; + + /** @var \action_link action link. */ + protected $actionlink; + /** * Constructor */ diff --git a/admin/tool/task/classes/check/longrunningtasks.php b/admin/tool/task/classes/check/longrunningtasks.php index c64dae619a4..b4139ed4367 100644 --- a/admin/tool/task/classes/check/longrunningtasks.php +++ b/admin/tool/task/classes/check/longrunningtasks.php @@ -30,6 +30,12 @@ use core\task\manager; */ class longrunningtasks extends check { + /** @var string adhocqueue id. */ + protected string $id = ''; + + /** @var string adhocqueue name. */ + protected string $name = ''; + /** * Constructor */ diff --git a/admin/tool/uploaduser/tests/cli_test.php b/admin/tool/uploaduser/tests/cli_test.php index 22ec7eb0ea6..969ad7d4aae 100644 --- a/admin/tool/uploaduser/tests/cli_test.php +++ b/admin/tool/uploaduser/tests/cli_test.php @@ -123,7 +123,7 @@ class cli_test extends \advanced_testcase { set_config('passwordpolicy', 0); $this->setAdminUser(); - $this->field1 = $this->getDataGenerator()->create_custom_profile_field([ + $this->getDataGenerator()->create_custom_profile_field([ 'shortname' => 'superfield', 'name' => 'Super field', 'datatype' => 'text', 'signup' => 1, 'visible' => 1, 'required' => 1, 'sortorder' => 1]); diff --git a/admin/tool/usertours/classes/local/table/tour_list.php b/admin/tool/usertours/classes/local/table/tour_list.php index 3611de820d9..0ea20a13dbc 100644 --- a/admin/tool/usertours/classes/local/table/tour_list.php +++ b/admin/tool/usertours/classes/local/table/tour_list.php @@ -38,6 +38,10 @@ require_once($CFG->libdir . '/tablelib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class tour_list extends \flexible_table { + + /** @var int The count of all tours. */ + protected int $tourcount = 0; + /** * Construct the tour table. */ diff --git a/admin/tool/usertours/tests/role_filter_test.php b/admin/tool/usertours/tests/role_filter_test.php index cc93cd50786..20ee1be9629 100644 --- a/admin/tool/usertours/tests/role_filter_test.php +++ b/admin/tool/usertours/tests/role_filter_test.php @@ -50,6 +50,9 @@ class role_filter_test extends \advanced_testcase { */ protected $roles; + /** @var array Roles. */ + protected array $testroles = []; + public function setUp(): void { global $DB; diff --git a/admin/tool/xmldb/actions/XMLDBAction.class.php b/admin/tool/xmldb/actions/XMLDBAction.class.php index 19e4e9899ee..983c3ea0097 100644 --- a/admin/tool/xmldb/actions/XMLDBAction.class.php +++ b/admin/tool/xmldb/actions/XMLDBAction.class.php @@ -53,6 +53,12 @@ class XMLDBAction { /** @var bool Actions must be protected by sesskey mechanism*/ protected $sesskey_protected; + /** @var mixed */ + protected $subaction; + + /** @var bool Set own core attributes. */ + protected $can_subaction; + /** * Constructor */ diff --git a/admin/tool/xmldb/actions/generate_all_documentation/generate_all_documentation.class.php b/admin/tool/xmldb/actions/generate_all_documentation/generate_all_documentation.class.php index 20f3ab7f975..4586d727291 100644 --- a/admin/tool/xmldb/actions/generate_all_documentation/generate_all_documentation.class.php +++ b/admin/tool/xmldb/actions/generate_all_documentation/generate_all_documentation.class.php @@ -76,7 +76,7 @@ class generate_all_documentation extends XMLDBAction { $c .= '

'; $this->output.=$c; - $this->docs = ''; + $docs = ''; if(class_exists('XSLTProcessor')) { @@ -97,16 +97,16 @@ class generate_all_documentation extends XMLDBAction { $dir = trim(dirname(str_replace($CFG->dirroot, '', $path)), '/'); $index .= '' . $dir . ', '; - $this->docs .= '
'; - $this->docs .= '

' . $dir . '

'; + $docs .= '
'; + $docs .= '

' . $dir . '

'; $doc->load($path . '/install.xml'); - $this->docs.=$xsl->transformToXML($doc); + $docs .= $xsl->transformToXML($doc); - $this->docs .= '
'; + $docs .= '
'; } - $this->output .= '
' . trim($index, ' ,') . '
' . $this->docs; + $this->output .= '
' . trim($index, ' ,') . '
' . $docs; $this->output.=$b; } else {