Skip to content

Commit 8c0813c

Browse files
authored
Merge pull request #64 from mebis-lp/MBS-9797-coding-style-fixes
MBS-9797: Coding style fixes
2 parents 4b1b808 + c6cc5c6 commit 8c0813c

File tree

8 files changed

+27
-24
lines changed

8 files changed

+27
-24
lines changed

Diff for: .github/workflows/moodle-ci.yml

+5-11
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
services:
1010
postgres:
11-
image: postgres:13
11+
image: postgres:14
1212
env:
1313
POSTGRES_USER: 'postgres'
1414
POSTGRES_HOST_AUTH_METHOD: 'trust'
@@ -43,28 +43,22 @@ jobs:
4343
- php: '8.2'
4444
moodle-branch: 'main'
4545
database: 'pgsql'
46-
- php: '8.1'
47-
moodle-branch: 'main'
48-
database: 'mariadb'
49-
- php: '8.1'
50-
moodle-branch: 'main'
51-
database: 'pgsql'
5246
- php: '8.3'
53-
moodle-branch: 'MOODLE_404_STABLE'
47+
moodle-branch: 'MOODLE_405_STABLE'
5448
database: 'mariadb'
5549
- php: '8.3'
56-
moodle-branch: 'MOODLE_404_STABLE'
50+
moodle-branch: 'MOODLE_405_STABLE'
5751
database: 'pgsql'
5852
- php: '8.3'
5953
moodle-branch: 'MOODLE_404_STABLE'
6054
database: 'mariadb'
6155
- php: '8.3'
6256
moodle-branch: 'MOODLE_404_STABLE'
6357
database: 'pgsql'
64-
- php: '8.1'
58+
- php: '7.4'
6559
moodle-branch: 'MOODLE_401_STABLE'
6660
database: 'mariadb'
67-
- php: '8.1'
61+
- php: '7.4'
6862
moodle-branch: 'MOODLE_401_STABLE'
6963
database: 'pgsql'
7064

