diff --git a/classes/asset_manager.php b/classes/asset_manager.php index f5748c2..921563b 100644 --- a/classes/asset_manager.php +++ b/classes/asset_manager.php @@ -51,7 +51,9 @@ public function __construct(\file_storage $fs = null) { } /** - * @return array + * Retrieves a list of assets. + * + * @return array List of asset objects with name, href, and type. */ public function get_assets() { $assets = []; diff --git a/classes/form/assets_form.php b/classes/form/assets_form.php index ea05c4a..ce8ff52 100644 --- a/classes/form/assets_form.php +++ b/classes/form/assets_form.php @@ -39,7 +39,9 @@ class assets_form extends \moodleform { /** - * @return array + * Retrieves options for the file manager element. + * + * @return array Array of options for the file manager, including accepted types and subdir settings. */ public static function get_options() { global $CFG; @@ -65,7 +67,9 @@ public static function get_options() { 'subdirs' => true, ]; } - + /** + * Defines the form elements. + */ public function definition() { $mform = $this->_form; diff --git a/classes/privacy/provider.php b/classes/privacy/provider.php index cc1e3c6..b186dc0 100644 --- a/classes/privacy/provider.php +++ b/classes/privacy/provider.php @@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider { * * @return string */ - public static function get_reason() : string { + public static function get_reason(): string { return 'privacy:metadata'; } } diff --git a/lib.php b/lib.php index 55112a2..d0e0118 100644 --- a/lib.php +++ b/lib.php @@ -23,6 +23,18 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +/** + * Handles serving of files for the Theme assets tool. + * + * @param stdClass $course The course object. + * @param stdClass $cm Course module. + * @param context $context Context object. + * @param string $filearea The file area. + * @param array $args Additional arguments. + * @param bool $forcedownload Whether or not force download. + * @param array $options Additional options affecting file serving. + * @return bool False if the file not found or context is incorrect. + */ function tool_themeassets_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, $options = []) { if (!$context instanceof \context_system) { return false; diff --git a/tests/options_test.php b/tests/options_test.php index 905230d..3ba20da 100644 --- a/tests/options_test.php +++ b/tests/options_test.php @@ -34,6 +34,8 @@ class options_test extends \advanced_testcase { /** * Test that overriding accepted types omits wildcard file type usage. + * + * @covers ::test_options_omit_asterisk */ public function test_options_omit_asterisk() { global $CFG;