mambax7/extgallery

View on GitHub

Showing 701 of 9,653 total issues

Function PclTarHandleDelete has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring.
Open

    function PclTarHandleDelete($p_tarname, $p_file_list, &$p_list_detail, $p_tar_mode)
    {
        TrFctStart(__FILE__, __LINE__, 'PclTarHandleDelete', "archive='$p_tarname', list, tar_mode=$p_tar_mode");
        $v_result = 1;
        $v_nb     = 0;
Severity: Minor
Found in class/pcltar.lib.php - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

File galleryview.js has 750 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
**
**  GalleryView - jQuery Content Gallery Plugin
**  Author:         Jack Anderson
**  Version:        2.1 (March 14, 2010)
Severity: Major
Found in assets/js/galleryview/galleryview.js - About 1 day to fix

    Function parse_span_elements has a Cognitive Complexity of 87 (exceeds 5 allowed). Consider refactoring.
    Open

        private function parse_span_elements($text, $markers = ['![', '&', '*', '<', '[', '_', '`', 'http', '~~'])
        {
            if (false === isset($text[2]) or $markers === []) {
                return $text;
            }

    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 parse_block_elements has 339 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function parse_block_elements(array $lines, $context = '')
        {
            $elements = [];
    
            $element = [

      Function _init has 338 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _init: function() {
      
              var self = this,
                  options = this._options;
      
      
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.5.js - About 1 day to fix

        Function _init has 330 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _init: function() {
        
                var self = this,
                    options = this._options;
        
        
        Severity: Major
        Found in assets/js/galleria/galleria-1.3.3.js - About 1 day to fix

          Function xoops_module_update_extgallery has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring.
          Open

          function xoops_module_update_extgallery(\XoopsModule $module, $previousVersion = null)
          {
              global $xoopsDB;
          
              $moduleDirName      = \basename(\dirname(__DIR__));
          Severity: Minor
          Found in include/onupdate.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 PclTarMerge has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring.
          Open

              function PclTarMerge($p_tarname, $p_tarname_add, $p_mode = '', $p_mode_add = '')
              {
                  TrFctStart(__FILE__, __LINE__, 'PclTarMerge', "tar='$p_tarname', tar_add='$p_tarname_add', mode='$p_mode', mode_add='$p_mode_add'");
                  $v_result = 1;
          
          
          Severity: Minor
          Found in class/pcltar.lib.php - About 1 day to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          File extgallery_blocks.php has 690 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          /**
           * ExtGallery Block settings
           * Manage all Blocks
           *
          Severity: Major
          Found in blocks/extgallery_blocks.php - About 1 day to fix

            File PhotoHandler.php has 659 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            
            namespace XoopsModules\Extgallery;
            
            /**
            Severity: Major
            Found in class/PhotoHandler.php - About 1 day to fix

              File class.parsedown.inc.php has 658 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              
              #
              #
              # Parsedown

                File jquery.galleriffic.js has 653 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /**
                 * jQuery Galleriffic plugin
                 *
                 * Copyright (c) 2008 Trent Foley (http://trentacular.com)
                 * Licensed under the MIT License:
                Severity: Major
                Found in assets/js/galleriffic/jquery.galleriffic.js - About 1 day to fix

                  Function PclTarHandleExtractFile has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function PclTarHandleExtractFile($p_tar, &$v_header, $p_path, $p_remove_path, $p_tar_mode)
                      {
                          TrFctStart(__FILE__, __LINE__, 'PclTarHandleExtractFile', "archive_descr='$p_tar', path=$p_path, remove_path='$p_remove_path', tar_mode=$p_tar_mode");
                          $v_result = 1;
                  
                  
                  Severity: Minor
                  Found in class/pcltar.lib.php - About 1 day to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  File PEAR.php has 607 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  /**
                   * PEAR, the PHP Extension and Application Repository
                   *
                   * PEAR class and PEAR_Error class
                  Severity: Major
                  Found in class/pear/PEAR.php - About 1 day to fix

                    Function tosrus has 261 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        $.fn.TosRUs = $.fn.tosrus = function( oDefault, oDesktop, oTouch )
                        {
                    
                            if ( this.length == 0 )
                            {
                    Severity: Major
                    Found in assets/js/TosRUs/src/js/jquery.tosrus.js - About 1 day to fix

                      File Transform.php has 554 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      
                      /* vim: set expandtab tabstop=4 shiftwidth=4: */
                      
                      /**
                      Severity: Major
                      Found in class/pear/Image/Transform.php - About 1 day to fix

                        Method PclTarHandleExtract has 232 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function PclTarHandleExtract(
                                $p_tarname,
                                $p_file_list,
                                &$p_list_detail,
                                $p_mode,
                        Severity: Major
                        Found in class/pcltar.lib.php - About 1 day to fix

                          Image_Transform has 63 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                          class Image_Transform
                          {
                              /**
                               * Name of the image file
                               * @var string
                          Severity: Major
                          Found in class/pear/Image/Transform.php - About 1 day to fix

                            Method listBlocks has 213 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function listBlocks()
                                {
                                    global $xoopsModule, $pathIcon16;
                                    require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
                                    $moduleDirName      = \basename(\dirname(__DIR__));
                            Severity: Major
                            Found in admin/blocksadmin.php - About 1 day to fix

                              Function Utils has 212 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  Utils = (function() {
                              
                                      return {
                              
                                          array : function( obj ) {
                              Severity: Major
                              Found in assets/js/galleria/galleria-1.1.js - About 1 day to fix
                                Severity
                                Category
                                Status
                                Source
                                Language