Skip to content

Commit

Permalink
Apply updated PHPCS rules
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewhancox committed Jun 17, 2024
1 parent d4f864a commit 350cd1b
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 42 deletions.
29 changes: 14 additions & 15 deletions lang/en/local_aspiredu.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,28 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

$string['pluginname'] = 'AspirEDU';
$string['coursesettings'] = 'AspirEDU course settings';
$string['coursestartdate'] = 'Course start date';
$string['adminacc'] = 'Only Administrators with account';
$string['adminacccinstcourse'] = 'Administrators with account and Instructors with course';
$string['adminacccourse'] = 'Only Administrators with account plus course';
$string['adminacccourseinstcourse'] = 'Administrators with account plus course and Instructors with course';
$string['admincourseinstcourse'] = 'Administrators with course and instructors with course';
$string['aspiredu:inaccessmanagement'] = 'Available as admin in Dropout Detective and Instructor Insight';
$string['aspiredu:viewdropoutdetective'] = 'View Dropout Detective';
$string['aspiredu:viewinstructorinsight'] = 'View Instructor Insight';
$string['courseenddate'] = 'Course end date';
$string['courseenddaterror'] = 'The end date must be higher than the start date';
$string['coursesettings'] = 'AspirEDU course settings';
$string['coursestartdate'] = 'Course start date';
$string['disabled'] = 'No links';
$string['dropoutdetective'] = 'Dropout Detective';
$string['dropoutdetectivelinks'] = 'Dropout Detective links';
$string['dropoutdetectiveurl'] = 'Dropout Detective URL';
$string['instcourse'] = 'Only instructors with course';
$string['instructorinsight'] = 'Instructor Insight';
$string['instructorinsightlinks'] = 'Instructor Insight links';
$string['instructorinsighturl'] = 'Instructor Insight URL';
$string['key'] = 'Key';
$string['secret'] = 'Secret';
$string['disabled'] = 'No links';
$string['adminacccourseinstcourse'] = 'Administrators with account plus course and Instructors with course';
$string['adminacccinstcourse'] = 'Administrators with account and Instructors with course';
$string['admincourseinstcourse'] = 'Administrators with course and instructors with course';
$string['adminacccourse'] = 'Only Administrators with account plus course';
$string['adminacc'] = 'Only Administrators with account';
$string['instcourse'] = 'Only instructors with course';
$string['aspiredu:viewdropoutdetective'] = 'View Dropout Detective';
$string['aspiredu:viewinstructorinsight'] = 'View Instructor Insight';
$string['aspiredu:inaccessmanagement'] = 'Available as admin in Dropout Detective and Instructor Insight';
// Privacy.
$string['pluginname'] = 'AspirEDU';
$string['privacy:metadata:aspiredu_provider'] = 'The AspirEDU plugin provides user information and context to the AspirEDU servers.';
$string['privacy:metadata:aspiredu_provider:courseid'] = 'The ID of the course the user is enrolled.';
$string['privacy:metadata:aspiredu_provider:discussionid'] = 'The ID of the discussion the user has participated.';
Expand All @@ -61,3 +59,4 @@
$string['privacy:metadata:aspiredu_provider:lastname'] = 'The last name of the user.';
$string['privacy:metadata:aspiredu_provider:userid'] = 'The ID of the user.';
$string['privacy:metadata:aspiredu_provider:username'] = 'The username of the user.';
$string['secret'] = 'Secret';
6 changes: 3 additions & 3 deletions tests/core_course_get_courses_paginated_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* Tests for core_course_get_courses_paginated WS function.
* @covers \local_aspiredu\external\core_course_get_courses_paginated
*/
class core_course_get_courses_paginated_test extends externallib_advanced_testcase {
final class core_course_get_courses_paginated_test extends externallib_advanced_testcase {

protected function setUp(): void {
global $CFG;
Expand All @@ -57,7 +57,7 @@ protected function setUp(): void {
* Test calling the function.
* @runInSeparateProcess
*/
public function test_get_courses() {
public function test_get_courses(): void {
global $DB;

$generatedcourses = [];
Expand Down Expand Up @@ -211,7 +211,7 @@ public function test_get_courses_customfields(): void {
* Test calling the function where the user does not have required capability on any courses.
* @runInSeparateProcess
*/
public function test_get_courses_without_capability() {
public function test_get_courses_without_capability(): void {
$this->resetAfterTest();

$course1 = static::getDataGenerator()->create_course();
Expand Down
4 changes: 2 additions & 2 deletions tests/core_grades_get_course_grades_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* Tests for core_grades_get_course_grades WS function.
* @covers \local_aspiredu\external\core_grades_get_course_grades
*/
class core_grades_get_course_grades_test extends externallib_advanced_testcase {
final class core_grades_get_course_grades_test extends externallib_advanced_testcase {
protected function setUp(): void {
$this->resetAfterTest();
}
Expand All @@ -50,7 +50,7 @@ protected function setUp(): void {
* Test calling the function.
* @runInSeparateProcess
*/
public function test_get_courses() {
public function test_get_courses(): void {
$course = self::getDataGenerator()->create_course();
$student1 = static::getDataGenerator()->create_and_enrol($course);
$student2 = static::getDataGenerator()->create_and_enrol($course);
Expand Down
4 changes: 2 additions & 2 deletions tests/core_grades_get_grades_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
* Tests for core_grades_get_grades WS function.
* @covers \local_aspiredu\external\core_grades_get_grades
*/
class core_grades_get_grades_test extends externallib_advanced_testcase {
final class core_grades_get_grades_test extends externallib_advanced_testcase {

/**
* Load initial test information
Expand Down Expand Up @@ -150,7 +150,7 @@ protected function load_test_data($assignmentname, $student1rawgrade, $student2r
* Test calling the function.
* @runInSeparateProcess
*/
public function test_get_grades() {
public function test_get_grades(): void {
global $CFG;

$this->resetAfterTest();
Expand Down
4 changes: 2 additions & 2 deletions tests/get_plugin_info_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
* Tests for get_plugin_info WS function.
* @covers \local_aspiredu\external\get_plugin_info
*/
class get_plugin_info_test extends externallib_advanced_testcase {
final class get_plugin_info_test extends externallib_advanced_testcase {
/**
* Test calling the function.
* @runInSeparateProcess
*/
public function test_get_plugin_info() {
public function test_get_plugin_info(): void {
$this->resetAfterTest();
static::setAdminUser();

Expand Down
4 changes: 2 additions & 2 deletions tests/get_role_users_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @covers \local_aspiredu\external\get_role_users
*/
class get_role_users_test extends \externallib_advanced_testcase {
final class get_role_users_test extends \externallib_advanced_testcase {

/**
* Test calling the function.
* @runInSeparateProcess
*/
public function test_get_role_users() {
public function test_get_role_users(): void {
$this->resetAfterTest();
static::setAdminUser();

Expand Down
4 changes: 2 additions & 2 deletions tests/get_site_admins_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @covers \local_aspiredu\external\get_site_admins
*/
class get_site_admins_test extends \externallib_advanced_testcase {
final class get_site_admins_test extends \externallib_advanced_testcase {

/**
* Test calling the function.
* @runInSeparateProcess
*/
public function test_get_site_admins() {
public function test_get_site_admins(): void {
$this->resetAfterTest();
static::setAdminUser();

Expand Down
4 changes: 2 additions & 2 deletions tests/get_users_by_capabilities_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later/**
* @covers \local_aspiredu\external\get_users_by_capabilities
*/
class get_users_by_capabilities_test extends \externallib_advanced_testcase {
final class get_users_by_capabilities_test extends \externallib_advanced_testcase {

/**
* Test calling the function.
* @runInSeparateProcess
*/
public function test_get_users_by_capabilities() {
public function test_get_users_by_capabilities(): void {
$this->resetAfterTest();
static::setAdminUser();

Expand Down
4 changes: 2 additions & 2 deletions tests/get_users_by_roles_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @covers \local_aspiredu\external\get_users_by_roles
*/
class get_users_by_roles_test extends \externallib_advanced_testcase {
final class get_users_by_roles_test extends \externallib_advanced_testcase {

/**
* Test calling the function.
* @runInSeparateProcess
*/
public function test_get_users_by_capabilities() {
public function test_get_users_by_capabilities(): void {
$this->resetAfterTest();
static::setAdminUser();

Expand Down
4 changes: 2 additions & 2 deletions tests/gradereport_user_get_grade_items_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @covers \local_aspiredu\external\gradereport_user_get_grade_items::execute
*/
class gradereport_user_get_grade_items_test extends externallib_advanced_testcase {
final class gradereport_user_get_grade_items_test extends externallib_advanced_testcase {

/**
* Test calling the function.
* @runInSeparateProcess
*/
public function test_get_grade_items_force_inclusion_range_percentage() {
public function test_get_grade_items_force_inclusion_range_percentage(): void {
global $DB;

$this->resetAfterTest();
Expand Down
8 changes: 4 additions & 4 deletions tests/mod_forum_get_forum_discussion_posts_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@
* Tests for mod_forum_get_forum_discussion_posts WS function.
* @covers \local_aspiredu\external\mod_forum_get_forum_discussion_posts
*/
class mod_forum_get_forum_discussion_posts_test extends externallib_advanced_testcase {
final class mod_forum_get_forum_discussion_posts_test extends externallib_advanced_testcase {

/**
* Test calling the function.
* @runInSeparateProcess
*/
public function test_mod_forum_get_forum_discussion_posts() {
public function test_mod_forum_get_forum_discussion_posts(): void {
global $CFG, $PAGE;

$this->resetAfterTest();
Expand Down Expand Up @@ -253,7 +253,7 @@ public function test_mod_forum_get_forum_discussion_posts() {
* Test calling the function for deleted posts.
* @runInSeparateProcess
*/
public function test_mod_forum_get_forum_discussion_posts_deleted() {
public function test_mod_forum_get_forum_discussion_posts_deleted(): void {
$this->resetAfterTest();
$generator = self::getDataGenerator()->get_plugin_generator('mod_forum');

Expand Down Expand Up @@ -330,7 +330,7 @@ public function test_mod_forum_get_forum_discussion_posts_deleted() {
* Test calling the function.
* @runInSeparateProcess
*/
public function test_mod_forum_get_forum_discussion_posts_qanda() {
public function test_mod_forum_get_forum_discussion_posts_qanda(): void {
global $CFG, $DB;

$this->resetAfterTest();
Expand Down
4 changes: 2 additions & 2 deletions tests/privacy/provider_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
* Test for provider::get_metadata().
* @covers \local_aspiredu\privacy\provider
*/
class provider_test extends provider_testcase {
public function test_get_metadata() {
final class provider_test extends provider_testcase {
public function test_get_metadata(): void {
$collection = new collection('local_aspiredu');
$collection = provider::get_metadata($collection);
static::assertNotEmpty($collection);
Expand Down
4 changes: 2 additions & 2 deletions tests/report_log_get_log_records_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* Tests for report_log_get_log_records WS function.
* @covers \local_aspiredu\external\report_log_get_log_records
*/
class report_log_get_log_records_test extends externallib_advanced_testcase {
final class report_log_get_log_records_test extends externallib_advanced_testcase {
/**
* Basic setup for these tests.
*/
Expand All @@ -59,7 +59,7 @@ protected function setUp(): void {
* Test calling the function.
* @runInSeparateProcess
*/
public function test_get_courses() {
public function test_get_courses(): void {
global $DB;

static::setAdminUser();
Expand Down

0 comments on commit 350cd1b

Please sign in to comment.