public/main/my_space/access_details_session.php
The function getReport() has an NPath complexity of 6272280. The configured NPath complexity threshold is 200. Open
Open
function getReport($userId, $from, $to, $addTime = false)
{
$sessionCategories = UserManager::get_sessions_by_category($userId, false);
$report = [];
$minLogin = 0;
- Read upRead up
- Exclude checks
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
Open
$table = new HTML_Table(['class' => 'table table-hover table-striped data_table']);
- Read upRead up
- Exclude checks
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
Open
$table = new HTML_Table(['class' => 'table table-hover table-striped data_table']);
- Read upRead up
- Exclude checks
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
Open
$table = new HTML_Table(['class' => 'table table-hover table-striped data_table']);
- Read upRead up
- Exclude checks
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
Open
function customDate($dateTime, $showTime = false)
- Exclude checks
Consider putting global function "validateDate" in a static class Open
Open
function validateDate($value)
- Exclude checks
Missing function doc comment Open
Open
function getReport($userId, $from, $to, $addTime = false)
- Exclude checks
Variable "is_allowedToTrack" is not in valid camel caps format Open
Open
if (!$is_allowedToTrack) {
- Exclude checks
Variable "this_section" is not in valid camel caps format Open
Open
$this_section = SECTION_TRACKING;
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 20 Open
Open
$iconCourse.$data['name'][$courseId]
- Exclude checks
Consider putting global function "getReport" in a static class Open
Open
function getReport($userId, $from, $to, $addTime = false)
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 16 Open
Open
).'</div>';
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 12 Open
Open
).'</div>';
- Exclude checks
Variable "is_allowedToTrack" is not in valid camel caps format Open
Open
$is_allowedToTrack = api_is_platform_admin(true, true) ||
- Exclude checks
Variable "quote_simple" is not in valid camel caps format Open
Open
$quote_simple = "'";
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 16 Open
Open
$iconCalendar.get_lang('Date').': '.$dateToCheck
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 16 Open
Open
).'</div>';
- Exclude checks
Expected 0 spaces after opening bracket; newline found Open
Open
if (
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 16 Open
Open
$iconCalendar.get_lang('Date').': '.$dateToCheck
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 12 Open
Open
).'</div>';
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 20 Open
Open
$iconCourse.$data['name'][$courseId]
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
];
- Exclude checks