mambax7/waiting

View on GitHub

Showing 37 of 74 total issues

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

function b_waiting_mydownloads()
{
    /** @var \XoopsMySQLDatabase $xoopsDB */
    $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection();
    $ret     = [];
Severity: Minor
Found in plugins/mydownloads.php - About 1 hr to fix

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

    function b_waiting_mylinks()
    {
        /** @var \XoopsMySQLDatabase $xoopsDB */
        $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection();
        $ret     = [];
    Severity: Minor
    Found in plugins/mylinks.php - About 1 hr to fix

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

      function b_waiting_xdirectory()
      {
          /** @var \XoopsMySQLDatabase $xoopsDB */
          $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection();
          $ret     = [];
      Severity: Minor
      Found in plugins/xdirectory.php - About 1 hr to fix

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

        function b_waiting_addresses()
        {
            /** @var \XoopsMySQLDatabase $xoopsDB */
            $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection();
            $ret     = [];
        Severity: Minor
        Found in plugins/addresses.php - About 1 hr to fix

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

          function b_waiting_weblinks()
          {
              /** @var \XoopsMySQLDatabase $xoopsDB */
              $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection();
              $ret     = [];
          Severity: Minor
          Found in plugins/weblinks.php - About 1 hr to fix

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

            function b_waiting_wflinks()
            {
                /** @var \XoopsMySQLDatabase $xoopsDB */
                $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection();
                $ret     = [];
            Severity: Minor
            Found in plugins/wflinks.php - About 1 hr to fix

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

              function b_waiting_xoopstube()
              {
                  /** @var \XoopsMySQLDatabase $xoopsDB */
                  $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection();
                  $ret     = [];
              Severity: Minor
              Found in plugins/xoopstube.php - About 1 hr to fix

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

                function b_waiting_tdmdownloads()
                {
                    /** @var \XoopsMySQLDatabase $xoopsDB */
                    $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection();
                    $ret     = [];
                Severity: Minor
                Found in plugins/tdmdownloads.php - About 1 hr to fix

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

                  function b_waiting_PDlinks()
                  {
                      /** @var \XoopsMySQLDatabase $xoopsDB */
                      $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection();
                      $ret     = [];
                  Severity: Minor
                  Found in plugins/pdlinks.php - About 1 hr to fix

                    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

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

                        public static function recurseCopy($src, $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($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

                    Avoid deeply nested control flow statements.
                    Open

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

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

                          public static function truncateHtml($text, $length = 100, $ending = '...', $exact = false, $considerHtml = true)
                      Severity: Minor
                      Found in class/Common/SysUtility.php - About 35 mins to fix

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

                            public static function getEditor($helper = null, $options = null)
                            {
                                /** @var Helper $helper */
                                if (null === $options) {
                                    $options           = [];
                        Severity: Minor
                        Found in class/Common/SysUtility.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_waiting has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function xoops_module_install_waiting(\XoopsModule $module)
                        {
                            require_once \dirname(__DIR__, 3) . '/mainfile.php';
                            //    require_once   \dirname(__DIR__) . '/config/config.php';
                        
                        
                        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 xoops_module_uninstall_waiting has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function xoops_module_uninstall_waiting(\XoopsModule $module)
                        {
                            //    return true;
                        
                            $moduleDirName      = \basename(\dirname(__DIR__));
                        Severity: Minor
                        Found in include/onuninstall.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