Skip to content

Commit d046efc

Browse files
committed
Add phpcs.xml with moodleBranch config to match CI sniff behavior
The LangFilesOrdering sniff only runs on Moodle 4.4+. Without moodleBranch set, local phpcs skipped the check because it couldn't detect the Moodle version. This caused CI failures that weren't caught locally. Also fixes the lang string ordering via phpcbf.
1 parent 8b5779e commit d046efc

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

lang/en/local_psaelmsync.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626

2727
$string['action'] = 'Action';
2828
$string['already_enrolled'] = 'Already Enrolled';
29-
$string['apitoken'] = 'API Token';
30-
$string['apitoken_desc'] = 'API Token for CData access. A Base64 encoded value of the username and password.';
3129
$string['apitest'] = 'API Test';
3230
$string['apitest_cleanup'] = 'Cleanup';
3331
$string['apitest_cleanup_btn'] = 'Delete all test records';
@@ -42,6 +40,8 @@
4240
$string['apitest_state'] = 'Enrolment pool';
4341
$string['apitest_suspendratio'] = 'Suspend ratio';
4442
$string['apitest_suspendratio_desc'] = 'Percentage of records that will be Suspend actions (drawn from the enrolled pool). Only applies when the pool has users from a previous run.';
43+
$string['apitoken'] = 'API Token';
44+
$string['apitoken_desc'] = 'API Token for CData access. A Base64 encoded value of the username and password.';
4545
$string['apiurl'] = 'Enrolment API URL';
4646
$string['apiurl_desc'] = 'CData Endpoint for enrolments.';
4747
$string['completion_apitoken'] = 'Completion API Token';

phpcs.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="local_psaelmsync">
3+
<description>PHPCS config for local_psaelmsync</description>
4+
<rule ref="moodle"/>
5+
<config name="moodleBranch" value="405"/>
6+
</ruleset>

0 commit comments

Comments
 (0)