mambax7/pedigree

View on GitHub

Showing 702 of 1,100 total issues

Avoid too many return statements within this method.
Open

            return $this->ErrorImage($ErrorMessage);
Severity: Major
Found in phpthumb/phpthumb.class.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

            return false;
    Severity: Major
    Found in phpthumb/phpthumb.class.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                  return -1;
      Severity: Major
      Found in phpthumb/phpthumb.functions.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return false;
        Severity: Major
        Found in phpthumb/phpthumb.functions.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                  return 1;
          Severity: Major
          Found in phpthumb/phpthumb.functions.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                            return (int)($version1 == $version2);
            Severity: Major
            Found in phpthumb/phpthumb.functions.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                          return 0;
              Severity: Major
              Found in phpthumb/phpthumb.functions.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                return (int)($version1 != $version2);
                Severity: Major
                Found in phpthumb/phpthumb.functions.php - About 30 mins to fix

                  Function TCGenerateSafe has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function TCGenerateSafe() {
                      var s = '';
                      for (j = 0; j < 12; j++) {
                          s += "<tr>";
                          for (k = 0; k < 3; k++)
                  Severity: Minor
                  Found in assets/js/picker.js - About 25 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 pedigree_fields_post has a Cognitive Complexity of 6 (exceeds 5 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 25 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 SKETCH_PEDIGREE has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function SKETCH_PEDIGREE()
                  {
                      global $nl, $detail, $depth, $IDs;
                      // print_r ($IDs) ;
                      echo $nl
                  Severity: Minor
                  Found in coi.php - About 25 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 xoops_module_pre_install_pedigree has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function xoops_module_pre_install_pedigree(\XoopsModule $module)
                  {
                      //check for minimum XOOPS version
                      $xoopsSuccess = Utility::checkVerXoops($module);
                  
                  
                  Severity: Minor
                  Found in include/oninstall.php - About 25 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 uploadPicture has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function uploadPicture($num)
                  {
                      $max_imgsize       = $GLOBALS['xoopsModuleConfig']['maxfilesize']; //1024000;
                      $max_imgwidth      = $GLOBALS['xoopsModuleConfig']['maximgwidth']; //1500;
                      $max_imgheight     = $GLOBALS['xoopsModuleConfig']['maximgheight']; //1000;
                  Severity: Minor
                  Found in include/functions.php - About 25 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 breederof has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function breederof($oid, $breeder)
                  {
                      $content = '';
                  
                      if (0 == $breeder) {
                  Severity: Minor
                  Found in include/functions.php - About 25 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 pedigree_search has a Cognitive Complexity of 6 (exceeds 5 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 25 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 count_all has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function count_all($ind, $gen)
                  {
                      global $inds, $nb_gen, $nb_all, $fathers, $mothers;
                      if ($ind) {
                          ++$nb_all;
                  Severity: Minor
                  Found in coi.php - About 25 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 loadSampleData has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function loadSampleData()
                  {
                      global $xoopsConfig;
                      $moduleDirName      = \basename(\dirname(__DIR__));
                      $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
                  Severity: Minor
                  Found in testdata/index.php - About 25 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 TCGenerateWind has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function TCGenerateWind() {
                      var s = '';
                      for (j = 0; j < 12; j++) {
                          s += "<tr>";
                          for (k = 0; k < 3; k++)
                  Severity: Minor
                  Found in assets/js/picker.js - About 25 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 lettersChoice has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function lettersChoice()
                  {
                      $helper = Helper::getInstance();
                      $helper->loadLanguage('main');
                      xoops_load('XoopsLocal');
                  Severity: Minor
                  Found in include/functions.php - About 25 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 lettersChoice has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public static function lettersChoice($myObject, $activeObject, $criteria, $name, $link, $link2 = null)
                      {
                          /** @var \XoopsModules\Pedigree\Helper $helper */
                          $helper = Helper::getInstance();
                          $helper->loadLanguage('main');
                  Severity: Minor
                  Found in class/Utility.php - About 25 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