mambax7/extgallery

View on GitHub

Showing 9,653 of 9,653 total issues

Method getDescendants has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getDescendants($id = 0, $includeSelf = false, $childrenOnly = false)
    {
        $idField = $this->fields['id'];

        $node = $this->getNode($id);
Severity: Minor
Found in class/NestedTree.php - About 1 hr to fix

    Method TrFctStart has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function TrFctStart($p_file, $p_line, $p_name, $p_param = '', $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

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

              if ( swipe ) {
      
                  var data = this.getData(index),
                      self = this;
                  if ( !data ) {
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.3.js and 1 other location - About 1 hr to fix
      assets/js/galleria/galleria-1.3.5.js on lines 4806..4875

      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 62.

      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 ( swipe ) {
      
                  var data = this.getData(index),
                      self = this;
                  if ( !data ) {
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
      assets/js/galleria/galleria-1.3.3.js on lines 4768..4840

      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 62.

      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 ( !swipe &&
                  ( this._queue.length > 3 || index === false || ( !this._options.queue && this._queue.stalled ) ) ) {
                  return;
              }
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
      assets/js/galleria/galleria-1.3.3.js on lines 4744..4747

      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 62.

      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 ( !swipe &&
                  ( this._queue.length > 3 || index === false || ( !this._options.queue && this._queue.stalled ) ) ) {
                  return;
              }
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.3.js and 1 other location - About 1 hr to fix
      assets/js/galleria/galleria-1.3.5.js on lines 4782..4785

      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 62.

      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

      Avoid using short method names like System::rm(). The configured minimum method name length is 3.
      Open

          public static function rm($args)
          {
              $opts = self::_parseArgs($args, 'rf'); // "f" does nothing but I like it :-)
              if (PEAR::isError($opts)) {
                  return self::raiseError($opts);
      Severity: Minor
      Found in class/pear/System.php by phpmd

      ShortMethodName

      Since: 0.2

      Detects when very short method names are used.

      Example

      class ShortMethod {
          public function a( $index ) { // Violation
          }
      }

      Source https://phpmd.org/rules/naming.html#shortmethodname

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

                          complete: function( thumb ) {
      
                              // shrink thumbnails to fit
                              var top = ['left', 'top'],
                                  arr = ['Width', 'Height'],
      Severity: Minor
      Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

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

                            complete: function( thumb ) {
        
                                // shrink thumbnails to fit
                                var top = ['left', 'top'],
                                    arr = ['Width', 'Height'],
        Severity: Minor
        Found in assets/js/galleria/galleria-1.3.3.js - About 1 hr to fix

          Function loop has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  loop: function() {
          
                      var distance = this.to - this.pos,
                          factor = 1;
          
          
          Severity: Minor
          Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

            Function buildImage has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                        buildImage: function(imageData, isSync) {
                            var gallery = this;
                            var nextIndex = this.getNextIndex(imageData.index);
            
                            // Construct new hidden span for the image
            Severity: Minor
            Found in assets/js/galleriffic/jquery.galleriffic.js - About 1 hr to fix

              Function _finish has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      _finish = function () {
                          if (!$.support.opacity) {
                              content.get(0).style.removeAttribute('filter');
                              wrap.get(0).style.removeAttribute('filter');
                          }
              Severity: Minor
              Found in assets/js/fancybox/fancybox.js - About 1 hr to fix

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

                            if ( IFRAME && fullscreen.iframe ) {
                                fullscreen.iframe.scrolled = $( window.parent ).scrollTop();
                                window.parent.scrollTo(0, 0);
                            }
                Severity: Major
                Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                assets/js/galleria/galleria-1.3.3.js on lines 1728..1731

                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 61.

                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 ( IFRAME && fullscreen.iframe ) {
                                fullscreen.iframe.scrolled = $( window.parent ).scrollTop();
                                window.parent.scrollTo(0, 0);
                            }
                Severity: Major
                Found in assets/js/galleria/galleria-1.3.3.js and 1 other location - About 1 hr to fix
                assets/js/galleria/galleria-1.3.5.js on lines 1728..1731

                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 61.

                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

                            to.top = parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - to.height - 40) * 0.5)), 10);
                Severity: Major
                Found in assets/js/fancybox/fancybox.js and 1 other location - About 1 hr to fix
                assets/js/fancybox/fancybox.js on lines 722..722

                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 61.

                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

                            to.left = parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - to.width - 40) * 0.5)), 10);
                Severity: Major
                Found in assets/js/fancybox/fancybox.js and 1 other location - About 1 hr to fix
                assets/js/fancybox/fancybox.js on lines 721..721

                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 61.

                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

                Function rescale has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    rescale : function( width, height, complete ) {
                
                        var self = this;
                
                        // allow rescale(fn)
                Severity: Minor
                Found in assets/js/galleria/galleria-1.3.3.js - About 1 hr to fix

                  Function bind has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          bind: function( elem, value ) {
                  
                              if (! tooltip.initialized ) {
                                  tooltip.init();
                              }
                  Severity: Minor
                  Found in assets/js/galleria/galleria-1.1.js - About 1 hr to fix

                    Function _parseMarkup has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _parseMarkup: function(template, values, item) {
                            var arr;
                            if(item.data) {
                                values = $.extend(item.data, values);
                            }
                    Severity: Minor
                    Found in assets/js/magnific_popup/jquery.magnific-popup.js - About 1 hr to fix

                      Method convertResultSet has 32 lines of code (exceeds 25 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 1 hr to fix
                        Severity
                        Category
                        Status
                        Source
                        Language