mambax7/myconference

View on GitHub

Showing 32 of 478 total issues

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

    public static function rcopy($src, $dest)
    {
        // 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($src, $dest)
    {
        // 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

Method makeSelBox has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function makeSelBox($name, $fieldName, $prefix = '-', $selected = '', $addEmptyOption = false, $key = 0, $extra = '')
Severity: Major
Found in class/Common/tree.php - About 50 mins to fix

    Method makeMySelBox has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public function makeMySelBox($title, $order = '', $preset_id = 0, $none = 0, $sel_name = '', $onchange = '')
    Severity: Minor
    Found in class/Common/xoopstree.php - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                  if (file_exists($templateFolder . $v)) {
                                      unlink($templateFolder . $v);
                                  }
      Severity: Major
      Found in include/onupdate.php - About 45 mins to fix

        Method lettersChoice has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public static function lettersChoice($myObject, $activeObject, $criteria, $name, $link, $link2 = null)
        Severity: Minor
        Found in class/Utility.php - About 45 mins to fix

          Method XoopsFormDateTimeI has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          function XoopsFormDateTimeI($caption, $name, $size = 15, $value = 0, $interval = 10)
          Severity: Minor
          Found in admin/conference.php - About 35 mins to fix

            Method makeSelBoxOptionsArray has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public function makeSelBoxOptionsArray($fieldName, $key, &$optionsArray, $prefix_orig, $prefix_curr = '')
            Severity: Minor
            Found in class/Common/tree.php - About 35 mins to fix

              Function printRow has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              function printRow($ctime, $row, $tpos, $class)
              {
                  global $xoopsDB;
                  $i = 0;
                  while ($i < count($tpos)) {
              Severity: Minor
              Found in program.php - About 35 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_install_myconference has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              function xoops_module_install_myconference(\XoopsModule $module)
              {
                  require_once  __DIR__ . '/../../../mainfile.php';
                  require_once  __DIR__ . '/../include/config.php';
              
              
              Severity: Minor
              Found in include/oninstall.php - About 35 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)
                  {
                      /*
                      $pedigree = PedigreePedigree::getInstance();
                      xoops_load('XoopsLocal');
              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

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

                  public static 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 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