Skip to content

Commit

Permalink
code quality fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Glutamat42 committed Sep 9, 2024
1 parent 4dbdce5 commit d14fd7b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions classes/external/get_question_details.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
use coding_exception;
use context_module;
use core_external\restricted_context_exception;
use dml_exception;
use external_api;
use external_function_parameters;
use external_value;
use external_single_structure;
use invalid_parameter_exception;
use mod_adleradaptivity\local\helpers;
use moodle_exception;

class get_question_details extends external_api {
public static function execute_parameters(): external_function_parameters {
Expand Down Expand Up @@ -49,8 +51,11 @@ public static function execute_returns(): external_function_parameters {

/**
* @param array $module [int $module_id, string $instance_id]
* @throws invalid_parameter_exception If neither module_id nor instance_id are set
* @return array
* @throws dml_exception
* @throws moodle_exception
* @throws coding_exception If the module could not be found
* @throws invalid_parameter_exception If neither module_id nor instance_id are set
* @throws restricted_context_exception If the user does not have the required context to view the module
*/
public static function execute(array $module): array {
Expand All @@ -60,7 +65,6 @@ public static function execute(array $module): array {

$module = external_helpers::validate_module_params_and_get_module($module);
$module_id = $module->id;
$instance_id = $module->instance;

// default validation stuff with context
$context = context_module::instance($module_id);
Expand Down

0 comments on commit d14fd7b

Please sign in to comment.