XoopsModules25x/mylinks

View on GitHub

Showing 272 of 370 total issues

Method SetFont has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function SetFont($family,$style='',$size=0)
{
  //Select a font; size given in points
  global $fpdf_charwidths;

Severity: Minor
Found in fpdf/fpdf.php - About 1 hr to fix

    Method b_system_info_show has 49 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function b_system_info_show($options)
    {
        global $xoopsConfig, $xoopsUser;
        $xoopsDB = XoopsDatabaseFactory::getDatabaseConnection();
        $myts    = MyTextSanitizer::getInstance();
    Severity: Minor
    Found in extras/XOOPS_2.5.x/htdocs/modules/system/blocks/system_blocks.php - About 1 hr to fix

      Method linksConfigMenu has 49 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function linksConfigMenu()
      {
          global $xoopsDB, $myts, $myCatTree, $xoopsModule;
      
          $mylinksCatHandler = xoops_getModuleHandler('category', $xoopsModule->getVar('dirname'));
      Severity: Minor
      Found in admin/main.php - About 1 hr to fix

        Method render has 49 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function render()
            {
                global $xoopsGTicket;
        
                // load all child ids for javascript codes
        Severity: Minor
        Found in admin/mygrouppermform.php - About 1 hr to fix

          Function b_system_online_show has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
          Open

          function b_system_online_show()
          {
              global $xoopsUser, $xoopsModule;
              $onlineHandler = xoops_getHandler('online');
              mt_srand((double)microtime() * 1000000);
          Severity: Minor
          Found in extras/XOOPS_2.5.x/htdocs/modules/system/blocks/system_blocks.php - About 1 hr 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 listBrokenLinks has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
          Open

          function listBrokenLinks()
          {
              global $xoopsDB, $xoopsModule, $pathIcon16, $myts;
          
              $result           = $xoopsDB->query('SELECT * FROM ' . $xoopsDB->prefix('mylinks_broken') . ' GROUP BY lid ORDER BY reportid DESC');
          Severity: Minor
          Found in admin/main.php - About 1 hr 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 xoops_module_pre_install_mylinks_base has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
          Open

          function xoops_module_pre_install_mylinks_base(&$xoopsModule)
          {
              global $xoopsDB;
              $retVal = true;
          
          
          Severity: Minor
          Found in include/oninstall.inc.php - About 1 hr 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

          Method b_system_online_show has 46 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function b_system_online_show()
          {
              global $xoopsUser, $xoopsModule;
              $onlineHandler = xoops_getHandler('online');
              mt_srand((double)microtime() * 1000000);
          Severity: Minor
          Found in extras/XOOPS_2.5.x/htdocs/modules/system/blocks/system_blocks.php - About 1 hr to fix

            Method PutImage has 45 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function PutImage($url,$scale)
              {
                if($scale<0) $scale=0;
                //$scale<=0: put NO image inside the pdf!
                if($scale>0){
            Severity: Minor
            Found in fpdf/makepdf_class.php - About 1 hr to fix

              Method GoogleCH has 45 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function GoogleCH($url, $length = null, $init = GOOGLE_MAGIC)
              {
                  if (null === $length) {
                      $length = count($url);
                  }
              Severity: Minor
              Found in bookmark.php - About 1 hr to fix

                Method _parsegif has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function _parsegif($file)
                  {
                    require_once 'gif.php'; //GIF class in pure PHP from Yamasoft (http://www.yamasoft.com/php-gif.zip)
                
                    $h=0;
                Severity: Minor
                Found in fpdf/makepdf_class.php - About 1 hr to fix

                  Method render has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function render($diff)
                      {
                          $xi      = $yi = 1;
                          $block   = false;
                          $context = array();
                  Severity: Minor
                  Found in class/Text_Diff_Renderer.php - About 1 hr to fix

                    Function _parsegif has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                    Open

                      function _parsegif($file)
                      {
                        require_once 'gif.php'; //GIF class in pure PHP from Yamasoft (http://www.yamasoft.com/php-gif.zip)
                    
                        $h=0;
                    Severity: Minor
                    Found in fpdf/makepdf_class.php - About 1 hr 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 OpenTag has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                    Open

                      function OpenTag($tag,$attr,$scale)
                      {
                          //Opening tag
                          switch($tag){
                              case 'STRONG':
                    Severity: Minor
                    Found in fpdf/makepdf_class.php - About 1 hr 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 GetCode has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                    Open

                      function GetCode(&$data, $bInit)
                      {
                        if($bInit) {
                          $this->CurBit   = 0;
                          $this->LastBit  = 0;
                    Severity: Minor
                    Found in fpdf/gif.php - About 1 hr 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 _compareseq has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function _compareseq($xoff, $xlim, $yoff, $ylim)
                        {
                            /* Slide down the bottom initial diagonal. */
                            while ($xoff < $xlim && $yoff < $ylim && $this->xv[$xoff] == $this->yv[$yoff]) {
                                ++$xoff;
                    Severity: Minor
                    Found in class/Text_Diff.php - About 1 hr 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

                    Method _putimages has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function _putimages()
                    {
                      $filter= $this->compress ? '/Filter /FlateDecode ' : '';
                      reset($this->images);
                      while(list($file,$info)=each($this->images))
                    Severity: Minor
                    Found in fpdf/fpdf.php - About 1 hr to fix

                      Method mylinks_notify_iteminfo has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function mylinks_notify_iteminfo($category, $item_id)
                      {
                          global $xoopsModule, $xoopsModuleConfig, $xoopsConfig, $xoopsDB;
                          $dirname = basename(dirname(__DIR__));
                      
                      
                      Severity: Minor
                      Found in include/notification.inc.php - About 1 hr to fix

                        Method AddFont has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function AddFont($family,$style='',$file='')
                        {
                          //Add a TrueType or Type1 font
                          $family=strtolower($family);
                          if($file=='')
                        Severity: Minor
                        Found in fpdf/fpdf.php - About 1 hr to fix

                          Method Image has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function Image($file,$x,$y,$w=0,$h=0,$type='',$link='')
                          {
                            //Put an image on the page
                            if(!isset($this->images[$file]))
                            {
                          Severity: Minor
                          Found in fpdf/fpdf.php - About 1 hr to fix
                            Severity
                            Category
                            Status
                            Source
                            Language