mambax7/pedigree

View on GitHub

Showing 702 of 1,100 total issues

File Zebra_Image.php has 574 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

/**
 *  Methods used with the {@link resize()} method.
 */
Severity: Major
Found in library/Zebra_Image.php - About 1 day to fix

    Function gd_info has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring.
    Open

        function gd_info()
        {
            static $gd_info = [];
            if (empty($gd_info)) {
                // based on code by johnschaefer at gmx dot de
    Severity: Minor
    Found in phpthumb/phpthumb.functions.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

    Method SourceImageToGD has 236 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function SourceImageToGD()
        {
            if (is_resource($this->gdimg_source)) {
                $this->source_width  = imagesx($this->gdimg_source);
                $this->source_height = imagesy($this->gdimg_source);
    Severity: Major
    Found in 0old/phpthumb/phpthumb.class.php - About 1 day to fix

      Function menu_block has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
      Open

      function menu_block()
      {
          $helper = Helper::getInstance();
      
          [$actlink, $even, $odd, $text, $hovlink, $head, $body, $title] = Utility::getColourScheme();
      Severity: Minor
      Found in menu_block.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 functions.php has 551 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /*
       * You may not change or alter any portion of this comment or credits
       * of supporting developers from this source code or any supporting source code
       * which is considered copyrighted (c) material of the original comment or credit authors.
      Severity: Major
      Found in include/functions.php - About 1 day to fix

        Method phpThumbDebug has 228 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function phpThumbDebug($level = '')
            {
                if ($level && ($this->phpThumbDebug !== $level)) {
                    return true;
                }
        Severity: Major
        Found in 0old/phpthumb/phpthumb.class.php - About 1 day to fix

          File phpThumb.php has 544 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          //////////////////////////////////////////////////////////////
          //   phpThumb() by James Heinrich <info@silisoftware.com>   //
          //        available at http://phpthumb.sourceforge.net      //
          //         and/or https://github.com/JamesHeinrich/phpThumb //
          Severity: Major
          Found in phpthumb/phpThumb.php - About 1 day to fix

            Method userfields has 226 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function userfields($field = 0)
            {
                global $field;
                require_once __DIR__ . '/include/checkoutwizard.php';
            
            
            Severity: Major
            Found in tools.php - About 1 day to fix

              Function menu_block has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
              Open

              function menu_block()
              {
                  $moduleDirName = basename(\dirname(__DIR__));
                  $helper        = Helper::getInstance();
              
              
              Severity: Minor
              Found in blocks/menu_block.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 drawPicker has 219 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      function drawPicker(x, y) {
                          if (!jscolor.picker) {
                              jscolor.picker = {
                                  box: document.createElement('div'),
                                  boxB: document.createElement('div'),
              Severity: Major
              Found in assets/js/jscolor/jscolor.js - About 1 day to fix

                Method listBlocks has 213 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function listBlocks()
                    {
                        global $xoopsModule, $pathIcon16;
                        require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
                        $moduleDirName      = basename(\dirname(__DIR__));
                Severity: Major
                Found in admin/blocksadmin.php - About 1 day to fix

                  phpthumb has 59 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class phpthumb
                  {
                      // public:
                      // START PARAMETERS (for object mode and phpThumb.php)
                      // See phpthumb.readme.txt for descriptions of what each of these values are
                  Severity: Major
                  Found in phpthumb/phpthumb.class.php - About 1 day to fix

                    phpthumb has 58 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class phpthumb
                    {
                        // public:
                        // START PARAMETERS (for object mode and phpThumb.php)
                        // See phpthumb.readme.txt for descriptions of what each of these values are
                    Severity: Major
                    Found in 0old/phpthumb/phpthumb.class.php - About 1 day to fix

                      Function truncateHtml has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public static function truncateHtml(
                              string $text,
                              ?int $length = 100,
                              ?string $ending = '...',
                              ?bool $exact = false,
                      Severity: Minor
                      Found in class/Common/SysUtility.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 Rotate has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function Rotate()
                          {
                              if ($this->ra || $this->ar) {
                                  if (!function_exists('imagerotate')) {
                                      $this->DebugMessage('!function_exists(imagerotate)', __FILE__, __LINE__);
                      Severity: Minor
                      Found in 0old/phpthumb/phpthumb.class.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 Rotate has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function Rotate()
                          {
                              if ($this->ra || $this->ar) {
                                  if (!function_exists('imagerotate')) {
                                      $this->DebugMessage('!function_exists(imagerotate)', __FILE__, __LINE__);
                      Severity: Minor
                      Found in phpthumb/phpthumb.class.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 colpick.js has 509 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /*
                       colpick Color Picker
                       Copyright 2013 Jose Vargas. Licensed under GPL license. Based on Stefan Petre's Color Picker www.eyecon.ro, dual licensed under the MIT and GPL licenses
                      
                       For usage and examples: colpick.com/plugin
                      Severity: Major
                      Found in assets/js/colpick.js - About 1 day to fix

                        Method phpThumbDebug has 205 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function phpThumbDebug($level = '')
                            {
                                if ($level && ($this->phpThumbDebug !== $level)) {
                                    return true;
                                }
                        Severity: Major
                        Found in phpthumb/phpthumb.class.php - About 1 day to fix

                          Function ImageCreateFromStringReplacement has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function ImageCreateFromStringReplacement(&$RawImageData, $DieOnErrors = false)
                              {
                                  // there are serious bugs in the non-bundled versions of GD which may cause
                                  // PHP to segfault when calling imagecreatefromstring() - avoid if at all possible
                                  // when not using a bundled version of GD2
                          Severity: Minor
                          Found in phpthumb/phpthumb.class.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 ImageCreateFromStringReplacement has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function ImageCreateFromStringReplacement(&$RawImageData, $DieOnErrors = false)
                              {
                                  // there are serious bugs in the non-bundled versions of GD which may cause
                                  // PHP to segfault when calling imagecreatefromstring() - avoid if at all possible
                                  // when not using a bundled version of GD2
                          Severity: Minor
                          Found in 0old/phpthumb/phpthumb.class.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

                          Severity
                          Category
                          Status
                          Source
                          Language