xAPI-vle/moodle-logstore_xapi

View on GitHub
src/transformer/events/mod_facetoface/take_attendance.php

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 2 of 2 total issues

Method take_attendance has 54 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function take_attendance(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);
$lang = utils\get_course_lang($course);
Severity: Major
Found in src/transformer/events/mod_facetoface/take_attendance.php - About 2 hrs to fix

Function take_attendance has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function take_attendance(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);
$lang = utils\get_course_lang($course);
Severity: Minor
Found in src/transformer/events/mod_facetoface/take_attendance.php - About 25 mins to fix

There are no issues that match your filters.

Category
Status