xAPI-vle/moodle-logstore_xapi

View on GitHub
src/transformer/events/mod_wiki/comment_created.php

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 2 of 2 total issues

Method comment_created has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function comment_created(array $config, \stdClass $event) {
$repo = $config['repo'];
$user = $repo->read_record_by_id('user', $event->userid);
$course = $repo->read_record_by_id('course', $event->courseid);
$comment = $repo->read_record_by_id('comments', $event->objectid);
Severity: Minor
Found in src/transformer/events/mod_wiki/comment_created.php - About 1 hr to fix

Identical blocks of code found in 2 locations. Consider refactoring.
Open

'context' => [
...utils\get_context_base($config, $event, $lang, $course),
'contextActivities' => [
'parent' => [
utils\get_activity\wiki_page(
Severity: Minor
Found in src/transformer/events/mod_wiki/comment_created.php and 1 other location - About 30 mins to fix
src/transformer/events/mod_wiki/comments_viewed.php on lines 56..75

There are no issues that match your filters.

Category
Status