Skip to content

Commit 451d170

Browse files
committed
Fix coding style (phpcs) issues reported by CI
1 parent 6851bea commit 451d170

5 files changed

Lines changed: 27 additions & 20 deletions

File tree

font.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@
2727
require_login();
2828

2929
// Echo out a CSS file with the font path.
30-
header("Content-Type: text/css");
31-
echo "/* audiowide-regular - latin */";
32-
echo "@font-face {";
33-
echo " font-family: 'Audiowide';";
34-
echo " font-style: normal;";
35-
echo " font-weight: 400;";
36-
echo " src: local(''),";
30+
header('Content-Type: text/css');
31+
echo '/* audiowide-regular - latin */';
32+
echo '@font-face {';
33+
echo ' font-family: "Audiowide";';
34+
echo ' font-style: normal;';
35+
echo ' font-weight: 400;';
36+
echo ' src: local(""),';
3737
// Modern Browser Support - Chrome 26+, Opera 23+, Firefox 39+.
38-
echo " url('$CFG->wwwroot/mod/quizgame/lib/audiowide/audiowide-v14-latin-ext_latin-regular.woff2') format('woff2'),";
38+
echo ' url("' . $CFG->wwwroot . '/mod/quizgame/lib/audiowide/audiowide-v14-latin-ext_latin-regular.woff2") format("woff2"),';
3939
// Older Browser Support - Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+.
40-
echo " url('$CFG->wwwroot/mod/quizgame/lib/audiowide/audiowide-v14-latin-ext_latin-regular.woff') format('woff');";
41-
echo "}";
40+
echo ' url("' . $CFG->wwwroot . '/mod/quizgame/lib/audiowide/audiowide-v14-latin-ext_latin-regular.woff") format("woff");';
41+
echo '}';

grade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@
3535
require_login($course, false, $cm);
3636

3737
// In the simplest case just redirect to the view page.
38-
redirect('view.php?id='.$id);
38+
redirect('view.php?id=' . $id);

tests/custom_completion_test.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
* @covers \mod_quizgame\completion\custom_completion
4747
*/
4848
final class custom_completion_test extends advanced_testcase {
49-
5049
/**
5150
* Data provider for get_state().
5251
*

tests/generator/lib.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2828
*/
2929
class mod_quizgame_generator extends testing_module_generator {
30-
3130
/**
3231
* Create an instance of mod_quizgame with some default settings
3332
* @param array|stdClass $record quizgame settings
@@ -58,7 +57,7 @@ public function create_content($quizgame, $record = []) {
5857
'quizgameid' => $quizgame->id,
5958
'timecreated' => $now,
6059
'userid' => $USER->id,
61-
'score' => mt_rand (0, 50000),
60+
'score' => mt_rand(0, 50000),
6261
];
6362

6463
$id = $DB->insert_record('quizgame_scores', $record);

tests/mod_quizgame_lib_testcase.php

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,14 @@ public function test_quizgame_core_calendar_provide_event_action() {
4848
$this->setAdminUser();
4949
// Create the activity.
5050
$course = $this->getDataGenerator()->create_course();
51-
$quizgame = $this->getDataGenerator()->create_module('quizgame', ['course' => $course->id]);
51+
$quizgame = $this->getDataGenerator()->create_module(
52+
'quizgame',
53+
['course' => $course->id]
54+
);
5255
// Create a calendar event.
5356
$event = $this->create_action_event(
54-
$course->id, $quizgame->id,
57+
$course->id,
58+
$quizgame->id,
5559
\core_completion\api::COMPLETION_EVENT_TYPE_DATE_COMPLETION_EXPECTED
5660
);
5761
// Create an action factory.
@@ -78,7 +82,8 @@ public function test_quizgame_core_calendar_provide_event_action_for_non_user()
7882
$quizgame = $this->getDataGenerator()->create_module('quizgame', ['course' => $course->id]);
7983
// Create a calendar event.
8084
$event = $this->create_action_event(
81-
$course->id, $quizgame->id,
85+
$course->id,
86+
$quizgame->id,
8287
\core_completion\api::COMPLETION_EVENT_TYPE_DATE_COMPLETION_EXPECTED
8388
);
8489
// Now, log out.
@@ -134,14 +139,18 @@ public function test_quizgame_core_calendar_provide_event_action_already_complet
134139
// Create the activity.
135140
$course = $this->getDataGenerator()->create_course(['enablecompletion' => 1]);
136141
$quizgame = $this->getDataGenerator()->create_module(
137-
'quizgame', ['course' => $course->id],
138-
['completion' => 2, 'completionview' => 1, 'completionexpected' => time() + DAYSECS]
142+
'quizgame',
143+
['course' => $course->id],
144+
['completion' => 2,
145+
'completionview' => 1,
146+
'completionexpected' => time() + DAYSECS]
139147
);
140148
// Get some additional data.
141149
$cm = get_coursemodule_from_instance('quizgame', $quizgame->id);
142150
// Create a calendar event.
143151
$event = $this->create_action_event(
144-
$course->id, $quizgame->id,
152+
$course->id,
153+
$quizgame->id,
145154
\core_completion\api::COMPLETION_EVENT_TYPE_DATE_COMPLETION_EXPECTED
146155
);
147156
// Mark the activity as completed.

0 commit comments

Comments
 (0)