XoopsModules25x/mylinks

View on GitHub

Showing 272 of 370 total issues

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

function addtoWin(addtoFullURL)
{
  if (!popupWin.closed && popupWin.location){
    popupWin.location.href = addtoFullURL;
    intervalMgr();
Severity: Minor
Found in include/addto-multi.js - About 25 mins to fix

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 MakeFontEncoding has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function MakeFontEncoding($map)
{
  //Build differences from reference encoding
  $ref=ReadMap('cp1252');
  $s='';
Severity: Minor
Found in fpdf/font/makefont/makefont.php - About 25 mins to fix

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 skipExt has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  function skipExt(&$data, &$extLen)
  {
    $extLen = 0;

    $b = ord($data{0});
Severity: Minor
Found in fpdf/gif.php - About 25 mins to fix

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 _encoding has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  function _encoding(&$text, $in_charset, $out_charset)
  {
    $xconv_handler = @xoops_getmodulehandler('xconv', 'xconv', true);
    if($xconv_handler &&
      $converted_text = @$xconv_handler->convert_encoding($text, $out_charset, $in_charset)
Severity: Minor
Found in fpdf/language/korean.php - About 25 mins to fix

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 _encoding has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  function _encoding(&$text, $in_charset, $out_charset)
  {
    $xconv_handler = @xoops_getmodulehandler('xconv', 'xconv', true);
    if($xconv_handler &&
      $converted_text = @$xconv_handler->convert_encoding($text, $out_charset, $in_charset)
Severity: Minor
Found in fpdf/language/french.php - About 25 mins to fix

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 getErrors has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        public function getErrors($ashtml = true)
        {
            if ($ashtml) {
                $ret = '';
                foreach ($this->_errors as $msg) {
Severity: Minor
Found in include/gtickets.php - About 25 mins to fix

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 mylinks_search has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function mylinks_search($queryarray, $andor, $limit, $offset, $userid)
{
    global $xoopsDB;
    $sql = 'SELECT l.lid,l.cid,l.title,l.submitter,l.date,t.description FROM ' . $xoopsDB->prefix('mylinks_links') . ' l LEFT JOIN ' . $xoopsDB->prefix('mylinks_text') . ' t ON t.lid=l.lid WHERE status>0';
    if ($userid != 0) {
Severity: Minor
Found in include/search.inc.php - About 25 mins to fix

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 _block has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function _block($xbeg, $xlen, $ybeg, $ylen, &$edits)
    {
        $output = $this->_startBlock($this->_blockHeader($xbeg, $xlen, $ybeg, $ylen));

        foreach ($edits as $edit) {
Severity: Minor
Found in class/Text_Diff_Renderer.php - About 25 mins to fix

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 _lcsPos has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function _lcsPos($ypos)
    {
        $end = $this->lcs;
        if ($end == 0 || $ypos > $this->seq[$end]) {
            $this->seq[++$this->lcs] = $ypos;
Severity: Minor
Found in class/Text_Diff.php - About 25 mins to fix

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 modCatS has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function modCatS()
{
    global $xoopsDB, $myts, $xoopsModule;
    $cid    = MylinksUtility::mylinks_cleanVars($_POST, 'cid', 0, 'int', array('min' => 0));
    $imgurl = MylinksUtility::mylinks_cleanVars($_POST, 'imgurl', '', 'string');
Severity: Minor
Found in admin/main.php - About 25 mins to fix

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 modLink has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function modLink()
{
    global $xoopsDB, $myts, $myCatTree, $xoopsModule;

    $linkimg_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/images/shots/');
Severity: Minor
Found in admin/main.php - About 25 mins to fix

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 approve has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function approve()
{
    global $xoopsDB, $myts, $xoopsModule;

    $lid         = MylinksUtility::mylinks_cleanVars($_POST, 'lid', 0, 'int', array('min' => 0));
Severity: Minor
Found in admin/main.php - About 25 mins to fix

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

Severity
Category
Status
Source
Language