mambax7/pedigree

View on GitHub

Showing 702 of 1,100 total issues

Method resize has 189 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function resize($width = 0, $height = 0, $method = ZEBRA_IMAGE_CROP_CENTER, $background_color = -1)
    {
        // if image resource was successfully created
        if ($this->_create_from_source()) {
            // if either width or height is to be adjusted automatically
Severity: Major
Found in library/Zebra_Image.php - About 7 hrs to fix

    Function boucle has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
    Open

    function boucle($nb_gen, $nloop)
    {
        global $fathers, $mothers, $nbanims, $listing, $nl, $IDs;
        $nbtot   = 0;
        $listing = '';
    Severity: Minor
    Found in coi.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

    File blocksadmin.php has 474 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: Minor
    Found in admin/blocksadmin.php - About 7 hrs to fix

      File add_dog.php has 463 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
      Severity: Minor
      Found in add_dog.php - About 7 hrs to fix

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

        <?php
        
        //menublock
        define('_MA_PEDIGREE_VIEWSEARCH', 'View/Search ');
        define('_MA_PEDIGREE_ADD_A', 'Add a ');
        Severity: Minor
        Found in language/english/main.php - About 6 hrs to fix

          Function resize has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
          Open

              public function resize($width = 0, $height = 0, $method = ZEBRA_IMAGE_CROP_CENTER, $background_color = -1)
              {
                  // if image resource was successfully created
                  if ($this->_create_from_source()) {
                      // if either width or height is to be adjusted automatically
          Severity: Minor
          Found in library/Zebra_Image.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 ResolveFilenameToAbsolute has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
          Open

              public function ResolveFilenameToAbsolute($filename)
              {
                  if (empty($filename)) {
                      return false;
                  }
          Severity: Minor
          Found in 0old/phpthumb/phpthumb.class.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 ResolveFilenameToAbsolute has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
          Open

              public function ResolveFilenameToAbsolute($filename)
              {
                  if (empty($filename)) {
                      return false;
                  }
          Severity: Minor
          Found in phpthumb/phpthumb.class.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

          phpthumb_functions has 46 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class phpthumb_functions
          {
              public static function is_windows()
              {
                  return (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN');
          Severity: Minor
          Found in phpthumb/phpthumb.functions.php - About 6 hrs to fix

            Function open has 157 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                open: function(data) {
            
                    var i;
            
                    if(data.isObj === false) {
            Severity: Major
            Found in assets/js/jquery.magnific-popup.js - About 6 hrs to fix

              Function listBlocks has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
              Open

                  function listBlocks()
                  {
                      global $xoopsModule, $pathIcon16;
                      require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
                      $moduleDirName      = basename(\dirname(__DIR__));
              Severity: Minor
              Found in admin/blocksadmin.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 DropShadow has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function DropShadow(&$gdimg, $distance, $width, $hexcolor, $angle, $alpha)
                  {
                      if (phpthumb_functions::gd_version() < 2) {
                          return false;
                      }
              Severity: Minor
              Found in phpthumb/phpthumb.filters.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

              Method menu_block has 154 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function menu_block()
              {
                  $helper = Helper::getInstance();
              
                  [$actlink, $even, $odd, $text, $hovlink, $head, $body, $title] = Utility::getColourScheme();
              Severity: Major
              Found in menu_block.php - About 6 hrs to fix

                File add_litter.php has 419 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
                Severity: Minor
                Found in add_litter.php - About 6 hrs to fix

                  Method namedColor2RGB has 150 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function namedColor2RGB($color)
                      {
                          static $colornames;
                  
                          if (!isset($colornames)) {
                  Severity: Major
                  Found in class/ImageColor.php - About 6 hrs to fix

                    Method CleanUpCacheDirectory has 148 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function CleanUpCacheDirectory()
                        {
                            $this->DebugMessage(
                                'CleanUpCacheDirectory() set to purge (' . (null === $this->config_cache_maxage ? 'NULL' : number_format($this->config_cache_maxage / 86400, 1)) . ' days; ' . (null === $this->config_cache_maxsize ? 'NULL' : number_format($this->config_cache_maxsize / 1048576, 2)) . ' MB; ' . (null
                                                                                                                                                                                                                                                                                                                      === $this->config_cache_maxfiles ? 'NULL' : number_format(
                    Severity: Major
                    Found in 0old/phpthumb/phpthumb.class.php - About 5 hrs to fix

                      Method CleanUpCacheDirectory has 145 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function CleanUpCacheDirectory()
                          {
                              $this->DebugMessage(
                                  'CleanUpCacheDirectory() set to purge (' . (null === $this->config_cache_maxage ? 'NULL' : number_format($this->config_cache_maxage / 86400, 1)) . ' days; ' . (null === $this->config_cache_maxsize ? 'NULL' : number_format($this->config_cache_maxsize / 1048576, 2)) . ' MB; ' . (null
                                                                                                                                                                                                                                                                                                                        === $this->config_cache_maxfiles ? 'NULL' : number_format(
                      Severity: Major
                      Found in phpthumb/phpthumb.class.php - About 5 hrs to fix

                        Function OutputThumbnail has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function OutputThumbnail()
                            {
                                $this->purgeTempFiles();
                        
                                if (!$this->useRawIMoutput && !(is_resource($this->gdimg_output) || (is_object($this->gdimg_source) && $this->gdimg_source instanceof \GdImage))) {
                        Severity: Minor
                        Found in phpthumb/phpthumb.class.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 ImprovedImageRotate has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public static function ImprovedImageRotate(&$gdimg_source, $rotate_angle = 0, $config_background_hexcolor = 'FFFFFF', $bg = null, &$phpThumbObject)
                            {
                                while ($rotate_angle < 0) {
                                    $rotate_angle += 360;
                                }
                        Severity: Minor
                        Found in phpthumb/phpthumb.filters.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 xoops_version.php has 400 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        /* ------------------------------------------------------------------------
                              pedigree
                                  Copyright 2004, James Cotton
                                   http://www.dobermannvereniging.nl
                        Severity: Minor
                        Found in xoops_version.php - About 5 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language