mambax7/extgallery

View on GitHub

Showing 9,653 of 9,653 total issues

Method PclTarExtractIndex has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function PclTarExtractIndex($p_tarname, $p_index, $p_path = './', $p_remove_path = '', $p_mode = '')
    {
        TrFctStart(__FILE__, __LINE__, 'PclTarExtractIndex', "tar=$p_tarname, index='$p_index', path=$p_path, remove_path='$p_remove_path', mode='$p_mode'");
        $v_result = 1;

Severity: Minor
Found in class/pcltar.lib.php - About 1 hr to fix

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

                    var big    = new Galleria.Picture(),
                        cached = big.isCached( data.big ),
                        index  = self.getIndex(),
                        thumb  = self._thumbnails[ index ];
    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 1803..1806

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

    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

                    var big    = new Galleria.Picture(),
                        cached = big.isCached( data.big ),
                        index  = self.getIndex(),
                        thumb  = self._thumbnails[ index ];
    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 1803..1806

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

    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

        easeOutQuart: function (x, t, b, c, d) {
            return -c * ((t=t/d-1)*t*t*t - 1) + b;
        },
    Severity: Major
    Found in assets/js/galleryview/easing.js and 1 other location - About 1 hr to fix
    assets/js/galleria/galleria-1.1.js on lines 3713..3715

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

    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

      galleriaOut: function (_, t, b, c, d) {
        return -c * ((t=t/d-1)*t*t*t - 1) + b;
      }
    Severity: Major
    Found in assets/js/galleria/galleria-1.1.js and 1 other location - About 1 hr to fix
    assets/js/galleryview/easing.js on lines 71..73

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

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

                wait : function(options) {
    
                    Galleria._waiters = Galleria._waiters || [];
    
                    options = $.extend({
    Severity: Minor
    Found in assets/js/galleria/galleria-1.3.3.js - About 1 hr to fix

      Function flash has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                      flash: function(params, complete) {
                          $(params.next).css({
                              opacity: 0,
                              left: 0
                          });
      Severity: Minor
      Found in assets/js/galleria/galleria-1.3.3.js - About 1 hr to fix

        Function wait has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    wait : function(options) {
        
                        Galleria._waiters = Galleria._waiters || [];
        
                        options = $.extend({
        Severity: Minor
        Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

          Function flash has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                          flash: function(params, complete) {
                              $(params.next).css({
                                  opacity: 0,
                                  left: 0
                              });
          Severity: Minor
          Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

            Function hide has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                        hide : function( elem, speed, callback ) {
            
                            callback = callback || F;
            
                            var $elem = $(elem);
            Severity: Minor
            Found in assets/js/galleria/galleria-1.3.3.js - About 1 hr to fix

              Function scale has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      var scale = function() {
              
                          // set stagewidth
                          self._stageWidth = width || self.$( 'stage' ).width();
                          self._stageHeight = height || self.$( 'stage' ).height();
              Severity: Minor
              Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

                Function _playCheck has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _playCheck : function() {
                        var self = this,
                            played = 0,
                            interval = 20,
                            now = Utils.timestamp(),
                Severity: Minor
                Found in assets/js/galleria/galleria-1.3.3.js - About 1 hr to fix

                  Function _playCheck has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _playCheck : function() {
                          var self = this,
                              played = 0,
                              interval = 20,
                              now = Utils.timestamp(),
                  Severity: Minor
                  Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

                    Function hide has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                hide : function( elem, speed, callback ) {
                    
                                    callback = callback || F;
                    
                                    var $elem = $(elem);
                    Severity: Minor
                    Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

                      Function fancybox has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          $.fn.fancybox = function(options) {
                              if (!$(this).length) {
                                  return this;
                              }
                      
                      
                      Severity: Minor
                      Found in assets/js/fancybox/fancybox.js - About 1 hr to fix

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

                            public function parse($text)
                            {
                                # removes \r characters
                                $text = str_replace("\r\n", "\n", $text);
                                $text = str_replace("\r", "\n", $text);

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

                          function xoops_module_install_extgallery(\XoopsModule $module)
                          {
                              require_once \dirname(__DIR__) . '/preloads/autoloader.php';
                          
                              $moduleDirName = \basename(\dirname(__DIR__));
                          Severity: Minor
                          Found in include/oninstall.php - About 1 hr to fix

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

                                function PclTarAddList($p_tarname, $p_filelist, $p_add_dir = '', $p_remove_dir = '', $p_mode = '')
                                {
                                    TrFctStart(__FILE__, __LINE__, 'PclTarAddList', "tar=$p_tarname, file=$p_filelist, p_add_dir='$p_add_dir', p_remove_dir='$p_remove_dir', mode=$p_mode");
                                    $v_result      = 1;
                                    $p_list_detail = [];
                            Severity: Minor
                            Found in class/pcltar.lib.php - About 1 hr to fix

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

                              function extgallery_tag_synchronization($mid)
                              {
                                  global $XoopsDB;
                                  /** @var Extgallery\PublicPhotoHandler $itemHandler */
                                  $itemHandler = Extgallery\Helper::getInstance()->getHandler('PublicPhoto');
                              Severity: Minor
                              Found in class/plugins/plugin.tag.php - About 1 hr to fix

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

                                    public static function getModuleOption($option)
                                    {
                                        global $xoopsModule;
                                        /** @var \XoopsModules\Extgallery\Helper $helper */
                                        $helper = \XoopsModules\Extgallery\Helper::getInstance();
                                Severity: Minor
                                Found in class/Utility.php - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language