XoopsModules25x/mylinks

View on GitHub

Showing 272 of 370 total issues

File japanese.php has 416 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
if (!defined('XOOPS_ROOT_PATH')) {
  die('XOOPS root path not defined');
}

Severity: Minor
Found in fpdf/japanese.php - About 6 hrs to fix

    Function Write has a Cognitive Complexity of 39 (exceeds 5 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: Minor
    Found in fpdf/fpdf.php - About 5 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 SetFont has a Cognitive Complexity of 39 (exceeds 5 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 5 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 _parsepng has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
    Open

    function _parsepng($file)
    {
      //Extract info from a PNG file
      $f=fopen($file,'rb');
      if(!$f)
    Severity: Minor
    Found in fpdf/fpdf.php - About 5 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 getBmp has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
    Open

      function getBmp($bgColor)
      {
        $out = '';
    
        if(!$this->m_bLoaded) {
    Severity: Minor
    Found in fpdf/gif.php - About 5 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 chinese.php has 405 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    if (!defined('XOOPS_ROOT_PATH')) {
      die('XOOPS root path not defined');
    }
    
    
    Severity: Minor
    Found in fpdf/chinese.php - About 5 hrs to fix

      Function MBMultiCell has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
      Open

      function MBMultiCell($w,$h,$txt,$border=0,$align='L',$fill=0)
      {
        //Multi-byte version of MultiCell()
        $cw=&$this->CurrentFont['cw'];
        if($w==0)
      Severity: Minor
      Found in fpdf/chinese.php - About 5 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 MBMultiCell has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
      Open

      function MBMultiCell($w,$h,$txt,$border=0,$align='L',$fill=0)
      {
        //Multi-byte version of MultiCell()
        $cw=&$this->CurrentFont['cw'];
        if($w==0)
      Severity: Minor
      Found in fpdf/korean.php - About 5 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 SJISWrite has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
      Open

      function SJISWrite($h,$txt,$link)
      {
        //SJIS version of Write()
        $cw=&$this->CurrentFont['cw'];
        $w=$this->w-$this->rMargin-$this->x;
      Severity: Minor
      Found in fpdf/japanese.php - About 5 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 _diag has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
      Open

          public function _diag($xoff, $xlim, $yoff, $ylim, $nchunks)
          {
              $flip = false;
      
              if ($xlim - $xoff > $ylim - $yoff) {
      Severity: Minor
      Found in class/Text_Diff.php - About 5 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 diff has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
      Open

          public function diff($from_lines, $to_lines)
          {
              $n_from = count($from_lines);
              $n_to   = count($to_lines);
      
      
      Severity: Minor
      Found in class/Text_Diff.php - About 5 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 korean.php has 378 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      if (!defined('XOOPS_ROOT_PATH')) {
        die('XOOPS root path not defined');
      }
      
      
      Severity: Minor
      Found in fpdf/korean.php - About 5 hrs to fix

        Function LZWCommand has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
        Open

          function LZWCommand(&$data, $bInit)
          {
            if($bInit) {
              $this->SetCodeSize = ord($data{0});
              $data = substr($data, 1);
        Severity: Minor
        Found in fpdf/gif.php - About 4 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 Image has a Cognitive Complexity of 33 (exceeds 5 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 4 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 makefont.php has 365 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        /*******************************************************************************
        * Utility to generate font definition files                                    *
        * Version: 1.13                                                                *
        * Date:    2004-12-31                                                          *
        Severity: Minor
        Found in fpdf/font/makefont/makefont.php - About 4 hrs to fix

          Function myblocksadmin_update_block has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
          Open

          function myblocksadmin_update_block(
              $bid,
              $bside,
              $bweight,
              $bvisible,
          Severity: Minor
          Found in include/blocksadmin.inc.php - About 4 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 Output has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
          Open

          function Output($name='',$dest='')
          {
            //Output PDF to some destination
            //Finish document if necessary
            if($this->state<3)
          Severity: Minor
          Found in fpdf/fpdf.php - About 4 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 MakeFont has 107 lines of code (exceeds 25 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: Major
          Found in fpdf/font/makefont/makefont.php - About 4 hrs to fix

            Function MBWrite has a Cognitive Complexity of 29 (exceeds 5 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: Minor
            Found in fpdf/chinese.php - About 4 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 MBWrite has a Cognitive Complexity of 29 (exceeds 5 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: Minor
            Found in fpdf/korean.php - About 4 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