Skip to content

Commit 8fc1486

Browse files
committed
MDL-77164 various: fix incorrect phpdocs
1 parent 4d765cd commit 8fc1486

File tree

327 files changed

+644
-533
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

327 files changed

+644
-533
lines changed

admin/presets/classes/local/setting/adminpresets_setting.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public function set_attribute_value($name, $value) {
170170
/**
171171
* Saves the setting attributes values
172172
*
173-
* @return array Array of inserted ids (in config_log)
173+
* @return array|false Array of inserted ids (in config_log) or false if nothing was inserted
174174
*/
175175
public function save_attributes_values() {
176176
// Plugin name or null.
@@ -209,8 +209,6 @@ public function save_attributes_values() {
209209
* @param bool $name Setting name to store.
210210
* @param mixed $value Setting value to store.
211211
* @return int|false config_log inserted id or false whenever the new value is the same as old value.
212-
* @throws dml_exception
213-
* @throws moodle_exception
214212
*/
215213
public function save_value($name = false, $value = null) {
216214
// Object values if no arguments.

admin/presets/classes/manager.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ public function get_site_settings(): array {
183183
* @param boolean $sitedbvalues Indicates if $dbsettings comes from the site db or not
184184
* @param array $settings Array format $array['plugin']['settingname'] = settings_types child class
185185
* @param array|false $children Array of admin_category children or false
186-
* @return array Array format $array['plugin']['settingname'] = settings_types child class
186+
* @return \core_adminpresets\local\setting\adminpresets_setting[][] Array format
187+
* $array['plugin']['settingname'] = adminpresets_setting child class
187188
*/
188189
public function get_settings(array $dbsettings, bool $sitedbvalues = false, array $settings = [], $children = false): array {
189190
global $DB;

admin/presets/classes/privacy/provider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public static function export_user_data(approved_contextlist $contextlist) {
9999
/**
100100
* Delete all data for all users in the specified context.
101101
*
102-
* @param context $context The specific context to delete data for.
102+
* @param \context $context The specific context to delete data for.
103103
*/
104104
public static function delete_data_for_all_users_in_context(\context $context) {
105105
// None of the the data from these tables should be deleted.

admin/roles/classes/allow_view_page.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,9 @@ protected function set_allow($fromroleid, $targetroleid) {
5454

5555
/**
5656
* Get tool tip for cell.
57-
* @param string $fromrole
58-
* @param string $targetrole
57+
* @param stdClass $fromrole
58+
* @param stdClass $targetrole
5959
* @return string
60-
* @throws \coding_exception
6160
*/
6261
protected function get_cell_tooltip($fromrole, $targetrole) {
6362
$a = new stdClass;

admin/tool/admin_presets/classes/local/action/base.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class base {
5656
/** @var int The output content to display in the page. **/
5757
protected $outputs;
5858

59-
/** @var int The moodle form to display in the page. **/
59+
/** @var \moodleform The moodle form to display in the page. **/
6060
protected $moodleform;
6161

6262
/** @var manager The manager helper class instance. **/

admin/tool/analytics/classes/external.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public static function potential_contexts(?string $query = null, ?int $modelid =
9696
* potential_contexts return
9797
*
9898
* @since Moodle 3.8
99-
* @return external_description
99+
* @return \core_external\external_description
100100
*/
101101
public static function potential_contexts_returns() {
102102
return new external_multiple_structure(

admin/tool/analytics/classes/output/restorable_models.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct(array $models) {
5151
/**
5252
* Export the list of models to be rendered.
5353
*
54-
* @param renderer_base $output
54+
* @param \renderer_base $output
5555
* @return string
5656
*/
5757
public function export_for_template(\renderer_base $output) {

admin/tool/brickfield/classes/brickfieldconnect.php

-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ protected function get_registration_id_for_credentials(string $apikey = null, st
244244
/**
245245
* Get the check registration API URI.
246246
* @return string
247-
* @throws dml_exception
248247
*/
249248
protected function get_baseapiuri(): string {
250249
$baseapiuri = get_config(manager::PLUGINNAME, 'baseapiuri');

admin/tool/brickfield/classes/manager.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ public static function store_result_summary(int $courseid = null) {
788788
* Get course module summary information for a course.
789789
*
790790
* @param int $courseid
791-
* @return stdClass[]
791+
* @return \stdClass[]
792792
*/
793793
public static function get_cm_summary_for_course(int $courseid): array {
794794
global $DB;

admin/tool/dataprivacy/classes/metadata_registry.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
*/
2424
namespace tool_dataprivacy;
2525

26+
use core_privacy\local\metadata\types\type;
27+
2628
defined('MOODLE_INTERNAL') || die();
2729

2830
/**
@@ -114,7 +116,7 @@ public function get_registry_metadata() {
114116
/**
115117
* Formats the metadata for use with a template.
116118
*
117-
* @param array $collection The collection associated with the component that we want to expand and format.
119+
* @param type[] $collection The collection associated with the component that we want to expand and format.
118120
* @param string $component The component that we are dealing in
119121
* @param array $internaldata The array to add the formatted metadata to.
120122
* @return array The internal data array with the formatted metadata.

admin/tool/log/classes/plugininfo/logstore.php

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ public function get_settings_section_name() {
8080

8181
public function load_settings(part_of_admin_tree $adminroot, $parentnodename, $hassiteconfig) {
8282
global $CFG, $USER, $DB, $OUTPUT, $PAGE; // In case settings.php wants to refer to them.
83+
/** @var \admin_root $ADMIN */
8384
$ADMIN = $adminroot; // May be used in settings.php.
8485
$section = $this->get_settings_section_name();
8586

admin/tool/lp/classes/external.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
use core_course\external\course_module_summary_exporter;
4343
use core_course\external\course_summary_exporter;
4444
use core_external\external_api;
45+
use core_external\external_description;
4546
use core_external\external_function_parameters;
4647
use core_external\external_multiple_structure;
4748
use core_external\external_single_structure;
@@ -109,7 +110,7 @@ public static function data_for_competency_frameworks_manage_page_parameters() {
109110
/**
110111
* Loads the data required to render the competency_frameworks_manage_page template.
111112
*
112-
* @param context $pagecontext The page context
113+
* @param \context $pagecontext The page context
113114
* @return \stdClass
114115
*/
115116
public static function data_for_competency_frameworks_manage_page($pagecontext) {

admin/tool/lp/classes/output/manage_competencies_page.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class manage_competencies_page implements renderable, templatable {
5959
/** @var moodle_url $pluginurlbase Base url to use constructing links. */
6060
protected $pluginbaseurl = null;
6161

62-
/** @var context $pagecontext The page context. */
62+
/** @var \context $pagecontext The page context. */
6363
protected $pagecontext = null;
6464

6565
/** @var \core_competency\competency $competency The competency to show when the page loads. */
@@ -73,7 +73,7 @@ class manage_competencies_page implements renderable, templatable {
7373
*
7474
* @param \core_competency\competency_framework $framework Competency framework.
7575
* @param string $search Search string.
76-
* @param context $pagecontext The page context.
76+
* @param \context $pagecontext The page context.
7777
* @param \core_competency\competency $competency The core competency to show when the page loads.
7878
*/
7979
public function __construct($framework, $search, $pagecontext, $competency) {

admin/tool/lp/classes/output/user_competency_summary.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function __construct(user_competency $usercompetency, array $related = ar
6161
* Export the data.
6262
*
6363
* @param renderer_base $output
64-
* @return stdClass
64+
* @return \stdClass
6565
*/
6666
public function export_for_template(renderer_base $output) {
6767
if (!isset($related['user'])) {

admin/tool/lp/classes/output/user_competency_summary_in_plan.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
*/
3939
class user_competency_summary_in_plan implements renderable, templatable {
4040

41-
/** @var competencyid */
41+
/** @var int competencyid */
4242
protected $competencyid;
4343

44-
/** @var planid */
44+
/** @var int planid */
4545
protected $planid;
4646

4747
/**
@@ -58,8 +58,8 @@ public function __construct($competencyid, $planid) {
5858
/**
5959
* Export the data.
6060
*
61-
* @param renderer_base $output
62-
* @return stdClass
61+
* @param \renderer_base $output
62+
* @return \stdClass
6363
*/
6464
public function export_for_template(\renderer_base $output) {
6565
global $DB;

admin/tool/usertours/classes/helper.php

+13-13
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class helper {
6666
* @param int $stepid The step ID.
6767
* @param int $targettype The type of step.
6868
*
69-
* @return moodle_url
69+
* @return \moodle_url
7070
*/
7171
public static function get_edit_step_link($tourid, $stepid = null, $targettype = null) {
7272
$link = new \moodle_url('/admin/tool/usertours/configure.php');
@@ -88,7 +88,7 @@ public static function get_edit_step_link($tourid, $stepid = null, $targettype =
8888
* @param int $tourid The tour ID.
8989
* @param int $direction The direction to move in
9090
*
91-
* @return moodle_url
91+
* @return \moodle_url
9292
*/
9393
public static function get_move_tour_link($tourid, $direction = self::MOVE_DOWN) {
9494
$link = new \moodle_url('/admin/tool/usertours/configure.php');
@@ -107,7 +107,7 @@ public static function get_move_tour_link($tourid, $direction = self::MOVE_DOWN)
107107
* @param int $stepid The step ID.
108108
* @param int $direction The direction to move in
109109
*
110-
* @return moodle_url
110+
* @return \moodle_url
111111
*/
112112
public static function get_move_step_link($stepid, $direction = self::MOVE_DOWN) {
113113
$link = new \moodle_url('/admin/tool/usertours/configure.php');
@@ -126,7 +126,7 @@ public static function get_move_step_link($stepid, $direction = self::MOVE_DOWN)
126126
* @param int $tourid The ID of the tour to attach this step to.
127127
* @param int $targettype The type of target.
128128
*
129-
* @return moodle_url The required URL.
129+
* @return \moodle_url The required URL.
130130
*/
131131
public static function get_new_step_link($tourid, $targettype = null) {
132132
$link = new \moodle_url('/admin/tool/usertours/configure.php');
@@ -141,7 +141,7 @@ public static function get_new_step_link($tourid, $targettype = null) {
141141
* Get the link used to view the tour.
142142
*
143143
* @param int $tourid The ID of the tour to display.
144-
* @return moodle_url The URL.
144+
* @return \moodle_url The URL.
145145
*/
146146
public static function get_view_tour_link($tourid) {
147147
return new \moodle_url('/admin/tool/usertours/configure.php', [
@@ -154,7 +154,7 @@ public static function get_view_tour_link($tourid) {
154154
* Get the link used to reset the tour state for all users.
155155
*
156156
* @param int $tourid The ID of the tour to display.
157-
* @return moodle_url The URL.
157+
* @return \moodle_url The URL.
158158
*/
159159
public static function get_reset_tour_for_all_link($tourid) {
160160
return new \moodle_url('/admin/tool/usertours/configure.php', [
@@ -168,7 +168,7 @@ public static function get_reset_tour_for_all_link($tourid) {
168168
* Get the link used to edit the tour.
169169
*
170170
* @param int $tourid The ID of the tour to edit.
171-
* @return moodle_url The URL.
171+
* @return \moodle_url The URL.
172172
*/
173173
public static function get_edit_tour_link($tourid = null) {
174174
$link = new \moodle_url('/admin/tool/usertours/configure.php');
@@ -186,7 +186,7 @@ public static function get_edit_tour_link($tourid = null) {
186186
/**
187187
* Get the link used to import the tour.
188188
*
189-
* @return moodle_url The URL.
189+
* @return \moodle_url The URL.
190190
*/
191191
public static function get_import_tour_link() {
192192
$link = new \moodle_url('/admin/tool/usertours/configure.php', [
@@ -200,7 +200,7 @@ public static function get_import_tour_link() {
200200
* Get the link used to export the tour.
201201
*
202202
* @param int $tourid The ID of the tour to export.
203-
* @return moodle_url The URL.
203+
* @return \moodle_url The URL.
204204
*/
205205
public static function get_export_tour_link($tourid) {
206206
$link = new \moodle_url('/admin/tool/usertours/configure.php', [
@@ -215,7 +215,7 @@ public static function get_export_tour_link($tourid) {
215215
* Get the link used to duplicate the tour.
216216
*
217217
* @param int $tourid The ID of the tour to duplicate.
218-
* @return moodle_url The URL.
218+
* @return \moodle_url The URL.
219219
*/
220220
public static function get_duplicate_tour_link($tourid) {
221221
$link = new \moodle_url('/admin/tool/usertours/configure.php', [
@@ -230,7 +230,7 @@ public static function get_duplicate_tour_link($tourid) {
230230
* Get the link used to delete the tour.
231231
*
232232
* @param int $tourid The ID of the tour to delete.
233-
* @return moodle_url The URL.
233+
* @return \moodle_url The URL.
234234
*/
235235
public static function get_delete_tour_link($tourid) {
236236
return new \moodle_url('/admin/tool/usertours/configure.php', [
@@ -243,7 +243,7 @@ public static function get_delete_tour_link($tourid) {
243243
/**
244244
* Get the link for listing tours.
245245
*
246-
* @return moodle_url The URL.
246+
* @return \moodle_url The URL.
247247
*/
248248
public static function get_list_tour_link() {
249249
$link = new \moodle_url('/admin/tool/usertours/configure.php');
@@ -295,7 +295,7 @@ public static function get_filler_icon($options = array()) {
295295
* Get the link for deleting steps.
296296
*
297297
* @param int $stepid The ID of the step to display.
298-
* @return moodle_url The URL.
298+
* @return \moodle_url The URL.
299299
*/
300300
public static function get_delete_step_link($stepid) {
301301
return new \moodle_url('/admin/tool/usertours/configure.php', [

admin/tool/usertours/classes/step.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ public function set_sortorder($value) {
388388
/**
389389
* Get the link to move this step up in the sortorder.
390390
*
391-
* @return moodle_url
391+
* @return \moodle_url
392392
*/
393393
public function get_moveup_link() {
394394
return helper::get_move_step_link($this->get_id(), helper::MOVE_UP);
@@ -397,7 +397,7 @@ public function get_moveup_link() {
397397
/**
398398
* Get the link to move this step down in the sortorder.
399399
*
400-
* @return moodle_url
400+
* @return \moodle_url
401401
*/
402402
public function get_movedown_link() {
403403
return helper::get_move_step_link($this->get_id(), helper::MOVE_DOWN);
@@ -464,7 +464,7 @@ public function set_config($key, $value) {
464464
/**
465465
* Get the edit link for this step.
466466
*
467-
* @return moodle_url
467+
* @return \moodle_url
468468
*/
469469
public function get_edit_link() {
470470
return helper::get_edit_step_link($this->tourid, $this->id);
@@ -473,7 +473,7 @@ public function get_edit_link() {
473473
/**
474474
* Get the delete link for this step.
475475
*
476-
* @return moodle_url
476+
* @return \moodle_url
477477
*/
478478
public function get_delete_link() {
479479
return helper::get_delete_step_link($this->id);
@@ -674,7 +674,7 @@ public static function get_config_keys() {
674674
/**
675675
* Add the step configuration to the form.
676676
*
677-
* @param MoodleQuickForm $mform The form to add configuration to.
677+
* @param \MoodleQuickForm $mform The form to add configuration to.
678678
* @return $this
679679
*/
680680
public function add_config_to_form(\MoodleQuickForm $mform) {
@@ -694,7 +694,7 @@ public function add_config_to_form(\MoodleQuickForm $mform) {
694694
/**
695695
* Add the specified step field configuration to the form.
696696
*
697-
* @param MoodleQuickForm $mform The form to add configuration to.
697+
* @param \MoodleQuickForm $mform The form to add configuration to.
698698
* @param string $key The key to add.
699699
* @return $this
700700
*/

admin/tool/usertours/classes/tour.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ public function set_endtourlabel(string $value): tour {
367367
/**
368368
* The link to view this tour.
369369
*
370-
* @return moodle_url
370+
* @return \moodle_url
371371
*/
372372
public function get_view_link() {
373373
return helper::get_view_tour_link($this->id);
@@ -376,7 +376,7 @@ public function get_view_link() {
376376
/**
377377
* The link to edit this tour.
378378
*
379-
* @return moodle_url
379+
* @return \moodle_url
380380
*/
381381
public function get_edit_link() {
382382
return helper::get_edit_tour_link($this->id);

auth/db/auth.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ function get_userlist() {
541541
* Reads user information from DB and return it in an object.
542542
*
543543
* @param string $username username
544-
* @return array
544+
* @return stdClass
545545
*/
546546
function get_userinfo_asobj($username) {
547547
$user_array = truncate_userinfo($this->get_userinfo($username));

backup/moodle2/restore_plugin.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ abstract class restore_plugin {
3838
protected $plugintype;
3939
/** @var string */
4040
protected $pluginname;
41-
/** @var string */
41+
/** @var restore_path_element */
4242
protected $connectionpoint;
4343
/** @var restore_structure_step */
4444
protected $step;

0 commit comments

Comments
 (0)