XoopsModules25x/lexikon

View on GitHub

Showing 216 of 316 total issues

Method entrySave has 137 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function entrySave($entryID = '')
{
    global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsDB;
    $helper  = Helper::getInstance();
    $utility = new Utility();
Severity: Major
Found in admin/entry.php - About 5 hrs to fix

    Function b_lxspot_show has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
    Open

    function b_lxspot_show($options)
    {
        global $xoopsDB, $xoopsUser;
        $myts = MyTextSanitizer:: getInstance();
        xoops_load('XoopsUserUtility');
    Severity: Minor
    Found in blocks/entries_spot.php - About 5 hrs 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 entryEdit has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
    Open

    function entryEdit($entryID = '')
    {
        global $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModule, $init;
        $helper = Helper::getInstance();
    
    
    Severity: Minor
    Found in admin/entry.php - About 5 hrs 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 myblocksadmin_update_block has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
    Open

    function myblocksadmin_update_block(
        $bid,
        $bside,
        $bweight,
        $bvisible,
    Severity: Minor
    Found in include/blocksadmin.inc.php - About 4 hrs 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 DefinitionImport has 118 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function DefinitionImport($delete)
    {
        global $xoopsConfig, $xoopsDB, $xoopsModule, $myts;
        $sqlQuery = $xoopsDB->query('SELECT count(id) AS count FROM ' . $xoopsDB->prefix('dictionary'));
        [$count] = $xoopsDB->fetchRow($sqlQuery);
    Severity: Major
    Found in admin/importdictionary.php - About 4 hrs to fix

      Method extractKeywords has 116 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function extractKeywords($content)
          {
              global $xoopsTpl, $xoTheme, $xoopsModule;
      
              $helper = Helper::getInstance();
      Severity: Major
      Found in class/Utility.php - About 4 hrs to fix

        Method lx_extract_keywords has 115 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function lx_extract_keywords($content)
        {
            global $xoopsTpl, $xoTheme, $xoopsModule, $xoopsModuleConfig;
            require_once XOOPS_ROOT_PATH . '/modules/lexikon/include/common.inc.php';
            $keywords_count = $helper->getConfig('metakeywordsnum');
        Severity: Major
        Found in include/functions.php - About 4 hrs to fix

          Function categorySave has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
          Open

          function categorySave($categoryID = '')
          {
              require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
              require_once XOOPS_ROOT_PATH . '/class/uploader.php';
              global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsDB, $myts, $categoryID;
          Severity: Minor
          Found in admin/category.php - About 4 hrs 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 lx_Statistics has 112 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function lx_Statistics()
          {
              global $xoopsModule, $xoopsConfig;
              $helper = Helper::getInstance();
              xoops_load('XoopsUserUtility');
          Severity: Major
          Found in admin/statistics.php - About 4 hrs to fix

            Method lx_search has 107 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function lx_search($queryarray, $andor, $limit, $offset, $userid)
            {
                global $xoopsDB, $xoopsUser;
                // -- search comments + highlighter
                $highlight        = false;
            Severity: Major
            Found in include/search.inc.php - About 4 hrs to fix

              File admin.php has 343 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              
              /**
               * Module: Lexikon - glossary module
               * Version: v 1.00
              Severity: Minor
              Found in language/german/admin.php - About 4 hrs to fix

                File admin.php has 343 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                
                /**
                 * Module: Lexikon - glossary module
                 * Version: v 1.00
                Severity: Minor
                Found in language/english/admin.php - About 4 hrs to fix

                  Method lx_removeAccents has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function lx_removeAccents($string)
                  {
                      $chars['in']  = chr(128)
                                      . chr(131)
                                      . chr(138)
                  Severity: Major
                  Found in include/functions.php - About 4 hrs to fix

                    Method b_lxentries_random_show has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function b_lxentries_random_show()
                    {
                        global $xoopsDB, $xoopsUser, $xoopsConfig, $xoopsModule;
                        $myts = \MyTextSanitizer::getInstance();
                    
                    
                    Severity: Major
                    Found in blocks/random_term.php - About 4 hrs to fix

                      Method entryDefault has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function entryDefault()
                      {
                          global $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModule, $entryID, $pathIcon16;
                          $helper = Helper::getInstance();
                          require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
                      Severity: Major
                      Found in admin/entry.php - About 4 hrs to fix

                        Method __construct has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function __construct($target)
                            {
                                global $helper;
                                $this->targetObject = $target;
                        
                        
                        Severity: Major
                        Found in class/Form/CategoriesForm.php - About 4 hrs to fix

                          Method DefinitionImport has 101 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function DefinitionImport($delete)
                          {
                              global $xoopsConfig, $xoopsDB, $xoopsModule;
                              $sqlQuery = $xoopsDB->query('SELECT count(id) AS count FROM ' . $xoopsDB->prefix('glossaire'));
                              [$count] = $xoopsDB->fetchRow($sqlQuery);
                          Severity: Major
                          Found in admin/importglossaire.php - About 4 hrs to fix

                            Function DefinitionImport has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                            Open

                            function DefinitionImport($delete)
                            {
                                global $xoopsConfig, $xoopsDB, $xoopsModule;
                                $sqlQuery = $xoopsDB->query('SELECT count(id) AS count FROM ' . $xoopsDB->prefix('glossaire'));
                                [$count] = $xoopsDB->fetchRow($sqlQuery);
                            Severity: Minor
                            Found in admin/importglossaire.php - About 3 hrs 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

                            File category.php has 327 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            <?php
                            /**
                             * Module: Lexikon - glossary module
                             * Author: hsalazar
                             * Licence: GNU
                            Severity: Minor
                            Found in admin/category.php - About 3 hrs to fix

                              Method b_lxspot_show has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function b_lxspot_show($options)
                              {
                                  global $xoopsDB, $xoopsUser;
                                  $myts = MyTextSanitizer:: getInstance();
                                  xoops_load('XoopsUserUtility');
                              Severity: Major
                              Found in blocks/entries_spot.php - About 3 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language