Skip to content

Commit

Permalink
SV-59 Fix CI warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
odeialba committed May 3, 2024
1 parent 73ccde1 commit 2247ed6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions lang/en/sortvoting.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@
$string['option'] = 'Option';
$string['optionno'] = 'Option {no}';
$string['options'] = 'Options';
$string['position'] = 'Position';
$string['pluginadministration'] = 'Preference Sort Voting administration';
$string['pluginname'] = 'Preference Sort Voting';
$string['position'] = 'Position';
$string['privacy'] = 'Privacy of results';
$string['privacy:metadata:sortvoting_answers'] = 'Information about the user\'s votes for a given Preference Sort Voting activity';
$string['privacy:metadata:sortvoting_answers:sortvotingid'] = 'The ID of the Preference Sort Voting activity';
$string['privacy:metadata:sortvoting_answers:optionid'] = 'The ID of the option that the user sorted.';
$string['privacy:metadata:sortvoting_answers:userid'] = 'The ID of the user answering this Preference Sort Voting activity';
$string['privacy:metadata:sortvoting_answers:sortvotingid'] = 'The ID of the Preference Sort Voting activity';
$string['privacy:metadata:sortvoting_answers:timemodified'] = 'The timestamp indicating when the vote was modified by the user';
$string['privacy:metadata:sortvoting_answers:userid'] = 'The ID of the user answering this Preference Sort Voting activity';
$string['responses'] = 'Responses';
$string['sortoptions'] = 'Preference options';
$string['sortoptions_help'] = 'Here is where you specify the options that participants have to sort with their preferences.
Expand Down
6 changes: 3 additions & 3 deletions tests/lib_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
* @copyright 2023 Odei Alba <odeialba@odeialba.com>
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class lib_test extends \externallib_advanced_testcase {
final class lib_test extends \externallib_advanced_testcase {
/**
* Tests events after sortvoting is viewed.
*
* @covers ::sortvoting_view
* @return void
*/
public function test_sortvoting_view() {
public function test_sortvoting_view(): void {
global $CFG;

$this->resetAfterTest();
Expand Down Expand Up @@ -76,7 +76,7 @@ public function test_sortvoting_view() {
* @covers ::mod_sortvoting_get_completion_active_rule_descriptions
* @return void
*/
public function test_mod_sortvoting_completion_get_active_rule_descriptions() {
public function test_mod_sortvoting_completion_get_active_rule_descriptions(): void {
$this->resetAfterTest();
$this->setAdminUser();

Expand Down
18 changes: 9 additions & 9 deletions tests/privacy/provider_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @copyright 2023 Odei Alba <odeialba@odeialba.com>
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider_test extends \core_privacy\tests\provider_testcase {
final class provider_test extends \core_privacy\tests\provider_testcase {
/** @var stdClass The student object. */
protected $student;

Expand Down Expand Up @@ -92,7 +92,7 @@ protected function setUp(): void {
* Test for provider::get_metadata().
* @covers ::get_metadata
*/
public function test_get_metadata() {
public function test_get_metadata(): void {
$collection = new collection('mod_sortvoting');
$newcollection = provider::get_metadata($collection);
$itemcollection = $newcollection->get_collection();
Expand All @@ -114,7 +114,7 @@ public function test_get_metadata() {
* Test for provider::get_contexts_for_userid().
* @covers ::get_contexts_for_userid
*/
public function test_get_contexts_for_userid() {
public function test_get_contexts_for_userid(): void {
$cm = get_coursemodule_from_instance('sortvoting', $this->sortvoting->id);

$contextlist = provider::get_contexts_for_userid($this->student->id);
Expand All @@ -128,7 +128,7 @@ public function test_get_contexts_for_userid() {
* Test for provider::export_user_data().
* @covers ::export_user_data
*/
public function test_export_for_context() {
public function test_export_for_context(): void {
$cm = get_coursemodule_from_instance('sortvoting', $this->sortvoting->id);
$cmcontext = \context_module::instance($cm->id);

Expand All @@ -142,7 +142,7 @@ public function test_export_for_context() {
* Test for provider::delete_data_for_all_users_in_context().
* @covers ::delete_data_for_all_users_in_context
*/
public function test_delete_data_for_all_users_in_context() {
public function test_delete_data_for_all_users_in_context(): void {
global $DB;

$sortvoting = $this->sortvoting;
Expand Down Expand Up @@ -190,7 +190,7 @@ public function test_delete_data_for_all_users_in_context() {
* Test for provider::delete_data_for_user().
* @covers ::delete_data_for_user
*/
public function test_delete_data_for_user_() {
public function test_delete_data_for_user(): void {
global $DB;

$sortvoting = $this->sortvoting;
Expand Down Expand Up @@ -283,7 +283,7 @@ public function test_delete_data_for_user_() {
* Test for provider::get_users_in_context().
* @covers ::get_users_in_context
*/
public function test_get_users_in_context() {
public function test_get_users_in_context(): void {
$cm = get_coursemodule_from_instance('sortvoting', $this->sortvoting->id);
$cmcontext = \context_module::instance($cm->id);

Expand All @@ -300,7 +300,7 @@ public function test_get_users_in_context() {
* Test for provider::get_users_in_context() with invalid context type.
* @covers ::get_users_in_context
*/
public function test_get_users_in_context_invalid_context_type() {
public function test_get_users_in_context_invalid_context_type(): void {
$systemcontext = \context_system::instance();

$userlist = new \core_privacy\local\request\userlist($systemcontext, 'mod_sortvoting');
Expand All @@ -313,7 +313,7 @@ public function test_get_users_in_context_invalid_context_type() {
* Test for provider::delete_data_for_users().
* @covers ::delete_data_for_users
*/
public function test_delete_data_for_users() {
public function test_delete_data_for_users(): void {
global $DB;

$sortvoting = $this->sortvoting;
Expand Down

0 comments on commit 2247ed6

Please sign in to comment.