mambax7/pedigree

View on GitHub

Showing 702 of 1,100 total issues

Method FixedAspectRatio has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function FixedAspectRatio()
    {
        // optional fixed-dimension images (regardless of aspect ratio)

        if (!$this->far) {
Severity: Minor
Found in phpthumb/phpthumb.class.php - About 1 hr to fix

    Method Contrast has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function Contrast(&$gdimg, $amount = 0)
        {
            if ($amount == 0) {
                return true;
            }
    Severity: Minor
    Found in phpthumb/phpthumb.filters.php - About 1 hr to fix

      Function CONSANG has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

      function CONSANG($a)
      {
          global $fathers, $mothers, $ICknown, $COIs, $nl;
          if (!$a || $ICknown[$a]) {
              return 0;
      Severity: Minor
      Found in coi.php - About 1 hr 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 prepareDefaultvalue has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

          public function prepareDefaultvalue()
          {
              if (0 == !$this->getValue('field')) {
                  // field already exists (editing mode)
      
      
      Severity: Minor
      Found in class/CheckoutWizard.php - About 1 hr 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 phpThumb has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

          public function phpThumb()
          {
              $this->DebugTimingMessage('phpThumb() constructor', __FILE__, __LINE__);
              $this->DebugMessage('phpThumb() v' . $this->phpthumb_version, __FILE__, __LINE__);
      
      
      Severity: Minor
      Found in 0old/phpthumb/phpthumb.class.php - About 1 hr 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 phpThumb has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

          public function phpThumb()
          {
              $this->DebugTimingMessage('phpThumb() constructor', __FILE__, __LINE__);
              $this->DebugMessage('phpThumb() v' . $this->phpthumb_version, __FILE__, __LINE__);
      
      
      Severity: Minor
      Found in phpthumb/phpthumb.class.php - About 1 hr 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 CleanUpURLencoding has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

          public static function CleanUpURLencoding($url, $queryseperator = '&')
          {
              if (!0 === stripos($url, "http")) {
                  return $url;
              }
      Severity: Minor
      Found in phpthumb/phpthumb.functions.php - About 1 hr 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 version_compare_replacement_sub has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

          public static function version_compare_replacement_sub($version1, $version2, $operator = '')
          {
              // If you specify the third optional operator argument, you can test for a particular relationship.
              // The possible operators are: <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne respectively.
              // Using this argument, the function will return 1 if the relationship is the one specified by the operator, 0 otherwise.
      Severity: Minor
      Found in phpthumb/phpthumb.functions.php - About 1 hr 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 exif_info has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

          public static function exif_info()
          {
              static $exif_info = [];
              if (empty($exif_info)) {
                  // based on code by johnschaefer at gmx dot de
      Severity: Minor
      Found in phpthumb/phpthumb.functions.php - About 1 hr 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 pedigree_fields_post has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function pedigree_fields_post()
      {
          $config_fields = pedigree_get_config_fields();
          foreach ($config_fields as $field => $prompt) {
              $param = 'param_' . $field;
      Severity: Minor
      Found in admin/fields.php - About 1 hr to fix

        Function setColor has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    setColor: function (col, setCurrent) {
                        setCurrent = (typeof setCurrent === "undefined") ? 1 : setCurrent;
                        if (typeof col == 'string') {
                            col = hexToHsb(col);
                        } else if (col.r != undefined && col.g != undefined && col.b != undefined) {
        Severity: Minor
        Found in assets/js/colpick.js - About 1 hr to fix

          Method loadSampleData has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function loadSampleData()
          {
              global $xoopsConfig;
              $moduleDirName      = \basename(\dirname(__DIR__));
              $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
          Severity: Minor
          Found in testdata/index.php - About 1 hr to fix

            Function _openClick has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                _openClick: function(e, el, options) {
                    var midClick = options.midClick !== undefined ? options.midClick : $.magnificPopup.defaults.midClick;
            
            
                    if(!midClick && ( e.which === 2 || e.ctrlKey || e.metaKey || e.altKey || e.shiftKey ) ) {
            Severity: Minor
            Found in assets/js/jquery.magnific-popup.js - About 1 hr to fix

              Method one_animal has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function one_animal($ID)
              {
                  global $xoopsDB;
                  global $sex, $val, $sosa, $detail, $sql3;
                  $content = '';
              Severity: Minor
              Found in coi.php - About 1 hr to fix

                Function parseEl has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    parseEl: function(index) {
                        var item = mfp.items[index],
                            type;
                
                        if(item.tagName) {
                Severity: Minor
                Found in assets/js/jquery.magnific-popup.js - About 1 hr to fix

                  Method phpThumb has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function phpThumb()
                      {
                          $this->DebugTimingMessage('phpThumb() constructor', __FILE__, __LINE__);
                          $this->DebugMessage('phpThumb() v' . $this->phpthumb_version, __FILE__, __LINE__);
                  
                  
                  Severity: Minor
                  Found in 0old/phpthumb/phpthumb.class.php - About 1 hr to fix

                    Method ImageMagickVersion has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function ImageMagickVersion($returnRAW = false)
                        {
                            static $versionstring = null;
                            if (null === $versionstring) {
                                $versionstring = [0 => false, 1 => false];
                    Severity: Minor
                    Found in 0old/phpthumb/phpthumb.class.php - About 1 hr to fix

                      Method fieldmove has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function fieldmove($field, $move)
                      {
                          //find next id
                          $sql    = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " WHERE isActive = '1' ORDER BY `order`";
                          $result = $GLOBALS['xoopsDB']->query($sql);
                      Severity: Minor
                      Found in tools.php - About 1 hr to fix

                        Method phpThumb has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function phpThumb()
                            {
                                $this->DebugTimingMessage('phpThumb() constructor', __FILE__, __LINE__);
                                $this->DebugMessage('phpThumb() v' . $this->phpthumb_version, __FILE__, __LINE__);
                        
                        
                        Severity: Minor
                        Found in phpthumb/phpthumb.class.php - About 1 hr to fix

                          Method GetAllFilesInSubfolders has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public static function GetAllFilesInSubfolders($dirname)
                              {
                                  $AllFiles = [];
                                  $dirname  = rtrim(realpath($dirname), '/\\');
                                  if ($dirhandle = @opendir($dirname)) {
                          Severity: Minor
                          Found in phpthumb/phpthumb.functions.php - About 1 hr to fix
                            Severity
                            Category
                            Status
                            Source
                            Language