XoopsModules25x/mylinks

View on GitHub

Showing 272 of 370 total issues

File makepdf_class.php has 310 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
// $Id: makepdf_class.php 8112 2011-11-06 13:41:14Z beckmi $
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
Severity: Minor
Found in fpdf/makepdf_class.php - About 3 hrs to fix

    Method _putfonts has 86 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function _putfonts()
    {
      $nf=$this->n;
      foreach($this->diffs as $diff)
      {
    Severity: Major
    Found in fpdf/chinese.php - About 3 hrs to fix

      Method b_system_waiting_show has 86 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function b_system_waiting_show()
      {
          global $xoopsUser;
          $xoopsDB        = XoopsDatabaseFactory::getDatabaseConnection();
          $moduleHandler = xoops_getHandler('module');
      Severity: Major
      Found in extras/XOOPS_2.5.x/htdocs/modules/system/blocks/system_blocks.php - About 3 hrs to fix

        Function b_system_info_show has a Cognitive Complexity of 23 (exceeds 5 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 3 hrs 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 FPDF has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
        Open

        function FPDF($orientation='P',$unit='mm',$format='A4')
        {
          //Some checks
          $this->_dochecks();
          //Initialization of properties
        Severity: Minor
        Found in fpdf/fpdf.php - About 3 hrs 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 renderNav has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
        Open

            public function renderNav($offset = 5)
            {
                $ret = '';
                if ($this->total <= $this->perpage) {
                    return $ret;
        Severity: Minor
        Found in class/mylinkspagenav.php - About 3 hrs 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 setShotSize has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
        Open

            public function setShotSize($sz)
            {
                $validX  = array(90, 120, 200, 400, 480);
                $validY  = array(68, 90, 150, 300, 360);
                $sizeMap = array(0 => 't', 1 => 's', 2 => 'm', 3 => 'l', 4 => 'x');
        Severity: Minor
        Found in class/providers/pagepeeker.php - About 3 hrs 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 renderImageNav has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
        Open

            public function renderImageNav($offset = 5)
            {
                if ($this->total < $this->perpage) {
                    return;
                }
        Severity: Minor
        Found in class/mylinkspagenav.php - About 3 hrs 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 getBmp has 80 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function getBmp($bgColor)
          {
            $out = '';
        
            if(!$this->m_bLoaded) {
        Severity: Major
        Found in fpdf/gif.php - About 3 hrs to fix

          File bookmark.php has 299 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          
          include __DIR__ . '/header.php';
          include_once __DIR__ . '/class/utility.php';
          //xoops_load('utility', $xoopsModule->getVar('dirname'));
          Severity: Minor
          Found in bookmark.php - About 3 hrs to fix

            Method listModReq has 79 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function listModReq()
            {
                global $xoopsDB, $myts, $xoopsModuleConfig, $xoopsModule;
            
                $result           = $xoopsDB->query('SELECT requestid, lid, cid, title, url, logourl, description, modifysubmitter FROM ' . $xoopsDB->prefix('mylinks_mod') . ' ORDER BY requestid');
            Severity: Major
            Found in admin/main.php - About 3 hrs to fix

              Function delCat has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
              Open

              function delCat()
              {
                  global $xoopsDB, $myCatTree, $xoopsModule, $xoopsUser;
              
                  $cid = MylinksUtility::mylinks_cleanVars($_REQUEST, 'cid', 0, 'int', array('min' => 0));
              Severity: Minor
              Found in admin/main.php - About 3 hrs 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 listModReq has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
              Open

              function listModReq()
              {
                  global $xoopsDB, $myts, $xoopsModuleConfig, $xoopsModule;
              
                  $result           = $xoopsDB->query('SELECT requestid, lid, cid, title, url, logourl, description, modifysubmitter FROM ' . $xoopsDB->prefix('mylinks_mod') . ' ORDER BY requestid');
              Severity: Minor
              Found in admin/main.php - About 3 hrs 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 getPng has 77 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function getPng($bgColor)
                {
                  $out = '';
              
                  if(!$this->m_bLoaded) {
              Severity: Major
              Found in fpdf/gif.php - About 3 hrs to fix

                Method modLink has 76 lines of code (exceeds 25 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: Major
                Found in admin/main.php - About 3 hrs to fix

                  Method diff has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function diff($from_lines, $to_lines)
                      {
                          $n_from = count($from_lines);
                          $n_to   = count($to_lines);
                  
                  
                  Severity: Major
                  Found in class/Text_Diff.php - About 3 hrs to fix

                    Function draw_repost_form has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                    Open

                            public function draw_repost_form($area = '')
                            {
                                // Notify which file is broken
                                if (headers_sent()) {
                                    restore_errorHandler();
                    Severity: Minor
                    Found in include/gtickets.php - About 2 hrs 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 Cell has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function Cell($w,$h=0,$txt='',$border=0,$ln=0,$align='',$fill=0,$link='')
                    {
                      //Output a cell
                      $k=$this->k;
                      if($this->y+$h>$this->PageBreakTrigger && !$this->InFooter && $this->AcceptPageBreak())
                    Severity: Major
                    Found in fpdf/fpdf.php - About 2 hrs to fix

                      Method MBWrite has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function MBWrite($h,$txt,$link)
                      {
                        //Multi-byte version of Write()
                        $cw=&$this->CurrentFont['cw'];
                        $w=$this->w-$this->rMargin-$this->x;
                      Severity: Major
                      Found in fpdf/korean.php - About 2 hrs to fix

                        Method MBWrite has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function MBWrite($h,$txt,$link)
                        {
                          //Multi-byte version of Write()
                          $cw=&$this->CurrentFont['cw'];
                          $w=$this->w-$this->rMargin-$this->x;
                        Severity: Major
                        Found in fpdf/chinese.php - About 2 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language