XoopsModules25x/mylinks

View on GitHub

Showing 272 of 370 total issues

Method xoops_module_update_mylinks_base has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function xoops_module_update_mylinks_base(XoopsModule $xoopsModule, $prev_version)
{
    $minUpgradeFrom = '0.0.0';  //minimum version of module supported for upgrade
    $success        = false;

Severity: Minor
Found in include/onupdate.inc.php - About 1 hr to fix

    Method b_system_notification_show has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function b_system_notification_show()
    {
        global $xoopsConfig, $xoopsUser, $xoopsModule;
        include_once XOOPS_ROOT_PATH . '/include/notification_functions.php';
        include_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/notification.php';
    Severity: Minor
    Found in extras/XOOPS_2.5.x/htdocs/modules/system/blocks/system_blocks.php - About 1 hr to fix

      Function MakeFontDescriptor has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

      function MakeFontDescriptor($fm,$symbolic)
      {
        //Ascent
        $asc=(isset($fm['Ascender']) ? $fm['Ascender'] : 1000);
        $fd="array('Ascent'=>".$asc;
      Severity: Minor
      Found in fpdf/font/makefont/makefont.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 extract_post_recursive has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

              public function extract_post_recursive($key_name, $tmp_array)
              {
                  $table = '';
                  $form  = '';
                  foreach ($tmp_array as $key => $val) {
      Severity: Minor
      Found in include/gtickets.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 MakeFontDescriptor has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function MakeFontDescriptor($fm,$symbolic)
      {
        //Ascent
        $asc=(isset($fm['Ascender']) ? $fm['Ascender'] : 1000);
        $fd="array('Ascent'=>".$asc;
      Severity: Minor
      Found in fpdf/font/makefont/makefont.php - About 1 hr to fix

        Method xoops_module_pre_install_mylinks_base has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function xoops_module_pre_install_mylinks_base(&$xoopsModule)
        {
            global $xoopsDB;
            $retVal = true;
        
        
        Severity: Minor
        Found in include/oninstall.inc.php - About 1 hr to fix

          Method b_system_main_show has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function b_system_main_show()
          {
              global $xoopsUser, $xoopsModule;
              $block               = array();
              $block['lang_home']  = _MB_SYSTEM_HOME;
          Severity: Minor
          Found in extras/XOOPS_2.5.x/htdocs/modules/system/blocks/system_blocks.php - About 1 hr to fix

            Method GetCode has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function GetCode(&$data, $bInit)
              {
                if($bInit) {
                  $this->CurBit   = 0;
                  $this->LastBit  = 0;
            Severity: Minor
            Found in fpdf/gif.php - About 1 hr to fix

              Method WriteHTML has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function WriteHTML($html,$scale)
                {
                //    $html=strip_tags($html,"<b><u><i><a><img><p><br><strong><em><font><tr><blockquote>"); //remove all unsupported tags
                    $html=str_replace("\n",' ',$html); //replace carriage returns by spaces
                    $a=preg_split('/<(.*)>/U',$html,-1,PREG_SPLIT_DELIM_CAPTURE); //explodes the string
              Severity: Minor
              Found in fpdf/makepdf_class.php - About 1 hr to fix

                Method importCats has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function importCats()
                {
                    global $xoopsDB, $xoopsModule, $xoopsConfig, $myts;
                
                    $ok = MylinksUtility::mylinks_cleanVars($_POST, 'ok', 0, 'int', array('min' => 0, 'max' => 1));
                Severity: Minor
                Found in admin/main.php - About 1 hr to fix

                  Method myblocksadmin_update_blockinstance has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function myblocksadmin_update_blockinstance(
                      $id,
                      $bside,
                      $bweight,
                      $bvisible,
                  Severity: Minor
                  Found in include/blocksadmin.inc.php - About 1 hr to fix

                    Method approve has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function approve()
                    {
                        global $xoopsDB, $myts, $xoopsModule;
                    
                        $lid         = MylinksUtility::mylinks_cleanVars($_POST, 'lid', 0, 'int', array('min' => 0));
                    Severity: Minor
                    Found in admin/main.php - About 1 hr to fix

                      Method renderImageNav has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function renderImageNav($offset = 5)
                          {
                              if ($this->total < $this->perpage) {
                                  return;
                              }
                      Severity: Minor
                      Found in class/mylinkspagenav.php - About 1 hr to fix

                        Method listNewLinks has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function listNewLinks()
                        {
                            global $xoopsDB, $myts, $myCatTree, $xoopsModule;
                            // List links waiting for validation
                            $linkimg_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/images/shots/');
                        Severity: Minor
                        Found in admin/main.php - About 1 hr to fix

                          Function _beginpage has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function _beginpage($orientation)
                          {
                            $this->page++;
                            $this->pages[$this->page]='';
                            $this->state=2;
                          Severity: Minor
                          Found in fpdf/fpdf.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 b_system_comments_show has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function b_system_comments_show($options)
                          {
                              $block = array();
                              include_once XOOPS_ROOT_PATH . '/include/comment_constants.php';
                              $commentHandler = xoops_getHandler('comment');
                          Severity: Minor
                          Found in extras/XOOPS_2.5.x/htdocs/modules/system/blocks/system_blocks.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 PutImage has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                            function PutImage($url,$scale)
                            {
                              if($scale<0) $scale=0;
                              //$scale<=0: put NO image inside the pdf!
                              if($scale>0){
                          Severity: Minor
                          Found in fpdf/makepdf_class.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 setShotSize has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function setShotSize($sz)
                              {
                                  if (isset($sz)) {
                                      if (is_array($sz)) {
                                          if (array_key_exists('width', $sz)) {
                          Severity: Minor
                          Found in class/providers/heartrails.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 render has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function render()
                              {
                                  $ret = '';
                          
                                  if (count($this->_appendix) > 0) {
                          Severity: Minor
                          Found in admin/mygrouppermform.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 render has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function render()
                              {
                                  global $xoopsGTicket;
                          
                                  // load all child ids for javascript codes
                          Severity: Minor
                          Found in admin/mygrouppermform.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

                          Severity
                          Category
                          Status
                          Source
                          Language