Skip to content

Commit da6a3c9

Browse files
committed
Fixed local_codechecker errors
1 parent d17d9e5 commit da6a3c9

File tree

26 files changed

+27
-27
lines changed

26 files changed

+27
-27
lines changed

classes/element_helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ public static function get_courseid($elementid) {
477477
* @param int $elementid The element id
478478
* @return \context The context
479479
*/
480-
public static function get_context(int $elementid) : \context {
480+
public static function get_context(int $elementid): \context {
481481
global $DB;
482482

483483
$sql = "SELECT ct.contextid

classes/privacy/provider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class provider implements
4949
* @param collection $items a reference to the collection to use to store the metadata.
5050
* @return collection the updated collection of metadata items.
5151
*/
52-
public static function get_metadata(collection $items) : collection {
52+
public static function get_metadata(collection $items): collection {
5353
$items->add_database_table(
5454
'customcert_issues',
5555
[
@@ -71,7 +71,7 @@ public static function get_metadata(collection $items) : collection {
7171
* @param int $userid the userid.
7272
* @return contextlist the list of contexts containing user info for the user.
7373
*/
74-
public static function get_contexts_for_userid(int $userid) : contextlist {
74+
public static function get_contexts_for_userid(int $userid): contextlist {
7575
$sql = "SELECT c.id
7676
FROM {context} c
7777
INNER JOIN {course_modules} cm

element/bgimage/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/border/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/categoryname/classes/element.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function render_html() {
6161
*
6262
* @return string
6363
*/
64-
protected function get_category_name() : string {
64+
protected function get_category_name(): string {
6565
global $DB, $SITE;
6666

6767
$courseid = \mod_customcert\element_helper::get_courseid($this->get_id());

element/categoryname/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/code/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/coursefield/classes/element.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function definition_after_data($mform) {
125125
* @param bool $preview Is this a preview?
126126
* @return string
127127
*/
128-
protected function get_course_field_value(\stdClass $course, bool $preview) : string {
128+
protected function get_course_field_value(\stdClass $course, bool $preview): string {
129129

130130
// The user field to display.
131131
$field = $this->get_data();

element/coursefield/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3939
*
4040
* @return string
4141
*/
42-
public static function get_reason() : string {
42+
public static function get_reason(): string {
4343
return 'privacy:metadata';
4444
}
4545
}

element/coursename/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/date/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/daterange/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/digitalsignature/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/grade/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/gradeitemname/classes/element.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public function after_restore($restore) {
144144
*
145145
* @return string
146146
*/
147-
protected function get_grade_item_name() : string {
147+
protected function get_grade_item_name(): string {
148148
global $DB;
149149

150150
$gradeitem = $this->get_data();

element/gradeitemname/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/image/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/qrcode/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/studentname/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/teachername/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/text/classes/element.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function definition_after_data($mform) {
9898
*
9999
* @return string
100100
*/
101-
protected function get_text() : string {
101+
protected function get_text(): string {
102102
$context = \mod_customcert\element_helper::get_context($this->get_id());
103103
return format_text($this->get_data(), FORMAT_HTML, ['context' => $context]);
104104
}

element/text/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/userfield/classes/element.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function definition_after_data($mform) {
129129
* @param bool $preview Is this a preview?
130130
* @return string
131131
*/
132-
protected function get_user_field_value(\stdClass $user, bool $preview) : string {
132+
protected function get_user_field_value(\stdClass $user, bool $preview): string {
133133
global $CFG, $DB;
134134

135135
// The user field to display.

element/userfield/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/userpicture/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*
2020
* @package mod_customcert
2121
* @copyright 2013 Mark Nelson <[email protected]>
22-
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or late
22+
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2323
*/
2424

2525
defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');

0 commit comments

Comments
 (0)