From adf4ec1d0b9f024a2493f3e1d55067198c3bfe61 Mon Sep 17 00:00:00 2001 From: "jacob.viertel@wunderbyte.at" Date: Mon, 5 Feb 2024 10:00:58 +0100 Subject: [PATCH] Linting: linting code --- classes/local_adele.php | 8 ++++---- lib.php | 2 +- view.php | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/classes/local_adele.php b/classes/local_adele.php index 1189614..e8a12d9 100644 --- a/classes/local_adele.php +++ b/classes/local_adele.php @@ -44,8 +44,8 @@ public function __construct() { /** * Get all tests. * - * @param string $courseid - * @param string $learningpathid + * @param string $learningpathid The ID of the learning path. + * @param string $courseid The ID of the course. * @return array */ public static function get_internalquuiz_id($learningpathid, $courseid) { @@ -101,8 +101,8 @@ public static function get_internalquuiz_id($learningpathid, $courseid) { /** * Get all tests. * - * @param string $courseid - * @param string $internalcatquizid + * @param string $internalcatquizid The ID of the internal catquiz. + * @param string $courseid The ID of the course. * @return array */ public static function get_alise_compability($internalcatquizid, $courseid) { diff --git a/lib.php b/lib.php index 80d2a6a..596c2b0 100644 --- a/lib.php +++ b/lib.php @@ -101,7 +101,7 @@ function adele_delete_instance($id) { /** * Sets content of mod. * - * @param object cm + * @param cm_info $cm The course module information object. */ function mod_adele_cm_info_view(cm_info $cm) { global $DB, $PAGE, $USER; diff --git a/view.php b/view.php index 1be7151..04d157d 100644 --- a/view.php +++ b/view.php @@ -47,15 +47,15 @@ $modulecontext = context_module::instance($cm->id); -$event = \mod_adele\event\course_module_viewed::create(array( +$event = \mod_adele\event\course_module_viewed::create([ 'objectid' => $moduleinstance->id, - 'context' => $modulecontext -)); + 'context' => $modulecontext, +]); $event->add_record_snapshot('course', $course); $event->add_record_snapshot('adele', $moduleinstance); $event->trigger(); -$PAGE->set_url('/mod/adele/view.php', array('id' => $cm->id)); +$PAGE->set_url('/mod/adele/view.php', ['id' => $cm->id]); $PAGE->set_title(format_string($moduleinstance->name)); $PAGE->set_heading(format_string($course->fullname)); $PAGE->set_context($modulecontext); @@ -63,7 +63,7 @@ 'adele', [ 'id' => $cm->instance, - 'course' => $cm->course + 'course' => $cm->course, ], 'id, learningpathid, view, userlist' );