xoopscube/altsys

View on GitHub

Showing 210 of 288 total issues

File Archive_Zip.php has 1649 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/* vim: set ts=4 sw=4: */
// +----------------------------------------------------------------------+
// | PHP Version 4                                                        |
// +----------------------------------------------------------------------+
Severity: Major
Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 4 days to fix

    File MyBlocksAdmin.class.php has 821 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    // $Id: MyBlocksAdmin.class.php ,ver 0.0.7.1 2011/02/15 02:55:00 domifara Exp $
    
    class MyBlocksAdmin
    {
    Severity: Major
    Found in xoops_trust_path/libs/altsys/class/MyBlocksAdmin.class.php - About 1 day to fix

      Function _extractByRule has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring.
      Open

        public function _extractByRule(&$p_file_list, &$p_params)
        {
            $v_result=1;
      
            $p_path = $p_params['add_path'];
      Severity: Minor
      Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 1 day 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 _deleteByRule has a Cognitive Complexity of 75 (exceeds 5 allowed). Consider refactoring.
      Open

        public function _deleteByRule(&$p_result_list, &$p_params)
        {
            $v_result=1;
            $v_list_detail = array();
      
      
      Severity: Minor
      Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 1 day 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 _extractFile has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
      Open

        public function _extractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_params)
        {
            $v_result=1;
      
          // ----- Read the file header
      Severity: Minor
      Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 1 day 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 _addFile has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
      Open

        public function _addFile($p_filename, &$p_header, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_params)
        {
            $v_result=1;
      
            if ($p_filename == "") {
      Severity: Minor
      Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 1 day 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 Text_Diff.php has 491 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /**
       * Text_Diff
       *
       * General API for generating and formatting diffs - the differences between
      Severity: Minor
      Found in xoops_trust_path/libs/altsys/include/Text_Diff.php - About 7 hrs to fix

        Function altsys_oninstall_base has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
        Open

            function altsys_oninstall_base($module, $mydirname)
            {
                // transations on module install
        
            global $ret ; // TODO :-D
        Severity: Minor
        Found in xoops_trust_path/libs/altsys/oninstall.php - About 7 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 check has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
        Open

            public function check($post = true, $area = '', $allow_repost = true)
            {
                global $xoopsModule ;
        
                $this->_errors = array() ;
        Severity: Minor
        Found in xoops_trust_path/libs/altsys/include/gtickets.php - About 7 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 _deleteByRule has 161 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          public function _deleteByRule(&$p_result_list, &$p_params)
          {
              $v_result=1;
              $v_list_detail = array();
        
        
        Severity: Major
        Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 6 hrs to fix

          Function _shiftBoundaries has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
          Open

              public function _shiftBoundaries($lines, &$changed, $other_changed)
              {
                  $i = 0;
                  $j = 0;
          
          
          Severity: Minor
          Found in xoops_trust_path/libs/altsys/include/Text_Diff.php - About 6 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

          Archive_Zip has 43 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class Archive_Zip
          {
              /**
              * The filename of the zip archive.
              *
          Severity: Minor
          Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 5 hrs to fix

            Function _diag has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
            Open

                public function _diag($xoff, $xlim, $yoff, $ylim, $nchunks)
                {
                    $flip = false;
            
                    if ($xlim - $xoff > $ylim - $yoff) {
            Severity: Minor
            Found in xoops_trust_path/libs/altsys/include/Text_Diff.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 diff has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
            Open

                public function diff($from_lines, $to_lines)
                {
                    $n_from = count($from_lines);
                    $n_to = count($to_lines);
            
            
            Severity: Minor
            Found in xoops_trust_path/libs/altsys/include/Text_Diff.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

            Method _addFile has 123 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              public function _addFile($p_filename, &$p_header, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_params)
              {
                  $v_result=1;
            
                  if ($p_filename == "") {
            Severity: Major
            Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 4 hrs to fix

              Function _addFileList has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
              Open

                public function _addFileList($p_list, &$p_result_list,
                                      $p_add_dir, $p_remove_dir, $p_remove_all_dir,
                                      &$p_params)
                {
                    $v_result=1;
              Severity: Minor
              Found in xoops_trust_path/libs/altsys/include/Archive_Zip.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

              Function b_altsys_admin_menu_show has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
              Open

              function b_altsys_admin_menu_show($options)
              {
                  global $xoopsUser ;
              
                  $mydirname = empty($options[0]) ? 'altsys' : $options[0] ;
              Severity: Minor
              Found in xoops_trust_path/libs/altsys/blocks/block_functions.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 _extractByRule has 122 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                public function _extractByRule(&$p_file_list, &$p_params)
                {
                    $v_result=1;
              
                    $p_path = $p_params['add_path'];
              Severity: Major
              Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 4 hrs to fix

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

                    function altsys_onupdate_base($module, $mydirname)
                    {
                        // transations on module update
                
                    global $msgs ; // TODO :-D
                Severity: Minor
                Found in xoops_trust_path/libs/altsys/onupdate.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 renderCell4BlockPosition has 111 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                public function renderCell4BlockPosition($block_data)
                {
                    $bid = intval($block_data['bid']) ;
                    $side = intval($block_data['side']) ;
                    $visible = intval($block_data['visible']) ;
                Severity: Major
                Found in xoops_trust_path/libs/altsys/class/MyBlocksAdminForX25.class.php - About 4 hrs to fix
                  Severity
                  Category
                  Status
                  Source
                  Language