XoopsModules25x/mylinks

View on GitHub

Showing 272 of 370 total issues

File fpdf.php has 1411 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/*******************************************************************************
* Software: FPDF                                                               *
* Version:  1.53                                                               *
* Date:     2004-12-31                                                         *
Severity: Major
Found in fpdf/fpdf.php - About 3 days to fix

    File main.php has 829 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /**
     * MyLinks category.php
     *
     * Xoops mylinks - a multicategory links module
    Severity: Major
    Found in admin/main.php - About 1 day to fix

      File gif.php has 793 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      ///////////////////////////////////////////////////////////////////////////////////////////////////
      // GIF Util - (C) 2003 Yamasoft (S/C)
      // http://www.yamasoft.com
      // All Rights Reserved
      Severity: Major
      Found in fpdf/gif.php - About 1 day to fix

        Function MultiCell has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
        Open

        function MultiCell($w,$h,$txt,$border=0,$align='J',$fill=0)
        {
          //Output text with automatic or explicit line breaks
          $cw=&$this->CurrentFont['cw'];
          if($w==0)
        Severity: Minor
        Found in fpdf/fpdf.php - About 1 day 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

        FPDF has 71 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class FPDF
        {
        //Private properties
        var $page;               //current page number
        var $n;                  //current object number
        Severity: Major
        Found in fpdf/fpdf.php - About 1 day to fix

          Function _putfonts has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring.
          Open

          function _putfonts()
          {
            $nf=$this->n;
            foreach($this->diffs as $diff)
            {
          Severity: Minor
          Found in fpdf/fpdf.php - About 1 day 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 Cell has a Cognitive Complexity of 59 (exceeds 5 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: Minor
          Found in fpdf/fpdf.php - About 1 day 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 system_blocks.php has 540 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          // $Id: system_blocks.php 8066 2011-11-06 05:09:33Z beckmi $
          //  ------------------------------------------------------------------------ //
          //                XOOPS - PHP Content Management System                      //
          //                    Copyright (c) 2000 XOOPS.org                           //
          Severity: Major
          Found in extras/XOOPS_2.5.x/htdocs/modules/system/blocks/system_blocks.php - About 1 day to fix

            Function ReadAFM has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
            Open

            function ReadAFM($file,&$map)
            {
              //Read a font metric file
              $a=file($file);
              if(empty($a))
            Severity: Minor
            Found in fpdf/font/makefont/makefont.php - About 1 day 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 addto has 212 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function addto(addsite,AddURL,AddTitle){
              var AddURL = AddURL;
              var AddTitle = AddTitle;
              switch(addsite){
                case 0:    //    AddToBookmarks.com ID:0    - an educational page on what Social Bookmarking is
            Severity: Major
            Found in include/addto-multi.js - About 1 day to fix

              File Text_Diff.php has 486 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              
              /**
               * Text_Diff
               *
              Severity: Minor
              Found in class/Text_Diff.php - About 7 hrs to fix

                File xoops_version.php has 476 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

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

                  Function _putfonts has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function _putfonts()
                  {
                    $nf=$this->n;
                    foreach($this->diffs as $diff)
                    {
                  Severity: Minor
                  Found in fpdf/japanese.php - About 7 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 _putfonts has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function _putfonts()
                  {
                    $nf=$this->n;
                    foreach($this->diffs as $diff)
                    {
                  Severity: Minor
                  Found in fpdf/korean.php - About 7 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 _putfonts has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function _putfonts()
                  {
                    $nf=$this->n;
                    foreach($this->diffs as $diff)
                    {
                  Severity: Minor
                  Found in fpdf/chinese.php - About 7 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 check has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
                  Open

                          public function check($post = true, $area = '', $allow_repost = true)
                          {
                              global $xoopsModule;
                  
                              $this->_errors = array();
                  Severity: Minor
                  Found in include/gtickets.php - About 7 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 MakeFont has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function MakeFont($fontfile,$afmfile,$enc='cp1252',$patch=array(),$type='TrueType')
                  {
                    //Generate a font definition file
                    set_magic_quotes_runtime(0);
                    ini_set('auto_detect_line_endings','1');
                  Severity: Minor
                  Found in fpdf/font/makefont/makefont.php - About 6 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 SJISMultiCell has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function SJISMultiCell($w,$h,$txt,$border=0,$align='L',$fill=0)
                  {
                    //Output text with automatic or explicit line breaks
                    $cw=&$this->CurrentFont['cw'];
                    if($w==0)
                  Severity: Minor
                  Found in fpdf/japanese.php - About 6 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 blocksadmin.inc.php has 447 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  // $Id: blocksadmin.inc.php 8344 2011-11-26 02:38:25Z beckmi $
                  //  ------------------------------------------------------------------------ //
                  //                XOOPS - PHP Content Management System                      //
                  //                    Copyright (c) 2000 XOOPS.org                           //
                  Severity: Minor
                  Found in include/blocksadmin.inc.php - About 6 hrs to fix

                    Function _shiftBoundaries has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function _shiftBoundaries($lines, &$changed, $other_changed)
                        {
                            $i = 0;
                            $j = 0;
                    
                    
                    Severity: Minor
                    Found in class/Text_Diff.php - About 6 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

                    Severity
                    Category
                    Status
                    Source
                    Language