Showing 24 of 586 total issues
File main.php
has 598 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// ------------------------------------------------------------------------ //
// -- XoopsHP Module -- Xoops e-Learning System //
// Copyright (c) 2005 SUDOW-SOKEN //
// <http://www.mailpark.co.jp/> //
File index.php
has 526 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// ------------------------------------------------------------------------ //
// -- XoopsHP Module -- Xoops e-Learning System //
// Copyright (c) 2005 SUDOW-SOKEN //
// <http://www.mailpark.co.jp/> //
Function listarticles
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
function listarticles($secid)
{
global $xoopsConfig, $xoopsModuleConfig, $xoopsUser, $xoopsDB, $xoopsTheme, $xoopsLogger, $xoopsModule, $xoopsTpl, $isModAdmin, $xoopsUserIsAdmin;
include dirname(dirname(__DIR__)) . '/header.php';
$myts = MyTextSanitizer::getInstance();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method sections
has 180 lines of code (exceeds 25 allowed). Consider refactoring. Open
function sections($secid2show = 0)
{
global $xoopsConfig, $xoopsDB, $xoopsModule, $xoopsModuleConfig;
xoops_cp_header();
// JS for checkbox manipulation
Function sections
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
function sections($secid2show = 0)
{
global $xoopsConfig, $xoopsDB, $xoopsModule, $xoopsModuleConfig;
xoops_cp_header();
// JS for checkbox manipulation
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method listarticles
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
function listarticles($secid)
{
global $xoopsConfig, $xoopsModuleConfig, $xoopsUser, $xoopsDB, $xoopsTheme, $xoopsLogger, $xoopsModule, $xoopsTpl, $isModAdmin, $xoopsUserIsAdmin;
include dirname(dirname(__DIR__)) . '/header.php';
$myts = MyTextSanitizer::getInstance();
Function listsections
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
function listsections()
{
global $xoopsConfig, $xoopsModuleConfig, $xoopsDB, $xoopsUser, $xoopsTheme, $xoopsLogger, $xoopsModule, $xoopsTpl, $isModAdmin, $xoopsUserIsAdmin, $xoopsModuleConfig;
include XOOPS_ROOT_PATH . '/header.php';
$myts = MyTextSanitizer::getInstance();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method portfolio
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
function portfolio($sort_key, $secid)
{
global $xoopsConfig, $xoopsModuleConfig, $xoopsUser, $xoopsDB, $xoopsTheme, $xoopsLogger, $xoopsModule, $xoopsTpl, $isModAdmin, $xoopsUserIsAdmin;
include dirname(dirname(__DIR__)) . '/header.php';
$myts = MyTextSanitizer::getInstance();
Method listsections
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
function listsections()
{
global $xoopsConfig, $xoopsModuleConfig, $xoopsDB, $xoopsUser, $xoopsTheme, $xoopsLogger, $xoopsModule, $xoopsTpl, $isModAdmin, $xoopsUserIsAdmin, $xoopsModuleConfig;
include XOOPS_ROOT_PATH . '/header.php';
$myts = MyTextSanitizer::getInstance();
Method secartedit
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
function secartedit($artid)
{
global $xoopsDB, $xoopsConfig, $xoopsModule, $xoopsModuleConfig;
$myts = MyTextSanitizer::getInstance();
xoops_cp_header();
Method viewdetails
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
function viewdetails($artid, $sort_key)
{
global $xoopsConfig, $xoopsModuleConfig, $xoopsUser, $xoopsDB, $xoopsTheme, $xoopsLogger, $xoopsModule, $xoopsTpl, $isModAdmin, $xoopsUserIsAdmin;
include dirname(dirname(__DIR__)) . '/header.php';
$myts = MyTextSanitizer::getInstance();
Function portfolio
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function portfolio($sort_key, $secid)
{
global $xoopsConfig, $xoopsModuleConfig, $xoopsUser, $xoopsDB, $xoopsTheme, $xoopsLogger, $xoopsModule, $xoopsTpl, $isModAdmin, $xoopsUserIsAdmin;
include dirname(dirname(__DIR__)) . '/header.php';
$myts = MyTextSanitizer::getInstance();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method viewresults
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
function viewresults($artid, $sort_key)
{
global $xoopsConfig, $xoopsModuleConfig, $xoopsUser, $xoopsDB, $xoopsTheme, $xoopsLogger, $xoopsModule, $xoopsTpl, $isModAdmin, $xoopsUserIsAdmin;
include dirname(dirname(__DIR__)) . '/header.php';
$myts = MyTextSanitizer::getInstance();
Method sectionedit
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
function sectionedit($secid)
{
global $xoopsDB, $xoopsConfig, $xoopsModule, $xoopsModuleConfig;
xoops_cp_header();
echo '<h4>' . _AM_SECCONF . '</h4><br>';
Function viewarticle
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function viewarticle($artid)
{
global $xoopsConfig, $xoopsModuleConfig, $xoopsUser, $xoopsDB, $xoopsTpl, $isModAdmin, $xoopsUserIsAdmin;
$myts = MyTextSanitizer::getInstance();
$artid = (int)$artid;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method my_wrapper
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function my_wrapper($msg)
{
global $xoopsConfig, $xoopsTheme, $xoopsConfigMetaFooter;
$myts = MyTextSanitizer::getInstance();
Function viewdetails
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function viewdetails($artid, $sort_key)
{
global $xoopsConfig, $xoopsModuleConfig, $xoopsUser, $xoopsDB, $xoopsTheme, $xoopsLogger, $xoopsModule, $xoopsTpl, $isModAdmin, $xoopsUserIsAdmin;
include dirname(dirname(__DIR__)) . '/header.php';
$myts = MyTextSanitizer::getInstance();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method viewarticle
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function viewarticle($artid)
{
global $xoopsConfig, $xoopsModuleConfig, $xoopsUser, $xoopsDB, $xoopsTpl, $isModAdmin, $xoopsUserIsAdmin;
$myts = MyTextSanitizer::getInstance();
$artid = (int)$artid;
Method b_XHP_courseranking_edit
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_XHP_courseranking_edit($options)
{
global $xoopsDB, $xoopsUser, $xoopsConfig, $xoopsModule;
$myts = MyTextSanitizer::getInstance();
$form = _MB_XHP_ITEMS_ORDER . " <select name='options[]'>";
Function secartedit
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function secartedit($artid)
{
global $xoopsDB, $xoopsConfig, $xoopsModule, $xoopsModuleConfig;
$myts = MyTextSanitizer::getInstance();
xoops_cp_header();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"