XoopsModules25x/mylinks

View on GitHub

Showing 272 of 370 total issues

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

function _parsepng($file)
{
  //Extract info from a PNG file
  $f=fopen($file,'rb');
  if(!$f)
Severity: Major
Found in fpdf/fpdf.php - About 2 hrs to fix

    Method Write has 71 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function Write($h,$txt,$link='')
    {
      //Output text in flowing mode
      $cw=&$this->CurrentFont['cw'];
      $w=$this->w-$this->rMargin-$this->x;
    Severity: Major
    Found in fpdf/fpdf.php - About 2 hrs to fix

      File mytplsadmin.php has 279 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      // ------------------------------------------------------------------------- //
      //                              mytplsadmin.php                              //
      //               - XOOPS templates admin for each modules -                  //
      //                          GIJOE <http://www.peak.ne.jp/>                   //
      Severity: Minor
      Found in admin/mytplsadmin.php - About 2 hrs to fix

        Method _shiftBoundaries has 65 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function _shiftBoundaries($lines, &$changed, $other_changed)
            {
                $i = 0;
                $j = 0;
        
        
        Severity: Major
        Found in class/Text_Diff.php - About 2 hrs to fix

          Method myblocksadmin_update_block has 65 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function myblocksadmin_update_block(
              $bid,
              $bside,
              $bweight,
              $bvisible,
          Severity: Major
          Found in include/blocksadmin.inc.php - About 2 hrs to fix

            Method _diag has 64 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function _diag($xoff, $xlim, $yoff, $ylim, $nchunks)
                {
                    $flip = false;
            
                    if ($xlim - $xoff > $ylim - $yoff) {
            Severity: Major
            Found in class/Text_Diff.php - About 2 hrs to fix

              Method _putpages has 62 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function _putpages()
              {
                $nb=$this->page;
                if(!empty($this->AliasNbPages))
                {
              Severity: Major
              Found in fpdf/fpdf.php - About 2 hrs to fix

                Method addLink has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function addLink()
                {
                    global $xoopsDB, $myts, $xoopsUser, $xoopsModule;
                
                    $cid         = MylinksUtility::mylinks_cleanVars($_POST, 'cid', 0, 'int', array('min' => 0));
                Severity: Major
                Found in admin/main.php - About 2 hrs to fix

                  Function AddPage has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function AddPage($orientation='')
                  {
                    //Start a new page
                    if($this->state==0)
                      $this->Open();
                  Severity: Minor
                  Found in fpdf/fpdf.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

                  Function b_system_main_show has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function b_system_main_show()
                  {
                      global $xoopsUser, $xoopsModule;
                      $block               = array();
                      $block['lang_home']  = _MB_SYSTEM_HOME;
                  Severity: Minor
                  Found in extras/XOOPS_2.5.x/htdocs/modules/system/blocks/system_blocks.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

                  File viewcat.php has 265 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  // $Id: viewcat.php 11819 2013-07-09 18:21:40Z zyspec $
                  //  ------------------------------------------------------------------------ //
                  //                XOOPS - PHP Content Management System                      //
                  //                    Copyright (c) 2000 XOOPS.org                           //
                  Severity: Minor
                  Found in viewcat.php - About 2 hrs to fix

                    Method Output has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function Output($name='',$dest='')
                    {
                      //Output PDF to some destination
                      //Finish document if necessary
                      if($this->state<3)
                    Severity: Major
                    Found in fpdf/fpdf.php - About 2 hrs to fix

                      Method check has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              public function check($post = true, $area = '', $allow_repost = true)
                              {
                                  global $xoopsModule;
                      
                                  $this->_errors = array();
                      Severity: Major
                      Found in include/gtickets.php - About 2 hrs to fix

                        Method OpenTag has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          function OpenTag($tag,$attr,$scale)
                          {
                              //Opening tag
                              switch($tag){
                                  case 'STRONG':
                        Severity: Major
                        Found in fpdf/makepdf_class.php - About 2 hrs to fix

                          Method b_system_comments_show has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function b_system_comments_show($options)
                          {
                              $block = array();
                              include_once XOOPS_ROOT_PATH . '/include/comment_constants.php';
                              $commentHandler = xoops_getHandler('comment');
                          Severity: Major
                          Found in extras/XOOPS_2.5.x/htdocs/modules/system/blocks/system_blocks.php - About 2 hrs to fix

                            File addto-multi.js has 253 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            //    <license>
                            //    Script: Add To Bookmarks
                            //    Version: 1.1
                            //    Homepage: http://www.AddToBookmarks.com/
                            //    Author:    Gideon Marken
                            Severity: Minor
                            Found in include/addto-multi.js - About 2 hrs to fix

                              Method AddPage has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function AddPage($orientation='')
                              {
                                //Start a new page
                                if($this->state==0)
                                  $this->Open();
                              Severity: Major
                              Found in fpdf/fpdf.php - About 2 hrs to fix

                                Method delCat has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function delCat()
                                {
                                    global $xoopsDB, $myCatTree, $xoopsModule, $xoopsUser;
                                
                                    $cid = MylinksUtility::mylinks_cleanVars($_REQUEST, 'cid', 0, 'int', array('min' => 0));
                                Severity: Major
                                Found in admin/main.php - About 2 hrs to fix

                                  File gtickets.php has 251 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  <?php
                                  // GIJOE's Ticket Class (based on Marijuana's Oreteki XOOPS)
                                  // nobunobu's suggestions are applied
                                  
                                  if (!class_exists('XoopsGTicket')) {
                                  Severity: Minor
                                  Found in include/gtickets.php - About 2 hrs to fix

                                    Method listBrokenLinks has 50 lines of code (exceeds 25 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 2 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language