XoopsModules25x/mylinks

View on GitHub

Showing 370 of 370 total issues

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

              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

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

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

                function mylinks_notify_iteminfo($category, $item_id)
                {
                    global $xoopsModule, $xoopsModuleConfig, $xoopsConfig, $xoopsDB;
                    $dirname = basename(dirname(__DIR__));
                
                
                Severity: Minor
                Found in include/notification.inc.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 changeModReq has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                Open

                function changeModReq()
                {
                    global $xoopsDB, $myts;
                
                    $requestid = MylinksUtility::mylinks_cleanVars($_POST, 'requestid', 0, 'int', array('min' => 0));
                Severity: Minor
                Found in admin/main.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

                Method render has 35 lines of code (exceeds 25 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

                  Method draw_repost_form has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          public function draw_repost_form($area = '')
                          {
                              // Notify which file is broken
                              if (headers_sent()) {
                                  restore_errorHandler();
                  Severity: Minor
                  Found in include/gtickets.php - About 1 hr to fix

                    Method myblocksadmin_update_blockinstance has 11 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        $id,
                        $bside,
                        $bweight,
                        $bvisible,
                        $btitle,
                    Severity: Major
                    Found in include/blocksadmin.inc.php - About 1 hr to fix

                      Method setShotSize has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function setShotSize($sz)
                          {
                              $validX  = array(90, 120, 200, 400, 480);
                              $validY  = array(68, 90, 150, 300, 360);
                              $sizeMap = array(0 => 't', 1 => 's', 2 => 'm', 3 => 'l', 4 => 'x');
                      Severity: Minor
                      Found in class/providers/pagepeeker.php - About 1 hr to fix

                        Method renderNav has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function renderNav($offset = 5)
                            {
                                $ret = '';
                                if ($this->total <= $this->perpage) {
                                    return $ret;
                        Severity: Minor
                        Found in class/mylinkspagenav.php - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language