Skip to content

Commit

Permalink
Added overrides for MissingDocblock
Browse files Browse the repository at this point in the history
  • Loading branch information
anst-i committed Dec 16, 2024
1 parent b1cb543 commit a5de0f9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions classes/event/question_version_imported.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@
*/
class question_version_imported extends question_base {

// phpcs:ignore moodle.Commenting.MissingDocblock.Missing
#[\Override]
protected function init() {
parent::init();
$this->data['crud'] = 'u';
}

// phpcs:ignore moodle.Commenting.MissingDocblock.Missing
#[\Override]
protected function validate_data() {
parent::validate_data();
if (!isset($this->other['questionbankentryid'])) {
Expand All @@ -54,24 +54,24 @@ protected function validate_data() {
}
}

// phpcs:ignore moodle.Commenting.MissingDocblock.Missing
#[\Override]
public static function get_name() {
return get_string('event:question_version_imported', 'qbank_importasversion');
}

// phpcs:ignore moodle.Commenting.MissingDocblock.Missing
#[\Override]
public function get_description() {
return "The user with id '$this->userid' imported a new version " .
"'{$this->other['version']}' (question id '$this->objectid') of the " .
"question bank entry with id '{$this->other['questionbankentryid']}' in course '$this->courseid'.";
}

// phpcs:ignore moodle.Commenting.MissingDocblock.Missing
#[\Override]
public static function get_objectid_mapping() {
return ['db' => 'question', 'restore' => 'question'];
}

// phpcs:ignore moodle.Commenting.MissingDocblock.Missing
#[\Override]
public static function get_other_mapping() {
return [
'questionbankentryid' => ['db' => 'question_bank_entries', 'restore' => 'question_bank_entries'],
Expand Down
4 changes: 2 additions & 2 deletions classes/form/import_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
*/
class import_form extends moodleform {

// phpcs:ignore moodle.Commenting.MissingDocblock.Missing
#[\Override]
protected function definition() {
$mform = $this->_form;

Expand Down Expand Up @@ -107,7 +107,7 @@ protected function validate_uploaded_file($data, $errors) {
return $errors;
}

// phpcs:ignore moodle.Commenting.MissingDocblock.Missing
#[\Override]
public function validation($data, $files) {
$errors = parent::validation($data, $files);
$errors = $this->validate_uploaded_file($data, $errors);
Expand Down
8 changes: 4 additions & 4 deletions classes/import_as_version_action_column.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,23 @@ class import_as_version_action_column extends qbank_importasversion_column_paren
/** @var string store the value of the name lang string for performance. */
protected $actionname;

// phpcs:ignore moodle.Commenting.MissingDocblock.Missing
#[\Override]
public function init(): void {
parent::init();
$this->actionname = get_string('importasversion', 'qbank_importasversion');
}

// phpcs:ignore moodle.Commenting.MissingDocblock.Missing
#[\Override]
public function get_name(): string {
return 'importasversion';
}

// phpcs:ignore moodle.Commenting.MissingDocblock.Missing
#[\Override]
public function get_menu_position(): int {
return 650;
}

// phpcs:ignore moodle.Commenting.MissingDocblock.Missing
#[\Override]
protected function get_url_icon_and_label(\stdClass $question): array {
if (!\question_bank::is_qtype_installed($question->qtype)) {
// It sometimes happens that people end up with junk questions
Expand Down
4 changes: 2 additions & 2 deletions classes/plugin_feature.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*/
class plugin_feature extends plugin_features_base {

// phpcs:ignore moodle.Commenting.MissingDocblock.Missing
#[\Override]
public function get_question_actions(view $qbank): array {
// This is what is used in Moodle 4.3+.
return [
Expand All @@ -37,7 +37,7 @@ public function get_question_actions(view $qbank): array {
}

// Support multiple Moodle versions. This method can be removed once 4.3 is the lowest supported version.
// phpcs:ignore moodle.Commenting.MissingDocblock.Missing
#[\Override]
public function get_question_columns($qbank): array {
if (class_exists('\core_question\local\bank\question_action_base')) {
// We are in Moodle 4.3+. We don't need to implement this method.
Expand Down
2 changes: 1 addition & 1 deletion classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*/
class provider implements null_provider {

// phpcs:ignore moodle.Commenting.MissingDocblock.Missing
#[\Override]
public static function get_reason(): string {
return 'privacy:metadata';
}
Expand Down

0 comments on commit a5de0f9

Please sign in to comment.