Diff for: classes/helper.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public static function send_notification(
207207
string $messagename,
208208
array $users,
209209
object $data,
210-
string $altmessagename = null,
210+
string $altmessagename = null, // phpcs:ignore
211211
bool $tocurrentuser = false
212212
) {
213213
global $OUTPUT, $USER;

Diff for: lang/en/kanban.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@
3838
$string['cardtitle'] = 'Card title';
3939
$string['changegroup'] = 'Change group board';
4040
$string['changeuser'] = 'Change user board';
41+
$string['closecard'] = 'Close card';
4142
$string['color'] = 'Color';
4243
$string['column'] = 'Column';
4344
$string['columntitle'] = 'Column title';
44-
$string['completioncreate'] = 'Create this number of cards';
4545
$string['completioncomplete'] = 'Complete this number of cards';
46-
$string['completiondetail:create'] = 'Create cards: {$a}';
46+
$string['completioncreate'] = 'Create this number of cards';
4747
$string['completiondetail:complete'] = 'Complete cards: {$a}';
48+
$string['completiondetail:create'] = 'Create cards: {$a}';
4849
$string['courseboard'] = 'Shared board';
49-
$string['closecard'] = 'Close card';
5050
$string['createtemplate'] = 'Create template';
5151
$string['deleteboard'] = 'Delete board';
5252
$string['deleteboardconfirm'] = 'Are you sure you want to delete this board? A new board will be created based on the template.';
@@ -79,18 +79,18 @@
7979
$string['history_card_deleted'] = '{$a->username} deleted card from column "{$a->columnname}"';
8080
$string['history_card_moved'] = '{$a->username} moved card to column "{$a->columnname}"';
8181
$string['history_card_reopened'] = '{$a->username} reopened the card';
82-
$string['history_card_updated'] = '{$a->username} changed card title to "{$a->title}"';
8382
$string['history_card_unassigned'] = '{$a->username} unassigned card from user {$a->affectedusername}';
83+
$string['history_card_updated'] = '{$a->username} changed card title to "{$a->title}"';
8484
$string['history_discussion_added'] = '{$a->username} added discussion message';
8585
$string['history_discussion_deleted'] = '{$a->username} deleted discussion message';
8686
$string['kanban:addcard'] = 'Add a card to a Kanban board';
8787
$string['kanban:addinstance'] = 'Add a Kanban board';
8888
$string['kanban:assignothers'] = 'Assign others to a card';
8989
$string['kanban:assignself'] = 'Assign self to a card';
9090
$string['kanban:editallboards'] = 'Edit all boards';
91-
$string['kanban:manageboard'] = 'Manage the board (templates, delete the board)';
9291
$string['kanban:manageallcards'] = 'Edit / move all cards';
9392
$string['kanban:manageassignedcards'] = 'Edit / move cards assigned to oneself';
93+
$string['kanban:manageboard'] = 'Manage the board (templates, delete the board)';
9494
$string['kanban:managecolumns'] = 'Edit the columns of the board';
9595
$string['kanban:view'] = 'View a Kanban board';
9696
$string['kanban:viewallboards'] = 'View all boards';
@@ -167,8 +167,8 @@
167167
$string['pushcardconfirm'] = 'This will send a copy of this card to all boards inside this kanban activity including templates. Existing copies will be replaced.';
168168
$string['reminderdate'] = 'Reminder date';
169169
$string['remindertask'] = 'Send reminder notifications';
170-
$string['reset_kanban'] = 'Reset shared boards';
171170
$string['reset_group'] = 'Reset group boards';
171+
$string['reset_kanban'] = 'Reset shared boards';
172172
$string['reset_personal'] = 'Reset personal boards';
173173
$string['saveastemplate'] = 'Save as template';
174174
$string['saveastemplateconfirm'] = 'Are you sure you want to save this board as a template? It will replace the current template if there is one.';

Diff for: tests/boardmanager_test.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2828
* @covers \mod_kanban\boardmanager
2929
*/
30-
class boardmanager_test extends \advanced_testcase {
30+
final class boardmanager_test extends \advanced_testcase {
3131
/** @var \stdClass The course used for testing */
3232
private $course;
3333
/** @var \stdClass The kanban used for testing */
@@ -39,8 +39,11 @@ class boardmanager_test extends \advanced_testcase {
3939
* Prepare testing environment
4040
*/
4141
public function setUp(): void {
42-
$this->resetAfterTest();
4342
global $DB;
43+
44+
parent::setUp();
45+
46+
$this->resetAfterTest();
4447
$this->course = $this->getDataGenerator()->create_course();
4548
$this->kanban = $this->getDataGenerator()->create_module('kanban', ['course' => $this->course]);
4649

Diff for: tests/change_kanban_content_test.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* @covers \mod_kanban\external\change_kanban_content
2727
* @runTestsInSeparateProcesses
2828
*/
29-
class change_kanban_content_test extends \advanced_testcase {
29+
final class change_kanban_content_test extends \advanced_testcase {
3030
/** @var \stdClass The course used for testing */
3131
private $course;
3232
/** @var \stdClass The kanban used for testing */
@@ -39,6 +39,9 @@ class change_kanban_content_test extends \advanced_testcase {
3939
*/
4040
public function setUp(): void {
4141
global $DB, $SCRIPT;
42+
43+
parent::setUp();
44+
4245
$this->course = $this->getDataGenerator()->create_course();
4346
$this->kanban = $this->getDataGenerator()->create_module('kanban', ['course' => $this->course]);
4447

Diff for: tests/generation_test.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2626
* @covers \mod_kanban_generator
2727
*/
28-
class generation_test extends \advanced_testcase {
28+
final class generation_test extends \advanced_testcase {
2929
/**
3030
* Tests the data generator for this module
3131
*

Diff for: tests/generator/lib.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class mod_kanban_generator extends testing_module_generator {
3030
* @param array|null $options
3131
* @return stdClass kanban instance
3232
*/
33-
public function create_instance($record = null, array $options = null): stdClass {
33+
public function create_instance($record = null, array $options = null): stdClass { // phpcs:ignore
3434
$record = (array) $record + [
3535
'name' => 'test kanban',
3636
'intro' => '',

Diff for: tests/task/reminder_test.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2828
* @covers \mod_kanban\task\reminder
2929
*/
30-
class reminder_test extends \advanced_testcase {
30+
final class reminder_test extends \advanced_testcase {
3131
/** @var \stdClass The course used for testing */
3232
private $course;
3333
/** @var \stdClass The kanban used for testing */
@@ -40,6 +40,9 @@ class reminder_test extends \advanced_testcase {
4040
*/
4141
public function setUp(): void {
4242
global $DB;
43+
44+
parent::setUp();
45+
4346
$this->course = $this->getDataGenerator()->create_course();
4447
$this->kanban = $this->getDataGenerator()->create_module('kanban', ['course' => $this->course]);
4548

0 commit comments

Comments
 (0)