mambax7/extgallery

View on GitHub

Showing 701 of 9,653 total issues

Method TrDisplay has 72 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function TrDisplay()
    {
        global $g_pcl_trace_level;
        global $g_pcl_trace_mode;
        global $g_pcl_trace_filename;
Severity: Major
Found in class/pcltrace.lib.php - About 2 hrs to fix

    Function load has 71 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        load : function( source, selector, config ) {
    
            var self = this,
                o = this._options;
    
    
    Severity: Major
    Found in assets/js/galleria/galleria-1.3.3.js - About 2 hrs to fix

      Function load has 71 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          load : function( source, selector, config ) {
      
              var self = this,
                  o = this._options;
      
      
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.5.js - About 2 hrs to fix

        Method build_settings_rows has 71 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function build_settings_rows($aFields)
            {
                // order the fields by priority
                uasort($aFields, [$this, 'compare_elems']);
        
        
        Severity: Major
        Found in assets/js/ml-slider/ml-slider.php - About 2 hrs to fix

          Method PclTarHandleAddList has 70 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function PclTarHandleAddList($p_tar, $p_list, $p_mode, &$p_list_detail, $p_add_dir, $p_remove_dir)
              {
                  TrFctStart(__FILE__, __LINE__, 'PclTarHandleAddList', "tar='$p_tar', list, mode='$p_mode', add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
                  $v_result = 1;
                  $v_header = [];
          Severity: Major
          Found in class/pcltar.lib.php - About 2 hrs to fix

            Function isBlockCloned has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
            Open

                function isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options)
                {
                    xoops_loadLanguage('admin', 'system');
                    xoops_loadLanguage('admin/blocksadmin', 'system');
                    xoops_loadLanguage('admin/groups', 'system');
            Severity: Minor
            Found in admin/blocksadmin.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 xoops_module_install_extgallery has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
            Open

            function xoops_module_install_extgallery(\XoopsModule $module)
            {
                $module_id = $module->getVar('mid');
                /** @var \XoopsGroupPermHandler $grouppermHandler */
                $grouppermHandler = xoops_getHandler('groupperm');
            Severity: Minor
            Found in include/install_function.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 PclTarHandleExtractByIndexList has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
            Open

                function PclTarHandleExtractByIndexList(
                    $p_tarname,
                    $p_index_string,
                    &$p_list_detail,
                    $p_path,
            Severity: Minor
            Found in class/pcltar.lib.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 convertResultSet has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
            Open

                public function convertResultSet($result, $id_as_key = false, $as_object = true)
                {
                    $trace = \debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 1);
                    \trigger_error(__CLASS__ . '::' . __FUNCTION__ . '() is deprecated.' . ". Called from {$trace[0]['file']}line {$trace[0]['line']}", \E_USER_WARNING);
                    $ret = [];
            Severity: Minor
            Found in class/ModelReadIterator.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 launch has 68 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function launch(target) {
                    if (!closing) {
            
                        element = target;
            
            
            Severity: Major
            Found in assets/js/ml-slider/assets/colorbox/jquery.colorbox-min.js - About 2 hrs to fix

              Function initGallery has 68 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      initGallery: function() {
              
                          var gSt = mfp.st.gallery,
                              ns = '.mfp-gallery',
                              supportsFastClick = Boolean($.fn.mfpFastClick);
              Severity: Major
              Found in assets/js/magnific_popup/jquery.magnific-popup.js - About 2 hrs to fix

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

                (function($) {
                    $.fn.microgallery = function(options) {
                        var opts = $.extend({}, $.fn.microgallery.defaults, options);
                        return this.each(function() {
                            var $this = $(this);
                Severity: Minor
                Found in assets/js/microgallery/jquery.microgallery.js - About 2 hrs to fix

                  Function _parseData has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _parseData : function( callback ) {
                  
                          var self = this,
                              current,
                              ready = false,
                  Severity: Major
                  Found in assets/js/galleria/galleria-1.3.5.js - About 2 hrs to fix

                    Function loadCSS has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                loadCSS : function( href, id, callback ) {
                    
                                    var link,
                                        ready = false,
                                        length;
                    Severity: Major
                    Found in assets/js/galleria/galleria-1.1.js - About 2 hrs to fix

                      Function _parseData has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          _parseData : function( callback ) {
                      
                              var self = this,
                                  current,
                                  ready = false,
                      Severity: Major
                      Found in assets/js/galleria/galleria-1.3.3.js - About 2 hrs to fix

                        MetaSlider has 24 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class MetaSlider
                        {
                            public $id         = 0; // slider ID
                            public $identifier = 0; // unique identifier
                            public $slides     = []; //slides belonging to this slider
                        Severity: Minor
                        Found in assets/js/ml-slider/inc/slider/metaslider.class.php - About 2 hrs to fix

                          Method PclTarHandleReadHeader has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function PclTarHandleReadHeader($v_binary_data, &$v_header)
                              {
                                  TrFctStart(__FILE__, __LINE__, 'PclTarHandleReadHeader', '');
                                  $v_result = 1;
                          
                          
                          Severity: Major
                          Found in class/pcltar.lib.php - About 2 hrs to fix

                            Function render has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function render()
                                {
                                    // load all child ids for javascript codes
                                    foreach (\array_keys($this->_itemTree) as $item_id) {
                                        $this->_itemTree[$item_id]['allchild'] = [];
                            Severity: Minor
                            Found in class/GroupPermForm.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

                            File PhpCaptcha.php has 274 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            <?php
                            
                            namespace XoopsModules\Extgallery;
                            
                            /***************************************************************/
                            Severity: Minor
                            Found in class/PhpCaptcha.php - About 2 hrs to fix

                              Function addPan has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  addPan : function( img ) {
                              
                                      if ( this._options.imageCrop === false ) {
                                          return;
                                      }
                              Severity: Major
                              Found in assets/js/galleria/galleria-1.3.3.js - About 2 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language