XoopsModules25x/lexikon

View on GitHub

Showing 216 of 316 total issues

Method getServiceLinksNew has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function getServiceLinksNew($variable)
    {
        global $xoopsUser, $xoopsDB, $xoopsModule, $xoopsConfig, $myts;

        $helper    = Helper::getInstance();
Severity: Minor
Found in class/Utility.php - About 1 hr to fix

    Method isUtf8 has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function isUtf8($Str)
        { # by bmorel at ssi dot fr
            for ($i = 0, $iMax = mb_strlen($Str); $i < $iMax; ++$i) {
                if (\ord($Str[$i]) < 0x80) {
                    continue;
    Severity: Minor
    Found in class/Utility.php - About 1 hr to fix

      Method lx_serviceLinksnew has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function lx_serviceLinksnew($variable)
      {
          global $xoopsUser, $xoopsDB, $xoopsModule, $xoopsModuleConfig, $xoopsConfig, $myts;
          $srvlinks2 = '<a title="'
                       . _MD_LEXIKON_PRINTTERM
      Severity: Minor
      Found in include/functions.php - About 1 hr to fix

        Method getServerStats has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static function getServerStats()
            {
                //mb    $wfdownloads = WfdownloadsWfdownloads::getInstance();
                $moduleDirName      = \basename(\dirname(__DIR__, 2));
                $moduleDirNameUpper = mb_strtoupper($moduleDirName);
        Severity: Minor
        Found in class/Common/ServerStats.php - About 1 hr to fix

          Method updateBlock has 9 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              function updateBlock($bid, $btitle, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options, $groups)
          Severity: Major
          Found in admin/blocksadmin.php - About 1 hr to fix

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

            function FormImport()
            {
                global $xoopsConfig, $xoopsDB, $xoopsModule;
                //lx_importMenu(9);
                echo "<strong style='color: #2F5376; margin-top:6px; font-size:medium'>" . _AM_LEXIKON_IMPORT_DICTIONARY . '</strong><br><br>';
            Severity: Minor
            Found in admin/importdictionary.php - About 1 hr to fix

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

              function FormImport()
              {
                  global $xoopsConfig, $xoopsDB, $xoopsModule;
                  //lx_importMenu(9);
                  echo "<strong style='color: #2F5376; margin-top:6px; font-size:medium'>" . _AM_LEXIKON_IMPORT_GLOSSAIRE . '</strong><br><br>';
              Severity: Minor
              Found in admin/importglossaire.php - About 1 hr to fix

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

                function FormImport()
                {
                    global $xoopsConfig, $xoopsDB, $xoopsModule;
                    //lx_importMenu(9);
                    echo "<strong style='color: #2F5376; margin-top:6px; font-size:medium'>" . _AM_LEXIKON_IMPORT_XWORDS . '</strong><br><br>';
                Severity: Minor
                Found in admin/importxwords.php - About 1 hr to fix

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

                  function lx_AuthorProfile($uid)
                  {
                      require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
                      global $authortermstotal, $xoopsTpl, $xoopsDB, $xoopsUser, $xoopsModuleConfig;
                      $myts = \MyTextSanitizer::getInstance();
                  Severity: Minor
                  Found in include/functions.php - About 1 hr to fix

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

                    function FormImport()
                    {
                        global $xoopsConfig, $xoopsDB, $xoopsModule;
                        //lx_importMenu(9);
                        echo "<strong style='color: #2F5376; margin-top:6px; font-size:medium'>" . _AM_LEXIKON_IMPORT_WORDBOOK . '</strong><br><br>';
                    Severity: Minor
                    Found in admin/importwordbook.php - About 1 hr to fix

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

                      function FormImport()
                      {
                          global $xoopsConfig, $xoopsDB, $xoopsModule;
                          //lx_importMenu(9);
                          echo "<strong style='color: #2F5376; margin-top:6px; font-size:medium'>" . _AM_LEXIKON_IMPORT_WIWIMOD . '</strong><br><br>';
                      Severity: Minor
                      Found in admin/importwiwimod.php - About 1 hr to fix

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

                        function lx_showSearchForm()
                        {
                            global $xoopsUser, $xoopsDB, $xoopsModule, $xoopsModuleConfig, $xoopsConfig;
                            /** @var \XoopsGroupPermHandler $grouppermHandler */
                            $grouppermHandler = xoops_getHandler('groupperm');
                        Severity: Minor
                        Found in include/functions.php - About 1 hr to fix

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

                              public static function getFormSearch($type = '3', $categoryID = '0', $term = '')
                              {
                                  global $xoopsUser, $xoopsDB, $xoopsModule, $xoopsConfig;
                          
                                  $helper = Helper::getInstance();
                          Severity: Minor
                          Found in class/Utility.php - About 1 hr to fix

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

                                public function getFormFilter()
                                {
                                    global $xoopsUser, $xoopsDB, $xoopsModule, $xoopsConfig;
                            
                                    $helper = Helper::getInstance();
                            Severity: Minor
                            Found in class/Entries.php - About 1 hr to fix

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

                              function check_browser_can_use_spaw()
                              {
                                  $browser = $_SERVER['HTTP_USER_AGENT'];
                                  // check if msie
                                  if (preg_match('/MSIE[^;]*/i', $browser, $msie)) {
                              Severity: Minor
                              Found in admin/myblockform.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 _loadAllChildItemIds has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function _loadAllChildItemIds($itemId, &$childIds)
                                  {
                                      if (!empty($this->_itemTree[$itemId]['children'])) {
                                          $first_child = $this->_itemTree[$itemId]['children'];
                                          foreach ($first_child as $fcid) {
                              Severity: Minor
                              Found in class/GroupPermForm.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 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

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

                                function b_lxentries_new_edit($options)
                                {
                                    $form = "<table style='width:100%;' class='bg2'>";
                                    $form .= "<tr><th style='width:50%'>" . _OPTIONS . "</th><th style='width:50%'>" . _MB_LEXIKON_SETTINGS . '</th></tr>';
                                    $form .= "<tr><td class='even'>" . _MB_LEXIKON_ORDER . "</td><td class='odd'>";
                                Severity: Minor
                                Found in blocks/entries_new.php - About 1 hr to fix

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

                                  function b_lxentries_top_edit($options)
                                  {
                                      $form = "<table width='100%' border='0'  class='bg2'>";
                                      $form .= "<tr><th width='50%'>" . _OPTIONS . "</th><th width='50%'>" . _MB_LEXIKON_SETTINGS . '</th></tr>';
                                      $form .= "<tr><td class='even'>" . _MB_LEXIKON_ORDER . "</td><td class='odd'>";
                                  Severity: Minor
                                  Found in blocks/entries_top.php - About 1 hr to fix

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

                                        public static function getCategoryArray()
                                        {
                                            global $xoopsDB, $xoopsUser, $xoopsModule;
                                    
                                            $helper           = Helper::getInstance();
                                    Severity: Minor
                                    Found in class/Utility.php - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language