Showing 216 of 316 total issues
Method getServiceLinksNew
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getServiceLinksNew($variable)
{
global $xoopsUser, $xoopsDB, $xoopsModule, $xoopsConfig, $myts;
$helper = Helper::getInstance();
Method isUtf8
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function isUtf8($Str)
{ # by bmorel at ssi dot fr
for ($i = 0, $iMax = mb_strlen($Str); $i < $iMax; ++$i) {
if (\ord($Str[$i]) < 0x80) {
continue;
Method lx_serviceLinksnew
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function lx_serviceLinksnew($variable)
{
global $xoopsUser, $xoopsDB, $xoopsModule, $xoopsModuleConfig, $xoopsConfig, $myts;
$srvlinks2 = '<a title="'
. _MD_LEXIKON_PRINTTERM
Method getServerStats
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getServerStats()
{
//mb $wfdownloads = WfdownloadsWfdownloads::getInstance();
$moduleDirName = \basename(\dirname(__DIR__, 2));
$moduleDirNameUpper = mb_strtoupper($moduleDirName);
Method updateBlock
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function updateBlock($bid, $btitle, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options, $groups)
Method FormImport
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function FormImport()
{
global $xoopsConfig, $xoopsDB, $xoopsModule;
//lx_importMenu(9);
echo "<strong style='color: #2F5376; margin-top:6px; font-size:medium'>" . _AM_LEXIKON_IMPORT_DICTIONARY . '</strong><br><br>';
Method FormImport
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function FormImport()
{
global $xoopsConfig, $xoopsDB, $xoopsModule;
//lx_importMenu(9);
echo "<strong style='color: #2F5376; margin-top:6px; font-size:medium'>" . _AM_LEXIKON_IMPORT_GLOSSAIRE . '</strong><br><br>';
Method FormImport
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function FormImport()
{
global $xoopsConfig, $xoopsDB, $xoopsModule;
//lx_importMenu(9);
echo "<strong style='color: #2F5376; margin-top:6px; font-size:medium'>" . _AM_LEXIKON_IMPORT_XWORDS . '</strong><br><br>';
Method lx_AuthorProfile
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function lx_AuthorProfile($uid)
{
require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
global $authortermstotal, $xoopsTpl, $xoopsDB, $xoopsUser, $xoopsModuleConfig;
$myts = \MyTextSanitizer::getInstance();
Method FormImport
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function FormImport()
{
global $xoopsConfig, $xoopsDB, $xoopsModule;
//lx_importMenu(9);
echo "<strong style='color: #2F5376; margin-top:6px; font-size:medium'>" . _AM_LEXIKON_IMPORT_WORDBOOK . '</strong><br><br>';
Method FormImport
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function FormImport()
{
global $xoopsConfig, $xoopsDB, $xoopsModule;
//lx_importMenu(9);
echo "<strong style='color: #2F5376; margin-top:6px; font-size:medium'>" . _AM_LEXIKON_IMPORT_WIWIMOD . '</strong><br><br>';
Method lx_showSearchForm
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function lx_showSearchForm()
{
global $xoopsUser, $xoopsDB, $xoopsModule, $xoopsModuleConfig, $xoopsConfig;
/** @var \XoopsGroupPermHandler $grouppermHandler */
$grouppermHandler = xoops_getHandler('groupperm');
Method getFormSearch
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getFormSearch($type = '3', $categoryID = '0', $term = '')
{
global $xoopsUser, $xoopsDB, $xoopsModule, $xoopsConfig;
$helper = Helper::getInstance();
Method getFormFilter
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getFormFilter()
{
global $xoopsUser, $xoopsDB, $xoopsModule, $xoopsConfig;
$helper = Helper::getInstance();
Function check_browser_can_use_spaw
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
function check_browser_can_use_spaw()
{
$browser = $_SERVER['HTTP_USER_AGENT'];
// check if msie
if (preg_match('/MSIE[^;]*/i', $browser, $msie)) {
- 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
Function _loadAllChildItemIds
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
public function _loadAllChildItemIds($itemId, &$childIds)
{
if (!empty($this->_itemTree[$itemId]['children'])) {
$first_child = $this->_itemTree[$itemId]['children'];
foreach ($first_child as $fcid) {
- 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 loadSampleData
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function loadSampleData()
{
global $xoopsConfig;
$moduleDirName = \basename(\dirname(__DIR__));
$moduleDirNameUpper = mb_strtoupper($moduleDirName);
Method b_lxentries_new_edit
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function b_lxentries_new_edit($options)
{
$form = "<table style='width:100%;' class='bg2'>";
$form .= "<tr><th style='width:50%'>" . _OPTIONS . "</th><th style='width:50%'>" . _MB_LEXIKON_SETTINGS . '</th></tr>';
$form .= "<tr><td class='even'>" . _MB_LEXIKON_ORDER . "</td><td class='odd'>";
Method b_lxentries_top_edit
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function b_lxentries_top_edit($options)
{
$form = "<table width='100%' border='0' class='bg2'>";
$form .= "<tr><th width='50%'>" . _OPTIONS . "</th><th width='50%'>" . _MB_LEXIKON_SETTINGS . '</th></tr>';
$form .= "<tr><td class='even'>" . _MB_LEXIKON_ORDER . "</td><td class='odd'>";
Method getCategoryArray
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getCategoryArray()
{
global $xoopsDB, $xoopsUser, $xoopsModule;
$helper = Helper::getInstance();