From 3a6fbb92c7797218ef6e5ca85189ff1f97558748 Mon Sep 17 00:00:00 2001 From: Marcus Green Date: Thu, 24 Oct 2024 19:06:39 +0100 Subject: [PATCH] Linting of arrays and return types https://github.com/marcusgreen/moodle-tool_driprelease/issues/15 --- classes/privacy/provider.php | 3 ++- db/access.php | 8 ++++---- tests/driprelease_test.php | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/classes/privacy/provider.php b/classes/privacy/provider.php index 76066b8..b05d9ff 100755 --- a/classes/privacy/provider.php +++ b/classes/privacy/provider.php @@ -13,6 +13,7 @@ // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . + /** * Privacy class for Moodle Gapfill question type. * @@ -37,7 +38,7 @@ class provider implements * * @return string */ - public static function get_reason() : string { + public static function get_reason(): string { return 'privacy:null_reason'; } } diff --git a/db/access.php b/db/access.php index 88027e4..a8e1cf0 100755 --- a/db/access.php +++ b/db/access.php @@ -28,10 +28,10 @@ 'tool/driprelease:view' => [ 'captype' => 'read', 'contextlevel' => CONTEXT_MODULE, - 'archetypes' => array( + 'archetypes' => [ 'editingteacher' => CAP_ALLOW, 'manager' => CAP_ALLOW - ), - 'clonepermissionsfrom' => 'moodle/course:manageactivities' - ] + ], + 'clonepermissionsfrom' => 'moodle/course:manageactivities', + ], ]; diff --git a/tests/driprelease_test.php b/tests/driprelease_test.php index f1f122b..1d80b2f 100644 --- a/tests/driprelease_test.php +++ b/tests/driprelease_test.php @@ -80,6 +80,7 @@ final class driprelease_test extends \advanced_testcase { public $fromform; public function setUp(): void { + parent::setUp(); global $CFG, $DB; $this->driprelease = new driprelease(); // Create course with availability enabled.