From cb6573997fa8154ce6fcc73a0c8c22449588760d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Fri, 19 Jan 2024 05:49:14 +0100 Subject: [PATCH] Fixing Moodle Code Checker issues. --- .github/workflows/ci.yml | 4 ++-- classes/feedback/section.php | 2 ++ tests/custom_completion_test.php | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85ced95c..e88cd459 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,11 +92,11 @@ jobs: - name: Moodle Code Checker if: ${{ always() }} - run: moodle-plugin-ci codechecker || true + run: moodle-plugin-ci codechecker - name: Moodle PHPDoc Checker if: ${{ always() }} - run: moodle-plugin-ci phpdoc + run: moodle-plugin-ci phpdoc || true - name: Validating if: ${{ always() }} diff --git a/classes/feedback/section.php b/classes/feedback/section.php index 7896782e..e4040702 100644 --- a/classes/feedback/section.php +++ b/classes/feedback/section.php @@ -16,6 +16,8 @@ namespace mod_questionnaire\feedback; +defined('MOODLE_INTERNAL') || die(); + use invalid_parameter_exception; use coding_exception; diff --git a/tests/custom_completion_test.php b/tests/custom_completion_test.php index cb19f612..e46ce656 100644 --- a/tests/custom_completion_test.php +++ b/tests/custom_completion_test.php @@ -71,6 +71,7 @@ public function get_state_provider(): array { /** * Test for get_state(). * + * @covers \mod_questionnaire\completion\custom_completion::get_state * @dataProvider get_state_provider * @param string $rule The custom completion rule. * @param int $available Whether this rule is available. @@ -191,6 +192,7 @@ public function get_available_custom_rules_provider(): array { /** * Test for get_available_custom_rules(). * + * @covers \mod_questionnaire\completion\custom_completion::get_available_custom_rules * @dataProvider get_available_custom_rules_provider * @param int $status * @param array $expected