xoopscube/altsys

View on GitHub
xoops_trust_path/libs/altsys/include/Archive_Zip.php

Summary

Maintainability
F
3 wks
Test Coverage

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

    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

    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

      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

        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

          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

            Method _extractFile has 100 lines of code (exceeds 25 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: Major
            Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 4 hrs to fix

              Method _merge has 96 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                public function _merge(&$p_archive_to_add)
                {
                    $v_result=1;
              
                  // ----- Look if the archive_to_add exists
              Severity: Major
              Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 3 hrs to fix

                Method _add has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  public function _add($p_list, &$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 3 hrs to fix

                  Function _readEndCentralDir has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                  Open

                    public function _readEndCentralDir(&$p_central_dir)
                    {
                        $v_result=1;
                  
                      // ----- Go to the end of the zip file
                  Severity: Minor
                  Found in xoops_trust_path/libs/altsys/include/Archive_Zip.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

                  Method _readEndCentralDir has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    public function _readEndCentralDir(&$p_central_dir)
                    {
                        $v_result=1;
                  
                      // ----- Go to the end of the zip file
                  Severity: Major
                  Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 3 hrs to fix

                    Function _tool_PathInclusion has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                    Open

                      public function _tool_PathInclusion($p_dir, $p_path)
                      {
                          $v_result = 1;
                    
                        // ----- Explode dir and path by directory separator
                    Severity: Minor
                    Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 2 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 _add has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                      public function _add($p_list, &$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 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 _addFileList has 47 lines of code (exceeds 25 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 1 hr to fix

                      Method _readCentralFileHeader has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        public function _readCentralFileHeader(&$p_header)
                        {
                            $v_result=1;
                      
                          // ----- Read the 4 bytes signature
                      Severity: Minor
                      Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 1 hr to fix

                        Function _check_parameters has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                        Open

                          public function _check_parameters(&$p_params, $p_default)
                          {
                        
                            // ----- Check that param is an array
                            if (!is_array($p_params)) {
                        Severity: Minor
                        Found in xoops_trust_path/libs/altsys/include/Archive_Zip.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 _readFileHeader has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          public function _readFileHeader(&$p_header)
                          {
                              $v_result=1;
                        
                            // ----- Read the 4 bytes signature
                        Severity: Minor
                        Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 1 hr to fix

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

                            public function _tool_PathInclusion($p_dir, $p_path)
                            {
                                $v_result = 1;
                          
                              // ----- Explode dir and path by directory separator
                          Severity: Minor
                          Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 1 hr to fix

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

                              public function _readCentralFileHeader(&$p_header)
                              {
                                  $v_result=1;
                            
                                // ----- Read the 4 bytes signature
                            Severity: Minor
                            Found in xoops_trust_path/libs/altsys/include/Archive_Zip.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 _merge has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                            Open

                              public function _merge(&$p_archive_to_add)
                              {
                                  $v_result=1;
                            
                                // ----- Look if the archive_to_add exists
                            Severity: Minor
                            Found in xoops_trust_path/libs/altsys/include/Archive_Zip.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 _tool_CopyBlock has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                            Open

                              public function _tool_CopyBlock($p_src, $p_dest, $p_size, $p_mode=0)
                              {
                                  $v_result = 1;
                            
                                  if ($p_mode==0) {
                            Severity: Minor
                            Found in xoops_trust_path/libs/altsys/include/Archive_Zip.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 _tool_CopyBlock has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              public function _tool_CopyBlock($p_src, $p_dest, $p_size, $p_mode=0)
                              {
                                  $v_result = 1;
                            
                                  if ($p_mode==0) {
                            Severity: Minor
                            Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 1 hr to fix

                              Method _check_parameters has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                public function _check_parameters(&$p_params, $p_default)
                                {
                              
                                  // ----- Check that param is an array
                                  if (!is_array($p_params)) {
                              Severity: Minor
                              Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 1 hr to fix

                                Function _dirCheck has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                Open

                                  public function _dirCheck($p_dir, $p_is_dir=false)
                                  {
                                      $v_result = 1;
                                
                                    // ----- Remove the final '/'
                                Severity: Minor
                                Found in xoops_trust_path/libs/altsys/include/Archive_Zip.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 add has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function add($p_filelist, $p_params=0)
                                    {
                                        $this->_errorReset();
                                
                                        // ----- Set default values
                                Severity: Minor
                                Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 1 hr to fix

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

                                      public function create($p_filelist, $p_params=0)
                                      {
                                          $this->_errorReset();
                                  
                                          // ----- Set default values
                                  Severity: Minor
                                  Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 1 hr to fix

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

                                      public function _tool_PathReduction($p_dir)
                                      {
                                          $v_result = "";
                                    
                                        // ----- Look for not empty path
                                    Severity: Minor
                                    Found in xoops_trust_path/libs/altsys/include/Archive_Zip.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 extract has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function extract($p_params=0)
                                        {
                                            $this->_errorReset();
                                    
                                            // ----- Check archive
                                    Severity: Minor
                                    Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 1 hr to fix

                                      Method delete has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function delete($p_params)
                                          {
                                              $this->_errorReset();
                                      
                                              // ----- Check archive
                                      Severity: Minor
                                      Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 1 hr to fix

                                        Method _duplicate has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          public function _duplicate($p_archive_filename)
                                          {
                                              $v_result=1;
                                        
                                            // ----- Look if the $p_archive_filename exists
                                        Severity: Minor
                                        Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 1 hr to fix

                                          Consider simplifying this complex logical expression.
                                          Open

                                                if ((isset($p_params[ARCHIVE_ZIP_PARAM_BY_NAME]))
                                                    && ($p_params[ARCHIVE_ZIP_PARAM_BY_NAME] != 0)) {
                                          
                                                    // ----- Look if the filename is in the list
                                                    for ($j=0;
                                          Severity: Major
                                          Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 1 hr to fix

                                            Consider simplifying this complex logical expression.
                                            Open

                                                  if ((isset($p_params[ARCHIVE_ZIP_PARAM_BY_NAME]))
                                                      && ($p_params[ARCHIVE_ZIP_PARAM_BY_NAME] != 0)) {
                                            
                                                      // ----- Look if the filename is in the list
                                                      for ($j=0;
                                            Severity: Major
                                            Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 1 hr to fix

                                              Method _addList has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                              Open

                                                public function _addList($p_list, &$p_result_list,
                                                                  $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_params)
                                              Severity: Minor
                                              Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 45 mins to fix

                                                Method _addFileList has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                Open

                                                  public function _addFileList($p_list, &$p_result_list,
                                                                        $p_add_dir, $p_remove_dir, $p_remove_all_dir,
                                                                        &$p_params)
                                                Severity: Minor
                                                Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 45 mins to fix

                                                  Function _addList has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                  Open

                                                    public function _addList($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 45 mins 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 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                  Open

                                                    public function _addFile($p_filename, &$p_header, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_params)
                                                  Severity: Minor
                                                  Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 45 mins to fix

                                                    Avoid deeply nested control flow statements.
                                                    Open

                                                                      if ((strlen($v_header_list[$v_nb_extracted]['stored_filename']) > strlen($p_params[ARCHIVE_ZIP_PARAM_BY_NAME][$j]))
                                                                          && (substr($v_header_list[$v_nb_extracted]['stored_filename'], 0, strlen($p_params[ARCHIVE_ZIP_PARAM_BY_NAME][$j])) == $p_params[ARCHIVE_ZIP_PARAM_BY_NAME][$j])) {
                                                                          $v_found = true;
                                                                      } elseif ((($v_header_list[$v_nb_extracted]['external']&0x00000010)==0x00000010) /* Indicates a folder */
                                                                              && ($v_header_list[$v_nb_extracted]['stored_filename'].'/' == $p_params[ARCHIVE_ZIP_PARAM_BY_NAME][$j])) {
                                                    Severity: Major
                                                    Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 45 mins to fix

                                                      Method _extractFile has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                      Open

                                                        public function _extractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_params)
                                                      Severity: Minor
                                                      Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 35 mins to fix

                                                        Function errorName has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                        Open

                                                            public function errorName($p_with_code=false)
                                                            {
                                                                $v_const_list = get_defined_constants();
                                                        
                                                                  // ----- Extract error constants from all const.
                                                        Severity: Minor
                                                        Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 35 mins 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 _tool_TranslateWinPath has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                        Open

                                                          public function _tool_TranslateWinPath($p_path, $p_remove_disk_letter=true)
                                                          {
                                                              if (stristr(php_uname(), 'windows')) {
                                                                  // ----- Look for potential disk letter
                                                              if (($p_remove_disk_letter)
                                                        Severity: Minor
                                                        Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 35 mins 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 duplicate has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                        Open

                                                            public function duplicate($p_archive)
                                                            {
                                                                $this->_errorReset();
                                                        
                                                                // ----- Look if the $p_archive is a Archive_Zip object
                                                        Severity: Minor
                                                        Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 35 mins 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 _readFileHeader has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                        Open

                                                          public function _readFileHeader(&$p_header)
                                                          {
                                                              $v_result=1;
                                                        
                                                            // ----- Read the 4 bytes signature
                                                        Severity: Minor
                                                        Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 35 mins 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

                                                        Avoid too many return statements within this method.
                                                        Open

                                                            return $v_result;
                                                        Severity: Major
                                                        Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                          Avoid too many return statements within this method.
                                                          Open

                                                                    return Archive_Zip::errorCode();
                                                          Severity: Major
                                                          Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                            Avoid too many return statements within this method.
                                                            Open

                                                                          return $v_result;
                                                            Severity: Major
                                                            Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                              Avoid too many return statements within this method.
                                                              Open

                                                                      return Archive_Zip::errorCode();
                                                              Severity: Major
                                                              Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                Avoid too many return statements within this method.
                                                                Open

                                                                            return $v_result;
                                                                Severity: Major
                                                                Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                  Avoid too many return statements within this method.
                                                                  Open

                                                                        return $v_result;
                                                                  Severity: Major
                                                                  Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                    Avoid too many return statements within this method.
                                                                    Open

                                                                                    return Archive_Zip::errorCode();
                                                                    Severity: Major
                                                                    Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                      Avoid too many return statements within this method.
                                                                      Open

                                                                                      return $v_result;
                                                                      Severity: Major
                                                                      Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                        Avoid too many return statements within this method.
                                                                        Open

                                                                                return Archive_Zip::errorCode();
                                                                        Severity: Major
                                                                        Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                          Avoid too many return statements within this method.
                                                                          Open

                                                                              return $v_result;
                                                                          Severity: Major
                                                                          Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                            Avoid too many return statements within this method.
                                                                            Open

                                                                                          return $v_result;
                                                                            Severity: Major
                                                                            Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                              Avoid too many return statements within this method.
                                                                              Open

                                                                                      return Archive_Zip::errorCode();
                                                                              Severity: Major
                                                                              Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                                Avoid too many return statements within this method.
                                                                                Open

                                                                                            return $v_result;
                                                                                Severity: Major
                                                                                Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                                  Avoid too many return statements within this method.
                                                                                  Open

                                                                                                  return $v_result;
                                                                                  Severity: Major
                                                                                  Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                                    Avoid too many return statements within this method.
                                                                                    Open

                                                                                        return $v_result;
                                                                                    Severity: Major
                                                                                    Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                                      Avoid too many return statements within this method.
                                                                                      Open

                                                                                            return $v_result;
                                                                                      Severity: Major
                                                                                      Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                                        Avoid too many return statements within this method.
                                                                                        Open

                                                                                            return $v_result;
                                                                                        Severity: Major
                                                                                        Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                                          Avoid too many return statements within this method.
                                                                                          Open

                                                                                                return $v_result;
                                                                                          Severity: Major
                                                                                          Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                                            Avoid too many return statements within this method.
                                                                                            Open

                                                                                                            return $v_result;
                                                                                            Severity: Major
                                                                                            Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                                              Avoid too many return statements within this method.
                                                                                              Open

                                                                                                  return $v_result;
                                                                                              Severity: Major
                                                                                              Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                                                Avoid too many return statements within this method.
                                                                                                Open

                                                                                                    return $v_result;
                                                                                                Severity: Major
                                                                                                Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                                                  Avoid too many return statements within this method.
                                                                                                  Open

                                                                                                                return $v_result;
                                                                                                  Severity: Major
                                                                                                  Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                                                    Avoid too many return statements within this method.
                                                                                                    Open

                                                                                                                  return $v_result;
                                                                                                    Severity: Major
                                                                                                    Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                                                      Avoid too many return statements within this method.
                                                                                                      Open

                                                                                                                      return $v_result;
                                                                                                      Severity: Major
                                                                                                      Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                                                        Avoid too many return statements within this method.
                                                                                                        Open

                                                                                                                return $v_result;
                                                                                                        Severity: Major
                                                                                                        Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                                                          Avoid too many return statements within this method.
                                                                                                          Open

                                                                                                                    return $v_result;
                                                                                                          Severity: Major
                                                                                                          Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                                                            Avoid too many return statements within this method.
                                                                                                            Open

                                                                                                                return $v_result;
                                                                                                            Severity: Major
                                                                                                            Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                                                              Avoid too many return statements within this method.
                                                                                                              Open

                                                                                                                  return $v_result;
                                                                                                              Severity: Major
                                                                                                              Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                                                                Avoid too many return statements within this method.
                                                                                                                Open

                                                                                                                        return $v_list;
                                                                                                                Severity: Major
                                                                                                                Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                                                                  Avoid too many return statements within this method.
                                                                                                                  Open

                                                                                                                            return $v_result;
                                                                                                                  Severity: Major
                                                                                                                  Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 30 mins to fix

                                                                                                                    Function properties has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                        public function properties()
                                                                                                                        {
                                                                                                                            $this->_errorReset();
                                                                                                                    
                                                                                                                            // ----- Check archive
                                                                                                                    Severity: Minor
                                                                                                                    Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 25 mins 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 _extractFileAsString has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                      public function _extractFileAsString(&$p_entry, &$p_string)
                                                                                                                      {
                                                                                                                          $v_result=1;
                                                                                                                    
                                                                                                                        // ----- Read the file header
                                                                                                                    Severity: Minor
                                                                                                                    Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 25 mins 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 create has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                        public function create($p_filelist, $p_params=0)
                                                                                                                        {
                                                                                                                            $this->_errorReset();
                                                                                                                    
                                                                                                                            // ----- Set default values
                                                                                                                    Severity: Minor
                                                                                                                    Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 25 mins 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 add has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                        public function add($p_filelist, $p_params=0)
                                                                                                                        {
                                                                                                                            $this->_errorReset();
                                                                                                                    
                                                                                                                            // ----- Set default values
                                                                                                                    Severity: Minor
                                                                                                                    Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 25 mins 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 _list has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                      public function _list(&$p_list)
                                                                                                                      {
                                                                                                                          $v_result=1;
                                                                                                                    
                                                                                                                        // ----- Open the zip file
                                                                                                                    Severity: Minor
                                                                                                                    Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php - About 25 mins 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

                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                          elseif ((isset($p_params[ARCHIVE_ZIP_PARAM_BY_INDEX]))
                                                                                                                                   && ($p_params[ARCHIVE_ZIP_PARAM_BY_INDEX] != 0)) {
                                                                                                                    
                                                                                                                              // ----- Look if the index is in the list
                                                                                                                              for ($j=$j_start;
                                                                                                                    Severity: Major
                                                                                                                    Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php and 1 other location - About 5 hrs to fix
                                                                                                                    xoops_trust_path/libs/altsys/include/Archive_Zip.php on lines 1843..1859

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 183.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                          elseif ((isset($p_params[ARCHIVE_ZIP_PARAM_BY_INDEX]))
                                                                                                                                   && ($p_params[ARCHIVE_ZIP_PARAM_BY_INDEX] != 0)) {
                                                                                                                    
                                                                                                                              // ----- Look if the index is in the list
                                                                                                                              for ($j=$j_start; ($j<sizeof($p_params[ARCHIVE_ZIP_PARAM_BY_INDEX])) && (!$v_extract); $j++) {
                                                                                                                    Severity: Major
                                                                                                                    Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php and 1 other location - About 5 hrs to fix
                                                                                                                    xoops_trust_path/libs/altsys/include/Archive_Zip.php on lines 2684..2704

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 183.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                        if ($p_header['mdate'] && $p_header['mtime']) {
                                                                                                                            // ----- Extract time
                                                                                                                          $v_hour = ($p_header['mtime'] & 0xF800) >> 11;
                                                                                                                            $v_minute = ($p_header['mtime'] & 0x07E0) >> 5;
                                                                                                                            $v_seconde = ($p_header['mtime'] & 0x001F)*2;
                                                                                                                    Severity: Major
                                                                                                                    Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php and 1 other location - About 4 hrs to fix
                                                                                                                    xoops_trust_path/libs/altsys/include/Archive_Zip.php on lines 2295..2310

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 182.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                          if ($p_header['mdate'] && $p_header['mtime']) {
                                                                                                                              // ----- Extract time
                                                                                                                          $v_hour = ($p_header['mtime'] & 0xF800) >> 11;
                                                                                                                              $v_minute = ($p_header['mtime'] & 0x07E0) >> 5;
                                                                                                                              $v_seconde = ($p_header['mtime'] & 0x001F)*2;
                                                                                                                    Severity: Major
                                                                                                                    Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php and 1 other location - About 4 hrs to fix
                                                                                                                    xoops_trust_path/libs/altsys/include/Archive_Zip.php on lines 2401..2416

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 182.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                            if (is_array($p_filelist)) {
                                                                                                                                $v_result = $this->_create($p_filelist, $p_result_list, $p_params);
                                                                                                                            }
                                                                                                                    
                                                                                                                            // ----- Look if the $p_filelist is a string
                                                                                                                    Severity: Major
                                                                                                                    Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php and 1 other location - About 1 hr to fix
                                                                                                                    xoops_trust_path/libs/altsys/include/Archive_Zip.php on lines 275..294

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 109.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                    Open

                                                                                                                            if (is_array($p_filelist)) {
                                                                                                                                // ----- Call the create fct
                                                                                                                                $v_result = $this->_add($p_filelist, $p_result_list, $p_params);
                                                                                                                            }
                                                                                                                    
                                                                                                                    
                                                                                                                    Severity: Major
                                                                                                                    Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php and 1 other location - About 1 hr to fix
                                                                                                                    xoops_trust_path/libs/altsys/include/Archive_Zip.php on lines 202..219

                                                                                                                    Duplicated Code

                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 109.

                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                    Refactorings

                                                                                                                    Further Reading

                                                                                                                    There are no issues that match your filters.

                                                                                                                    Category
                                                                                                                    Status