chamilo/chamilo-lms

View on GitHub
public/main/my_space/access_details_session.php

Summary

Maintainability
A
0 mins
Test Coverage

The function getReport() has an NPath complexity of 6272280. The configured NPath complexity threshold is 200.
Open

function getReport($userId, $from, $to, $addTime = false)
{
    $sessionCategories = UserManager::get_sessions_by_category($userId, false);
    $report = [];
    $minLogin = 0;

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

Source https://phpmd.org/rules/codesize.html#npathcomplexity

Missing class import via use statement (line '249', column '18').
Open

    $table = new HTML_Table(['class' => 'table table-hover table-striped data_table']);

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '311', column '22').
Open

        $table = new HTML_Table(['class' => 'table table-hover table-striped data_table']);

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '281', column '26').
Open

            $table = new HTML_Table(['class' => 'table table-hover table-striped data_table']);

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Consider putting global function "customDate" in a static class
Open

function customDate($dateTime, $showTime = false)

Consider putting global function "validateDate" in a static class
Open

function validateDate($value)

Missing function doc comment
Open

function getReport($userId, $from, $to, $addTime = false)

Variable "is_allowedToTrack" is not in valid camel caps format
Open

if (!$is_allowedToTrack) {

Variable "this_section" is not in valid camel caps format
Open

$this_section = SECTION_TRACKING;

Multi-line function call not indented correctly; expected 16 spaces but found 20
Open

                    $iconCourse.$data['name'][$courseId]

Consider putting global function "getReport" in a static class
Open

function getReport($userId, $from, $to, $addTime = false)

Multi-line function call not indented correctly; expected 12 spaces but found 16
Open

                ).'</div>';

Multi-line function call not indented correctly; expected 8 spaces but found 12
Open

            ).'</div>';

Variable "is_allowedToTrack" is not in valid camel caps format
Open

$is_allowedToTrack = api_is_platform_admin(true, true) ||

Variable "quote_simple" is not in valid camel caps format
Open

$quote_simple = "'";

Multi-line function call not indented correctly; expected 12 spaces but found 16
Open

                $iconCalendar.get_lang('Date').': '.$dateToCheck

Multi-line function call not indented correctly; expected 12 spaces but found 16
Open

                ).'</div>';

Expected 0 spaces after opening bracket; newline found
Open

                    if (

Multi-line function call not indented correctly; expected 12 spaces but found 16
Open

                $iconCalendar.get_lang('Date').': '.$dateToCheck

Multi-line function call not indented correctly; expected 8 spaces but found 12
Open

            ).'</div>';

Multi-line function call not indented correctly; expected 16 spaces but found 20
Open

                    $iconCourse.$data['name'][$courseId]

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    ];

There are no issues that match your filters.

Category
Status