XoopsModules25x/xoopsinfo

View on GitHub
phpsysinfo/js/jQuery/jquery.nyroModal.js

Summary

Maintainability
F
1 wk
Test Coverage

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

/*
 * nyroModal - jQuery Plugin
 * http://nyromodal.nyrodev.com
 *
 * Copyright (c) 2010 Cedric Nirousset (nyrodev.com)
Severity: Major
Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 3 days to fix

    Function processModal has 186 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function processModal(settings) {
            if (modal.loadingShown || modal.transition || modal.anim)
                return;
            debug('processModal');
            modal.started = true;
    Severity: Major
    Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 7 hrs to fix

      Function calculateSize has 138 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function calculateSize(resizing) {
              debug('calculateSize');
      
              modal.wrapper = modal.contentWrapper.children('div:first');
      
      
      Severity: Major
      Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 5 hrs to fix

        Function initModal has 121 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function initModal() {
                debug('initModal');
                if (!modal.full) {
                    if (currentSettings.debug)
                        setCurrentSettings({color: 'white'}, 'cssOpt', 'bg');
        Severity: Major
        Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 4 hrs to fix

          Function wrapContent has 60 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function wrapContent() {
                  debug('wrapContent');
          
                  var wrap = $(currentSettings.wrap[currentSettings.type]);
                  modal.content.append(wrap.children().remove());
          Severity: Major
          Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 2 hrs to fix

            Function fileType has 53 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function fileType() {
                    var from = currentSettings.from;
            
                    var url;
            
            
            Severity: Major
            Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 2 hrs to fix

              Function removeModal has 40 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function removeModal(e) {
                      debug('removeModal');
                      if (e)
                          e.preventDefault();
                      if (modal.full && modal.ready) {
              Severity: Minor
              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 1 hr to fix

                Function showContentOrLoading has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function showContentOrLoading() {
                        debug('showContentOrLoading');
                        if (modal.ready && !modal.anim) {
                            if (modal.dataReady) {
                                if (modal.tmp.html()) {
                Severity: Minor
                Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 1 hr to fix

                  Function nyroModal has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      $.fn.nyroModal = function(settings) {
                          if (!this)
                              return false;
                          return this.each(function() {
                              var me = $(this);
                  Severity: Minor
                  Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 1 hr to fix

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

                        function setCurrentSettings(settings, deep1, deep2) {
                            if (modal.started) {
                                if (deep1 && deep2) {
                                    $.extend(true, currentSettings[deep1][deep2], settings);
                                } else if (deep1) {
                    Severity: Minor
                    Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 1 hr to fix

                      Consider simplifying this complex logical expression.
                      Open

                                  if (!modal.error && (settings.windowResizing || (!modal.resizing && (('width' in settings && settings.width == currentSettings.width) || ('height' in settings && settings.height == currentSettings.height))))) {
                                      modal.resizing = true;
                                      if (modal.contentWrapper)
                                          calculateSize(true);
                                      if (modal.contentWrapper && modal.contentWrapper.is(':visible') && !modal.animContent) {
                      Severity: Major
                      Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 1 hr to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if (!modal.resizing) {
                                                    settings.setHeight = settings.height;
                                                    shouldResize = true;
                                                }
                        Severity: Major
                        Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  if (modal.loadingShown || modal.transition)
                                                      showContentOrLoading();
                          Severity: Major
                          Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                        } else if (currentSettings.type == 'iframeForm') {
                                            initModal();
                                            modal.tmp.html('<iframe frameborder="0" hspace="0" src="javascript:\'\';" name="nyroModalIframe" id="nyroModalIframe"></iframe>');
                                            debug('Iframe Form Load: '+url);
                                            $('iframe', modal.tmp).eq(0)
                            Severity: Major
                            Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      if (!modal.resizing) {
                                                          settings.setWidth = settings.width;
                                                          shouldResize = true;
                                                      }
                              Severity: Major
                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 45 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                                return null;
                                Severity: Major
                                Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                              return imgType;
                                  Severity: Major
                                  Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                                    return 'iframe';
                                    Severity: Major
                                    Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                                  return tmp.selector;
                                      Severity: Major
                                      Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                                        return 'iframe';
                                        Severity: Major
                                        Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 30 mins to fix

                                          Avoid too many return statements within this function.
                                          Open

                                                          return 'swf';
                                          Severity: Major
                                          Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 30 mins to fix

                                            Avoid too many return statements within this function.
                                            Open

                                                            return 'form';
                                            Severity: Major
                                            Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 30 mins to fix

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

                                                          } else if (currentSettings.type == 'iframeForm') {
                                                              initModal();
                                                              modal.tmp.html('<iframe frameborder="0" hspace="0" src="javascript:\'\';" name="nyroModalIframe" id="nyroModalIframe"></iframe>');
                                                              debug('Iframe Form Load: '+url);
                                                              $('iframe', modal.tmp).eq(0)
                                              Severity: Major
                                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js and 1 other location - About 3 hrs to fix
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 458..519

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

                                              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

                                                          } else if (currentSettings.type == 'iframe') {
                                                              initModal();
                                                              modal.tmp.html('<iframe frameborder="0" hspace="0" src="javascript:\'\';" name="nyroModalIframe" id="nyroModalIframe"></iframe>');
                                                              debug('Iframe Load: '+url);
                                                              $('iframe', modal.tmp).eq(0)
                                              Severity: Major
                                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js and 1 other location - About 3 hrs to fix
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 446..519

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

                                              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

                                                                                  .css($.extend({}, {
                                                                                          position: next.css('position'),
                                                                                          top: next.css('top'),
                                                                                          left: next.css('left'),
                                                                                          width: next.width(),
                                              Severity: Major
                                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js and 1 other location - About 2 hrs to fix
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1019..1027

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

                                              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

                                                                  prev.before($('<iframe id="nyroModalIframeHideIeGalleryPrev" src="javascript:\'\';"></iframe>').css({
                                                                                          position: prev.css('position'),
                                                                                          top: prev.css('top'),
                                                                                          left: prev.css('left'),
                                                                                          width: prev.width(),
                                              Severity: Major
                                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js and 1 other location - About 2 hrs to fix
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1043..1051

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

                                              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

                                                              var next = $('.nyroModalNext', modal.contentWrapper)
                                                                  .attr('href', linkNext.attr('href'))
                                                                  .click(function(e) {
                                                                      e.preventDefault();
                                                                      $.nyroModalNext();
                                              Severity: Major
                                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js and 1 other location - About 1 hr to fix
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1011..1017

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

                                              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

                                                              var prev = $('.nyroModalPrev', modal.contentWrapper)
                                                                  .attr('href', linkPrev.attr('href'))
                                                                  .click(function(e) {
                                                                      e.preventDefault();
                                                                      $.nyroModalPrev();
                                              Severity: Major
                                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js and 1 other location - About 1 hr to fix
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1034..1040

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

                                              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

                                                          var maxHeight = modal.blockerVars? modal.blockerVars.height : $(window).height()
                                                                              - outerWrapper.h.border
                                                                              - (tmp.wrapper.height - currentSettings.height);
                                              Severity: Major
                                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js and 1 other location - About 1 hr to fix
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1157..1159

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

                                              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

                                                          var maxWidth = modal.blockerVars? modal.blockerVars.width : $(window).width()
                                                                              - outerWrapper.w.border
                                                                              - (tmp.wrapper.width - currentSettings.width);
                                              Severity: Major
                                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js and 1 other location - About 1 hr to fix
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1154..1156

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

                                              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

                                                          w: {
                                                              margin: getCurCSS(elm, 'marginLeft') + getCurCSS(elm, 'marginRight'),
                                                              border: getCurCSS(elm, 'borderLeftWidth') + getCurCSS(elm, 'borderRightWidth'),
                                                              padding: getCurCSS(elm, 'paddingLeft') + getCurCSS(elm, 'paddingRight')
                                                          }
                                              Severity: Major
                                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js and 1 other location - About 1 hr to fix
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1523..1527

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

                                              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

                                                          h: {
                                                              margin: getCurCSS(elm, 'marginTop') + getCurCSS(elm, 'marginBottom'),
                                                              border: getCurCSS(elm, 'borderTopWidth') + getCurCSS(elm, 'borderBottomWidth'),
                                                              padding: getCurCSS(elm, 'paddingTop') + getCurCSS(elm, 'paddingBottom')
                                                          },
                                              Severity: Major
                                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js and 1 other location - About 1 hr to fix
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1528..1532

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

                                              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 (currentSettings.height) {
                                                              tmp.height = currentSettings.height;
                                                          } else if (currentSettings.type == 'iframe') {
                                                              tmp.height = currentSettings.minHeight;
                                                          }
                                              Severity: Major
                                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js and 1 other location - About 1 hr to fix
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1103..1107

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

                                              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 (currentSettings.width) {
                                                              tmp.width = currentSettings.width;
                                                          } else if (currentSettings.type == 'iframe') {
                                                              tmp.width = currentSettings.minWidth;
                                                          }
                                              Severity: Major
                                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js and 1 other location - About 1 hr to fix
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1109..1113

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

                                              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 ('width' in settings) {
                                                                      if (!modal.resizing) {
                                                                          settings.setWidth = settings.width;
                                                                          shouldResize = true;
                                                                      }
                                              Severity: Major
                                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js and 1 other location - About 1 hr to fix
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 561..567

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

                                              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 ('height' in settings) {
                                                                      if (!modal.resizing) {
                                                                          settings.setHeight = settings.height;
                                                                          shouldResize = true;
                                                                      }
                                              Severity: Major
                                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js and 1 other location - About 1 hr to fix
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 554..560

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

                                              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 4 locations. Consider refactoring.
                                              Open

                                                          .animate({
                                                              width: settings.width+'px',
                                                              height: settings.height+'px',
                                                              marginTop: settings.marginTop+'px',
                                                              marginLeft: settings.marginLeft+'px'
                                              Severity: Major
                                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js and 3 other locations - About 55 mins to fix
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1603..1608
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1657..1662
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1673..1678

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

                                              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 4 locations. Consider refactoring.
                                              Open

                                                          .animate({
                                                              width: settings.width+'px',
                                                              height: settings.height+'px',
                                                              marginLeft: settings.marginLeft+'px',
                                                              marginTop: settings.marginTop+'px'
                                              Severity: Major
                                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js and 3 other locations - About 55 mins to fix
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1596..1601
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1603..1608
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1673..1678

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

                                              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 4 locations. Consider refactoring.
                                              Open

                                                                  .css({
                                                                      width: settings.width+'px',
                                                                      height: settings.height+'px',
                                                                      marginTop: settings.marginTop+'px',
                                                                      marginLeft: settings.marginLeft+'px'
                                              Severity: Major
                                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js and 3 other locations - About 55 mins to fix
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1596..1601
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1657..1662
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1673..1678

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

                                              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 4 locations. Consider refactoring.
                                              Open

                                                          .animate({
                                                              width: settings.width+'px',
                                                              height: settings.height+'px',
                                                              marginLeft: settings.marginLeft+'px',
                                                              marginTop: settings.marginTop+'px'
                                              Severity: Major
                                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js and 3 other locations - About 55 mins to fix
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1596..1601
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1603..1608
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1657..1662

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

                                              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

                                                      currentSettings.marginTopLoading = -(modal.loading.height() + outer.h.border + outer.h.padding)/2;
                                              Severity: Minor
                                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js and 1 other location - About 50 mins to fix
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 614..614

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

                                              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

                                                      currentSettings.marginLeftLoading = -(modal.loading.width() + outer.w.border + outer.w.padding)/2;
                                              Severity: Minor
                                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js and 1 other location - About 50 mins to fix
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 613..613

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

                                              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 (!currentSettings.height) {
                                                              currentSettings.height = modal.content.outerHeight(true);
                                                              resized.height = true;
                                                          }
                                              Severity: Minor
                                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js and 1 other location - About 35 mins to fix
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1116..1119

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

                                              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 (!currentSettings.width) {
                                                              currentSettings.width = modal.content.outerWidth(true);
                                                              resized.width = true;
                                                          }
                                              Severity: Minor
                                              Found in phpsysinfo/js/jQuery/jquery.nyroModal.js and 1 other location - About 35 mins to fix
                                              phpsysinfo/js/jQuery/jquery.nyroModal.js on lines 1120..1123

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

                                              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

                                              There are no issues that match your filters.

                                              Category
                                              Status