mambax7/extgallery

View on GitHub

Showing 701 of 9,653 total issues

Function enter has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        enter: function( callback ) {

            fullscreen.beforeEnter(function() {

                callback = fullscreen.parseCallback( callback, true );
Severity: Minor
Found in assets/js/galleria/galleria-1.3.3.js - About 1 hr to fix

    Function enter has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            enter: function(callback) {
    
                // hide the image until rescale is complete
                Utils.hide( self.getActiveImage() );
    
    
    Severity: Minor
    Found in assets/js/galleria/galleria-1.1.js - About 1 hr to fix

      Function enter has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              enter: function( callback ) {
      
                  fullscreen.beforeEnter(function() {
      
                      callback = fullscreen.parseCallback( callback, true );
      Severity: Minor
      Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

        Function complete has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                var complete = function() {
        
                    // remove stalled
                    self._queue.stalled = false;
        
        
        Severity: Minor
        Found in assets/js/galleria/galleria-1.1.js - About 1 hr to fix

          Function _initSlidesFromAnchors has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function _initSlidesFromAnchors( $tos, $anchors, $wrpr, $sldr, opts )
              {
                  getZoomAnchors( $anchors, opts ).addClass( cls( 'zoom' ) );
          
                  $anchors
          Severity: Minor
          Found in assets/js/TosRUs/src/js/jquery.tosrus.js - About 1 hr to fix

            Function _close has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                _close: function() {
                    _mfpTrigger(CLOSE_EVENT);
            
                    var classesToRemove = REMOVING_CLASS + ' ' + READY_CLASS + ' ';
            
            
            Severity: Minor
            Found in assets/js/magnific_popup/jquery.magnific-popup.js - About 1 hr to fix

              Function attach has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      attach: function (context, settings) {
                          settings.magnific_popup = settings.magnific_popup || {common_options: {}, common_options_iframe: {}};
                          var common_options = settings.magnific_popup.common_options || {};
                          var common_options_iframe = settings.magnific_popup.common_options_iframe || {};
                          // Allow modules to extend the set of patterns we support via iframe.

                Function rebuildThumbs has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                            rebuildThumbs: function() {
                                var needsPagination = this.data.length > this.numThumbs;
                
                                // Rebuild top pager
                                if (this.enableTopPager) {
                Severity: Minor
                Found in assets/js/galleriffic/jquery.galleriffic.js - About 1 hr to fix

                  Method _convert_image_type has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function _convert_image_type($type)
                      {
                          switch (mb_strtolower($type)) {
                              case 'gif':
                                  return IMAGETYPE_GIF;
                  Severity: Minor
                  Found in class/pear/Image/Transform.php - About 1 hr to fix

                    Method PclTarHandleCreate has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function PclTarHandleCreate($p_tarname, $p_list, $p_mode, $p_add_dir = '', $p_remove_dir = '')
                        {
                            TrFctStart(__FILE__, __LINE__, 'PclTarHandleCreate', "tar=$p_tarname, list, mode=$p_mode, add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
                            $v_result      = 1;
                            $v_list_detail = [];
                    Severity: Minor
                    Found in class/pcltar.lib.php - About 1 hr to fix

                      Method __construct has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function __construct()
                          {
                              parent::__construct();
                              $this->initVar('photo_id', \XOBJ_DTYPE_INT, null, false);
                              $this->initVar('cat_id', \XOBJ_DTYPE_INT, 0, false);
                      Severity: Minor
                      Found in class/Photo.php - About 1 hr to fix

                        Method TrFctEnd has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function TrFctEnd($p_file, $p_line, $p_return = 1, $p_message = '')
                            {
                                global $g_pcl_trace_level;
                                global $g_pcl_trace_mode;
                                global $g_pcl_trace_filename;
                        Severity: Minor
                        Found in class/pcltrace.lib.php - About 1 hr to fix

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

                              private function get_javascript_parameters()
                              {
                                  $options = [];
                          
                                  // construct an array of all parameters
                          Severity: Minor
                          Found in assets/js/ml-slider/inc/slider/metaslider.class.php - About 1 hr to fix

                          Cognitive Complexity

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

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

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

                          Further reading

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

                          function moduleLastVersionInfo()
                          {
                              static $result;
                          
                              if (isset($result)) {
                          Severity: Minor
                          Found in admin/moduleUpdateFunction.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 gal_getmoduleoption has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function gal_getmoduleoption($option)
                          {
                              global $xoopsModuleConfig, $xoopsModule;
                              static $tbloptions = [];
                              if (is_array($tbloptions) && array_key_exists($option, $tbloptions)) {
                          Severity: Minor
                          Found in include/functions0.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 _generate has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function _generate($filename, $type = '', $quality = null)
                              {
                                  $type    = mb_strtolower(('' == $type) ? $this->type : $type);
                                  $options = is_array($quality) ? $quality : [];
                                  switch ($type) {
                          Severity: Minor
                          Found in class/pear/Image/Transform/Driver/GD.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 mktemp has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public static function mktemp($args = null)
                              {
                                  static $first_time = true;
                                  $opts = self::_parseArgs($args, 't:d');
                                  if (PEAR::isError($opts)) {
                          Severity: Minor
                          Found in class/pear/System.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 createCat has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function createCat($data)
                              {
                                  /** @var Extgallery\PublicCategory $cat */
                                  $cat = $this->create();
                                  $cat->setVars($data);
                          Severity: Minor
                          Found in class/PublicCategoryHandler.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 rebuild has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function rebuild()
                              {
                                  $data = $this->getTreeWithChildren();
                          
                                  $n     = 0; // need a variable to hold the running n tally
                          Severity: Minor
                          Found in class/CategoryHandler.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 Create has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function Create($sFilename = '')
                              {
                                  // check for required gd functions
                                  if (!\function_exists('imagecreate') || !\function_exists("image$this->sFileType")
                                      || ('' != $this->vBackgroundImages && !\function_exists('imagecreatetruecolor'))) {
                          Severity: Minor
                          Found in class/PhpCaptcha.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

                          Severity
                          Category
                          Status
                          Source
                          Language