mambax7/pedigree

View on GitHub

Showing 702 of 1,100 total issues

Function TColorPicker has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function TColorPicker(field) {
    this.build0 = TCGenerateSafe;
    this.build1 = TCGenerateWind;
    this.build2 = TCGenerateGray;
    this.build3 = TCGenerateMac;
Severity: Minor
Found in assets/js/picker.js - About 1 hr to fix

    Function change has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                change = function (ev) {
                    var cal = $(this).parent().parent(), col;
                    if (this.parentNode.className.indexOf('_hex') > 0) {
                        cal.data('colpick').color = col = hexToHsb(fixHex(this.value));
                        fillRGBFields(col, cal.get(0));
    Severity: Minor
    Found in assets/js/colpick.js - About 1 hr to fix

      Function fromRGB has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              this.fromRGB = function (r, g, b, flags) { // null = don't change
                  if (r !== null) {
                      r = Math.max(0.0, Math.min(1.0, r));
                  }
                  if (g !== null) {
      Severity: Minor
      Found in assets/js/jscolor/jscolor.js - About 1 hr to fix

        Function exportColor has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                this.exportColor = function (flags) {
                    if (!(flags && leaveValue) && valueElement) {
                        var value = this.toString();
                        if (this.caps) {
                            value = value.toUpperCase();
        Severity: Minor
        Found in assets/js/jscolor/jscolor.js - About 1 hr to fix

          Method crop has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function crop($start_x, $start_y, $end_x, $end_y)
              {
                  // this method might be also called internally
                  // in this case, there's a fifth argument that points to an already existing image identifier
                  $args = func_get_args();
          Severity: Minor
          Found in library/Zebra_Image.php - About 1 hr to fix

            Method pedigree_search has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function pedigree_search($queryarray, $andor, $limit, $offset, $userid)
            {
                global $xoopsDB;
            
                // Start creating a sql string that will be used to retrieve the fields in the table
            Severity: Minor
            Found in include/search.inc.php - About 1 hr to fix

              Method getForm has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getForm($action = false)
                  {
                      if (false === $action) {
                          $action = $_SERVER['REQUEST_URI'];
                      }
              Severity: Minor
              Found in class/Temp.php - About 1 hr to fix

                Method load has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function load($lpData, &$hdrLen)
                    {
                        $hdrLen = 0;
                
                        $this->m_lpVer = substr($lpData, 0, 6);
                Severity: Minor
                Found in phpthumb/phpthumb.gif.php - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                                              if ($this->iar && ((int)$this->w > 0) && ((int)$this->h > 0)) {
                                                  [$nw, $nh] = phpthumb_functions::TranslateWHbyAngle($this->w, $this->h, $this->ra);
                                                  $nw          = ((0 != round($nw)) ? round($nw) : '');
                                                  $nh          = ((0 != round($nh)) ? round($nh) : '');
                                                  $commandline .= ' -' . $IMresizeParameter . ' ' . phpthumb_functions::escapeshellarg_replacement($nw . 'x' . $nh . '!');
                  Severity: Major
                  Found in 0old/phpthumb/phpthumb.class.php - About 1 hr to fix

                    Consider simplifying this complex logical expression.
                    Open

                                                if ($this->iar && ((int)$this->w > 0) && ((int)$this->h > 0)) {
                                                    [$nw, $nh] = phpthumb_functions::TranslateWHbyAngle($this->w, $this->h, $this->ra);
                                                    $nw          = ((round($nw) != 0) ? round($nw) : '');
                                                    $nh          = ((round($nh) != 0) ? round($nh) : '');
                                                    $commandline .= ' -' . $IMresizeParameter . ' ' . phpthumb_functions::escapeshellarg_replacement($nw . 'x' . $nh . '!');
                    Severity: Major
                    Found in phpthumb/phpthumb.class.php - About 1 hr to fix

                      Function add_multi has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function add_multi($ch, $niv)
                      {
                          global $implx, $couls, $nl;
                          reset($implx);
                          $first = 1;
                      Severity: Minor
                      Found in coi.php - About 55 mins 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 CreateGDoutput has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function CreateGDoutput()
                          {
                              $this->CalculateThumbnailDimensions();
                      
                              // create the GD image (either true-color or 256-color, depending on GD version)
                      Severity: Minor
                      Found in 0old/phpthumb/phpthumb.class.php - About 55 mins 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 setParameter has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function setParameter($param, $value)
                          {
                              if ('src' === $param) {
                                  $this->setSourceFilename($this->ResolveFilenameToAbsolute($value));
                              } elseif (@is_array($this->$param)) {
                      Severity: Minor
                      Found in 0old/phpthumb/phpthumb.class.php - About 55 mins 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 __construct has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function __construct()
                          {
                              global $field;
                              // start the session and initialize the wizard
                              if (null === $_SESSION) {
                      Severity: Minor
                      Found in class/CheckoutWizard.php - About 55 mins 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 recurseCopy has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public static function recurseCopy(string $src, string $dst): void
                          {
                              $dir = \opendir($src);
                              //        @mkdir($dst);
                              if (!@\mkdir($dst) && !\is_dir($dst)) {
                      Severity: Minor
                      Found in class/Common/FilesManagement.php - About 55 mins 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 rcopy has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public static function rcopy(string $src, string $dest): bool
                          {
                              // Only continue if user is a 'global' Admin
                              if (!($GLOBALS['xoopsUser'] instanceof \XoopsUser) || !$GLOBALS['xoopsUser']->isAdmin()) {
                                  return false;
                      Severity: Minor
                      Found in class/Common/FilesManagement.php - About 55 mins 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 rmove has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public static function rmove(string $src, string $dest): bool
                          {
                              // Only continue if user is a 'global' Admin
                              if (!($GLOBALS['xoopsUser'] instanceof \XoopsUser) || !$GLOBALS['xoopsUser']->isAdmin()) {
                                  return false;
                      Severity: Minor
                      Found in class/Common/FilesManagement.php - About 55 mins 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 CreateGDoutput has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function CreateGDoutput()
                          {
                              $this->CalculateThumbnailDimensions();
                      
                              // create the GD image (either true-color or 256-color, depending on GD version)
                      Severity: Minor
                      Found in phpthumb/phpthumb.class.php - About 55 mins 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 setParameter has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function setParameter($param, $value)
                          {
                              if ($param == 'src') {
                                  $this->setSourceFilename($this->ResolveFilenameToAbsolute($value));
                              } elseif (@is_array($this->$param)) {
                      Severity: Minor
                      Found in phpthumb/phpthumb.class.php - About 55 mins 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 filesize_remote has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public static function filesize_remote($remotefile, $timeout = 10)
                          {
                              $size       = false;
                              $parsed_url = self::ParseURLbetter($remotefile);
                              if ($fp = @fsockopen($parsed_url['host'], $parsed_url['port'], $errno, $errstr, $timeout)) {
                      Severity: Minor
                      Found in phpthumb/phpthumb.functions.php - About 55 mins 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