arastta/arastta

View on GitHub
admin/view/javascript/summernote/summernote.js

Summary

Maintainability
F
1 mo
Test Coverage

File summernote.js has 4412 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Super simple wysiwyg editor on Bootstrap v0.6.16
 * http://summernote.org/
 *
 * summernote.js
Severity: Major
Found in admin/view/javascript/summernote/summernote.js - About 1 wk to fix

    Function Renderer has 768 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      var Renderer = function () {
    
        /**
         * bootstrap button template
         * @private
    Severity: Major
    Found in admin/view/javascript/summernote/summernote.js - About 3 days to fix

      Function dom has 604 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        var dom = (function () {
          /**
           * @method isEditable
           *
           * returns whether node is `note-editable` or not.
      Severity: Major
      Found in admin/view/javascript/summernote/summernote.js - About 3 days to fix

        Function range has 464 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          var range = (function () {
        
            /**
             * return boundaryPoint from TextRange, inspired by Andy Na's HuskyRange.js
             *
        Severity: Major
        Found in admin/view/javascript/summernote/summernote.js - About 2 days to fix

          Function Editor has 380 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            var Editor = function (handler) {
          
              var self = this;
              var style = new Style();
              var table = new Table();
          Severity: Major
          Found in admin/view/javascript/summernote/summernote.js - About 1 day to fix

            Function EventHandler has 332 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              var EventHandler = function () {
                var self = this;
            
                /**
                 * Modules
            Severity: Major
            Found in admin/view/javascript/summernote/summernote.js - About 1 day to fix

              Function WrappedRange has 314 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  var WrappedRange = function (sc, so, ec, eo) {
                    this.sc = sc;
                    this.so = so;
                    this.ec = ec;
                    this.eo = eo;
              Severity: Major
              Found in admin/view/javascript/summernote/summernote.js - About 1 day to fix

                Function Bullet has 131 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  var Bullet = function () {
                    /**
                     * @method insertOrderedList
                     *
                     * toggle ordered list
                Severity: Major
                Found in admin/view/javascript/summernote/summernote.js - About 5 hrs to fix

                  Function Button has 113 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    var Button = function () {
                      /**
                       * update button status
                       *
                       * @param {jQuery} $container
                  Severity: Major
                  Found in admin/view/javascript/summernote/summernote.js - About 4 hrs to fix

                    Function update has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        this.update = function ($container, styleInfo) {
                          /**
                           * handle dropdown's check mark (for fontname, fontsize, lineHeight).
                           * @param {jQuery} $btn
                           * @param {Number} value
                    Severity: Major
                    Found in admin/view/javascript/summernote/summernote.js - About 4 hrs to fix

                      Function tplPopovers has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          var tplPopovers = function (lang, options) {
                            var tplLinkPopover = function () {
                              var linkButton = tplIconButton(options.iconPrefix + options.icons.link.edit, {
                                title: lang.link.edit,
                                event: 'showLinkDialog',
                      Severity: Major
                      Found in admin/view/javascript/summernote/summernote.js - About 3 hrs to fix

                        Function list has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          var list = (function () {
                            /**
                             * returns the first item of an array.
                             *
                             * @param {Array} array
                        Severity: Major
                        Found in admin/view/javascript/summernote/summernote.js - About 3 hrs to fix

                          Function Style has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            var Style = function () {
                              /**
                               * @method jQueryCSS
                               *
                               * [workaround] for old jQuery
                          Severity: Major
                          Found in admin/view/javascript/summernote/summernote.js - About 3 hrs to fix

                            Function func has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              var func = (function () {
                                var eq = function (itemA) {
                                  return function (itemB) {
                                    return itemA === itemB;
                                  };
                            Severity: Major
                            Found in admin/view/javascript/summernote/summernote.js - About 3 hrs to fix

                              Function LinkDialog has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                var LinkDialog = function (handler) {
                              
                                  /**
                                   * toggle button status
                                   *
                              Severity: Major
                              Found in admin/view/javascript/summernote/summernote.js - About 2 hrs to fix

                                Function Codeview has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  var Codeview = function (handler) {
                                
                                    this.sync = function (layoutInfo) {
                                      var isCodeview = handler.invoke('codeview.isActivated', layoutInfo);
                                      if (isCodeview && agent.hasCodeMirror) {
                                Severity: Major
                                Found in admin/view/javascript/summernote/summernote.js - About 2 hrs to fix

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

                                    var Popover = function () {
                                      var button = new Button();
                                  
                                      /**
                                       * returns position from placeholder
                                  Severity: Major
                                  Found in admin/view/javascript/summernote/summernote.js - About 2 hrs to fix

                                    Function ImageDialog has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      var ImageDialog = function (handler) {
                                        /**
                                         * toggle button status
                                         *
                                         * @private
                                    Severity: Major
                                    Found in admin/view/javascript/summernote/summernote.js - About 2 hrs to fix

                                      Function DragAndDrop has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        var DragAndDrop = function (handler) {
                                          var $document = $(document);
                                      
                                          /**
                                           * attach Drag and Drop Events
                                      Severity: Major
                                      Found in admin/view/javascript/summernote/summernote.js - About 2 hrs to fix

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

                                              var tplImagePopover = function () {
                                                var fullButton = tplButton('<span class="note-fontsize-10">100%</span>', {
                                                  title: lang.image.resizeFull,
                                                  event: 'resize',
                                                  value: '1'
                                        Severity: Major
                                        Found in admin/view/javascript/summernote/summernote.js - About 2 hrs to fix

                                          Function Clipboard has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                            var Clipboard = function (handler) {
                                              var $paste;
                                          
                                              this.attach = function (layoutInfo) {
                                                // [workaround] getting image from clipboard
                                          Severity: Major
                                          Found in admin/view/javascript/summernote/summernote.js - About 2 hrs to fix

                                            Consider simplifying this complex logical expression.
                                            Open

                                                      if ((dom.isVisiblePoint(point) && !dom.isEdgePoint(point)) ||
                                                          (dom.isVisiblePoint(point) && dom.isRightEdgePoint(point) && !isLeftToRight) ||
                                                          (dom.isVisiblePoint(point) && dom.isLeftEdgePoint(point) && isLeftToRight) ||
                                                          (dom.isVisiblePoint(point) && dom.isBlock(point.node) && dom.isEmpty(point.node))) {
                                                        return point;
                                            Severity: Critical
                                            Found in admin/view/javascript/summernote/summernote.js - About 2 hrs to fix

                                              Function Handle has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                var Handle = function (handler) {
                                                  var $document = $(document);
                                              
                                                  /**
                                                   * `mousedown` event handler on $handle
                                              Severity: Major
                                              Found in admin/view/javascript/summernote/summernote.js - About 2 hrs to fix

                                                Function createLayoutByFrame has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                    this.createLayoutByFrame = function ($holder, options) {
                                                      var langInfo = options.langInfo;
                                                
                                                      //01. create Editor
                                                      var $editor = $('<div class="note-editor panel panel-default" />');
                                                Severity: Major
                                                Found in admin/view/javascript/summernote/summernote.js - About 2 hrs to fix

                                                  Function attachDragAndDropEvent has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                      this.attachDragAndDropEvent = function (layoutInfo, options) {
                                                        var collection = $(),
                                                            $editor = layoutInfo.editor(),
                                                            $dropzone = layoutInfo.dropzone(),
                                                            $dropzoneMessage = $dropzone.find('.note-dropzone-message');
                                                  Severity: Major
                                                  Found in admin/view/javascript/summernote/summernote.js - About 2 hrs to fix

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

                                                        this.attach = function (layoutInfo, options) {
                                                          // handlers for editable
                                                          if (options.shortcuts) {
                                                            this.bindKeyMap(layoutInfo, options.keyMap[agent.isMac ? 'mac' : 'pc']);
                                                          }
                                                    Severity: Major
                                                    Found in admin/view/javascript/summernote/summernote.js - About 2 hrs to fix

                                                      Function showLinkDialog has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                          this.showLinkDialog = function ($editable, $dialog, linkInfo) {
                                                            return $.Deferred(function (deferred) {
                                                              var $linkDialog = $dialog.find('.note-link-dialog');
                                                      
                                                              var $linkText = $linkDialog.find('.note-link-text'),
                                                      Severity: Minor
                                                      Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

                                                        Function attachCustomEvent has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                            this.attachCustomEvent = function (layoutInfo, options) {
                                                              var $holder = layoutInfo.holder();
                                                              var $editable = layoutInfo.editable();
                                                              var callbacks = $editable.data('callbacks');
                                                        
                                                        
                                                        Severity: Minor
                                                        Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

                                                          Function key has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                            var key = (function () {
                                                              var keyMap = {
                                                                'BACKSPACE': 8,
                                                                'TAB': 9,
                                                                'ENTER': 13,
                                                          Severity: Minor
                                                          Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

                                                            Function History has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                              var History = function ($editable) {
                                                                var stack = [], stackOffset = -1;
                                                                var editable = $editable[0];
                                                            
                                                                var makeSnapshot = function () {
                                                            Severity: Minor
                                                            Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

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

                                                                  this.createLink = function ($editable, linkInfo, options) {
                                                                    var linkUrl = linkInfo.url;
                                                                    var linkText = linkInfo.text;
                                                                    var isNewWindow = linkInfo.isNewWindow;
                                                                    var rng = linkInfo.range || this.createRange($editable);
                                                              Severity: Minor
                                                              Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

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

                                                                    this.update = function ($popover, styleInfo, isAirMode) {
                                                                      button.update($popover, styleInfo);
                                                                
                                                                      var $linkPopover = $popover.find('.note-link-popover');
                                                                      if (styleInfo.anchor) {
                                                                Severity: Minor
                                                                Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

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

                                                                      this.releaseList = function (clustereds, isEscapseToBody) {
                                                                        var releasedParas = [];
                                                                  
                                                                        $.each(clustereds, function (idx, paras) {
                                                                          var head = list.head(paras);
                                                                  Severity: Minor
                                                                  Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

                                                                    Function Toolbar has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                    Open

                                                                      var Toolbar = function () {
                                                                        var button = new Button();
                                                                    
                                                                        this.update = function ($toolbar, styleInfo) {
                                                                          button.update($toolbar, styleInfo);
                                                                    Severity: Minor
                                                                    Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

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

                                                                          var textRangeToPoint = function (textRange, isStart) {
                                                                            var container = textRange.parentElement(), offset;
                                                                        
                                                                            var tester = document.body.createTextRange(), prevContainer;
                                                                            var childNodes = list.from(container.childNodes);
                                                                      Severity: Minor
                                                                      Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

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

                                                                            summernote: function () {
                                                                              // check first argument's type
                                                                              //  - {String}: External API call {{module}}.{{method}}
                                                                              //  - {Object}: init options
                                                                              var type = $.type(list.head(arguments));
                                                                        Severity: Minor
                                                                        Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

                                                                          Function Typing has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                          Open

                                                                            var Typing = function () {
                                                                          
                                                                              // a Bullet instance to toggle lists off
                                                                              var bullet = new Bullet();
                                                                          
                                                                          
                                                                          Severity: Minor
                                                                          Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

                                                                            Function showImageDialog has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                            Open

                                                                                this.showImageDialog = function ($editable, $dialog) {
                                                                                  return $.Deferred(function (deferred) {
                                                                                    var $imageDialog = $dialog.find('.note-image-dialog');
                                                                            
                                                                                    var $imageInput = $dialog.find('.note-image-input'),
                                                                            Severity: Minor
                                                                            Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

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

                                                                                    create : function (sc, so, ec, eo) {
                                                                                      if (!arguments.length) { // from Browser Selection
                                                                                        if (agent.isW3CRangeSupport) {
                                                                                          var selection = document.getSelection();
                                                                                          if (!selection || selection.rangeCount === 0) {
                                                                              Severity: Minor
                                                                              Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

                                                                                Function paragraph has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                Open

                                                                                      paragraph: function (lang, options) {
                                                                                        var leftButton = tplIconButton(options.iconPrefix + options.icons.paragraph.left, {
                                                                                          title: lang.paragraph.left,
                                                                                          event: 'justifyLeft'
                                                                                        });
                                                                                Severity: Minor
                                                                                Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

                                                                                  Function bindKeyMap has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                  Open

                                                                                      this.bindKeyMap = function (layoutInfo, keyMap) {
                                                                                        var $editor = layoutInfo.editor();
                                                                                        var $editable = layoutInfo.editable();
                                                                                  
                                                                                        $editable.on('keydown', function (event) {
                                                                                  Severity: Minor
                                                                                  Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

                                                                                    Function buildLayoutInfo has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                    Open

                                                                                        var buildLayoutInfo = function ($editor) {
                                                                                          var makeFinder;
                                                                                    
                                                                                          // air mode
                                                                                          if ($editor.hasClass('note-air-editor')) {
                                                                                    Severity: Minor
                                                                                    Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

                                                                                      Function async has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                      Open

                                                                                        var async = (function () {
                                                                                          /**
                                                                                           * @method readFileAsDataURL
                                                                                           *
                                                                                           * read contents of file as representing URL
                                                                                      Severity: Minor
                                                                                      Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

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

                                                                                            this.styleNodes = function (rng, options) {
                                                                                              rng = rng.splitText();
                                                                                        
                                                                                              var nodeName = options && options.nodeName || 'SPAN';
                                                                                              var expandClosestSibling = !!(options && options.expandClosestSibling);
                                                                                        Severity: Minor
                                                                                        Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

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

                                                                                              var hToolbarAndPopoverClick = function (event) {
                                                                                                var $btn = $(event.target).closest('[data-event]');
                                                                                          
                                                                                                if (!$btn.length) {
                                                                                                  return;
                                                                                          Severity: Minor
                                                                                          Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

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

                                                                                              var Fullscreen = function (handler) {
                                                                                                var $window = $(window);
                                                                                                var $scrollbar = $('html, body');
                                                                                            
                                                                                                /**
                                                                                            Severity: Minor
                                                                                            Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

                                                                                              Function hDimensionPickerMove has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                              Open

                                                                                                  var hDimensionPickerMove = function (event, options) {
                                                                                                    var $picker = $(event.target.parentNode); // target is mousecatcher
                                                                                                    var $dimensionDisplay = $picker.next();
                                                                                                    var $catcher = $picker.find('.note-dimension-picker-mousecatcher');
                                                                                                    var $highlighted = $picker.find('.note-dimension-picker-highlighted');
                                                                                              Severity: Minor
                                                                                              Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

                                                                                                Function nodes has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                Open

                                                                                                      this.nodes = function (pred, options) {
                                                                                                        pred = pred || func.ok;
                                                                                                
                                                                                                        var includeAncestor = options && options.includeAncestor;
                                                                                                        var fullyContains = options && options.fullyContains;
                                                                                                Severity: Minor
                                                                                                Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

                                                                                                  Function toggle has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                  Open

                                                                                                      this.toggle = function (layoutInfo) {
                                                                                                  
                                                                                                        var $editor = layoutInfo.editor(),
                                                                                                            $toolbar = layoutInfo.toolbar(),
                                                                                                            $editable = layoutInfo.editable(),
                                                                                                  Severity: Minor
                                                                                                  Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

                                                                                                    Function pointToTextRange has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                    Open

                                                                                                        var pointToTextRange = function (point) {
                                                                                                          var textRangeInfo = function (container, offset) {
                                                                                                            var node, isCollapseToStart;
                                                                                                      
                                                                                                            if (dom.isText(container)) {
                                                                                                    Severity: Minor
                                                                                                    Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

                                                                                                      Function color has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                      Open

                                                                                                            color: function (lang, options) {
                                                                                                              var colorButtonLabel = '<i class="' +
                                                                                                                                        options.iconPrefix + options.icons.color.recent +
                                                                                                                                      '" style="color:black;background-color:yellow;"></i>';
                                                                                                      
                                                                                                      
                                                                                                      Severity: Minor
                                                                                                      Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

                                                                                                        Function deleteContents has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                              this.deleteContents = function () {
                                                                                                                if (this.isCollapsed()) {
                                                                                                                  return this;
                                                                                                                }
                                                                                                        
                                                                                                        
                                                                                                        Severity: Minor
                                                                                                        Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

                                                                                                          Function normalize has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                          Open

                                                                                                                this.normalize = function () {
                                                                                                          
                                                                                                                  /**
                                                                                                                   * @param {BoundaryPoint} point
                                                                                                                   * @param {Boolean} isLeftToRight
                                                                                                          Severity: Minor
                                                                                                          Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

                                                                                                            Function hHandleMousedown has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                            Open

                                                                                                                var hHandleMousedown = function (event) {
                                                                                                                  if (dom.isControlSizing(event.target)) {
                                                                                                                    event.preventDefault();
                                                                                                                    event.stopPropagation();
                                                                                                            
                                                                                                            
                                                                                                            Severity: Minor
                                                                                                            Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

                                                                                                              Function insertParagraph has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                              Open

                                                                                                                  this.insertParagraph = function () {
                                                                                                                    var rng = range.create();
                                                                                                              
                                                                                                                    // deleteContents on range.
                                                                                                                    rng = rng.deleteContents();
                                                                                                              Severity: Minor
                                                                                                              Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

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

                                                                                                                    this.activate = function (layoutInfo) {
                                                                                                                      var $editor = layoutInfo.editor(),
                                                                                                                          $toolbar = layoutInfo.toolbar(),
                                                                                                                          $editable = layoutInfo.editable(),
                                                                                                                          $codable = layoutInfo.codable(),
                                                                                                                Severity: Minor
                                                                                                                Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

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

                                                                                                                      this.toggleList = function (listName) {
                                                                                                                        var self = this;
                                                                                                                        var rng = range.create().wrapBodyInlineWithPara();
                                                                                                                  
                                                                                                                        var paras = rng.nodes(dom.isPara, { includeAncestor: true });
                                                                                                                  Severity: Minor
                                                                                                                  Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

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

                                                                                                                        this.createLayoutByAirMode = function ($holder, options) {
                                                                                                                          var langInfo = options.langInfo;
                                                                                                                          var keyMap = options.keyMap[agent.isMac ? 'mac' : 'pc'];
                                                                                                                          var id = func.uniqueId();
                                                                                                                    
                                                                                                                    
                                                                                                                    Severity: Minor
                                                                                                                    Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

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

                                                                                                                        $.summernote.addPlugin = function (plugin) {
                                                                                                                      
                                                                                                                          // save plugin list
                                                                                                                          $.summernote.plugins.push(plugin);
                                                                                                                      
                                                                                                                      
                                                                                                                      Severity: Minor
                                                                                                                      Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

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

                                                                                                                            this.current = function (rng) {
                                                                                                                              var $cont = $(dom.isText(rng.sc) ? rng.sc.parentNode : rng.sc);
                                                                                                                              var styleInfo = this.fromNode($cont);
                                                                                                                        
                                                                                                                              // document.queryCommandState for toggle state
                                                                                                                        Severity: Minor
                                                                                                                        Found in admin/view/javascript/summernote/summernote.js - About 1 hr to fix

                                                                                                                          Consider simplifying this complex logical expression.
                                                                                                                          Open

                                                                                                                                    if (((dom.isLeftEdgePointOf(point, block) || dom.isVoid(dom.prevPoint(point).node)) && !isLeftToRight) ||
                                                                                                                                        ((dom.isRightEdgePointOf(point, block) || dom.isVoid(dom.nextPoint(point).node)) && isLeftToRight)) {
                                                                                                                          
                                                                                                                                      // returns point already on visible point
                                                                                                                                      if (dom.isVisiblePoint(point)) {
                                                                                                                          Severity: Major
                                                                                                                          Found in admin/view/javascript/summernote/summernote.js - About 40 mins to fix

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

                                                                                                                                    pc: {
                                                                                                                                      'ENTER': 'insertParagraph',
                                                                                                                                      'CTRL+Z': 'undo',
                                                                                                                                      'CTRL+Y': 'redo',
                                                                                                                                      'TAB': 'tab',
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 5 hrs to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 2660..2688

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

                                                                                                                            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

                                                                                                                                    mac: {
                                                                                                                                      'ENTER': 'insertParagraph',
                                                                                                                                      'CMD+Z': 'undo',
                                                                                                                                      'CMD+SHIFT+Z': 'redo',
                                                                                                                                      'TAB': 'tab',
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 5 hrs to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 2630..2658

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

                                                                                                                            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

                                                                                                                                    image: {
                                                                                                                                      image: 'Picture',
                                                                                                                                      insert: 'Insert Image',
                                                                                                                                      resizeFull: 'Resize Full',
                                                                                                                                      resizeHalf: 'Resize Half',
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 3 other locations - About 3 hrs to fix
                                                                                                                            admin/view/javascript/summernote/lang/summernote-da-DK.js on lines 16..36
                                                                                                                            admin/view/javascript/summernote/lang/summernote-fr-FR.js on lines 16..36
                                                                                                                            admin/view/javascript/summernote/lang/summernote-pl-PL.js on lines 14..34

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

                                                                                                                            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 listNext = function (node, pred) {
                                                                                                                                  pred = pred || func.fail;
                                                                                                                            
                                                                                                                                  var nodes = [];
                                                                                                                                  while (node) {
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 2 hrs to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 892..902

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

                                                                                                                            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 listPrev = function (node, pred) {
                                                                                                                                  pred = pred || func.fail;
                                                                                                                            
                                                                                                                                  var nodes = [];
                                                                                                                                  while (node) {
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 2 hrs to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 910..920

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

                                                                                                                            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 triggerOnChange = function ($editable) {
                                                                                                                                  var $holder = dom.makeLayoutInfo($editable).holder();
                                                                                                                                  handler.bindCustomEvent(
                                                                                                                                    $holder, $editable.data('callbacks'), 'change'
                                                                                                                                  )($editable.html(), $editable);
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3636..3641

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

                                                                                                                            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 triggerOnBeforeChange = function ($editable) {
                                                                                                                                  var $holder = dom.makeLayoutInfo($editable).holder();
                                                                                                                                  handler.bindCustomEvent(
                                                                                                                                    $holder, $editable.data('callbacks'), 'before.command'
                                                                                                                                  )($editable.html(), $editable);
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3643..3648

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

                                                                                                                            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 bindEnterKey = function ($input, $btn) {
                                                                                                                                  $input.on('keypress', function (event) {
                                                                                                                                    if (event.keyCode === key.code.ENTER) {
                                                                                                                                      $btn.trigger('click');
                                                                                                                                    }
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 5230..5236

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

                                                                                                                            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 bindEnterKey = function ($input, $btn) {
                                                                                                                                  $input.on('keypress', function (event) {
                                                                                                                                    if (event.keyCode === key.code.ENTER) {
                                                                                                                                      $btn.trigger('click');
                                                                                                                                    }
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 5353..5359

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

                                                                                                                            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 (3 < dim.r && dim.r < options.insertTableMaxSize.row) {
                                                                                                                                    $unhighlighted.css({ height: dim.r + 1 + 'em'});
                                                                                                                                  }
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 5753..5755

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

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

                                                                                                                                  picture: function (lang, options) {
                                                                                                                                    return tplIconButton(options.iconPrefix + options.icons.image.image, {
                                                                                                                                      event: 'showImageDialog',
                                                                                                                                      title: lang.image.image,
                                                                                                                                      hide: true
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 2 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6118..6124
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6335..6341

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

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

                                                                                                                                  help: function (lang, options) {
                                                                                                                                    return tplIconButton(options.iconPrefix + options.icons.options.help, {
                                                                                                                                      event: 'showHelpDialog',
                                                                                                                                      title: lang.options.help,
                                                                                                                                      hide: true
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 2 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6111..6117
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6118..6124

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

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

                                                                                                                                  link: function (lang, options) {
                                                                                                                                    return tplIconButton(options.iconPrefix + options.icons.link.link, {
                                                                                                                                      event: 'showLinkDialog',
                                                                                                                                      title: lang.link.link,
                                                                                                                                      hide: true
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 2 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6111..6117
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6335..6341

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

                                                                                                                            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 (3 < dim.c && dim.c < options.insertTableMaxSize.col) {
                                                                                                                                    $unhighlighted.css({ width: dim.c + 1 + 'em'});
                                                                                                                                  }
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 5757..5759

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

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

                                                                                                                                  italic: function (lang, options) {
                                                                                                                                    return tplIconButton(options.iconPrefix + options.icons.font.italic, {
                                                                                                                                      event: 'italic',
                                                                                                                                      title: lang.font.italic
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 13 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6228..6233
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6240..6245
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6246..6251
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6252..6257
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6258..6263
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6264..6269
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6270..6275
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6276..6281
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6342..6347
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6348..6353
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6354..6359
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6360..6365
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6366..6371

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

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

                                                                                                                                  ul: function (lang, options) {
                                                                                                                                    return tplIconButton(options.iconPrefix + options.icons.lists.unordered, {
                                                                                                                                      event: 'insertUnorderedList',
                                                                                                                                      title: lang.lists.unordered
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 13 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6228..6233
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6234..6239
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6240..6245
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6246..6251
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6252..6257
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6258..6263
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6264..6269
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6276..6281
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6342..6347
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6348..6353
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6354..6359
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6360..6365
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6366..6371

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

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

                                                                                                                                  hr: function (lang, options) {
                                                                                                                                    return tplIconButton(options.iconPrefix + options.icons.hr.insert, {
                                                                                                                                      event: 'insertHorizontalRule',
                                                                                                                                      title: lang.hr.insert
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 13 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6228..6233
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6234..6239
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6240..6245
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6246..6251
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6252..6257
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6258..6263
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6264..6269
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6270..6275
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6276..6281
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6342..6347
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6348..6353
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6354..6359
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6360..6365

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

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

                                                                                                                                  redo: function (lang, options) {
                                                                                                                                    return tplIconButton(options.iconPrefix + options.icons.history.redo, {
                                                                                                                                      event: 'redo',
                                                                                                                                      title: lang.history.redo
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 13 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6228..6233
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6234..6239
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6240..6245
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6246..6251
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6252..6257
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6258..6263
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6264..6269
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6270..6275
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6276..6281
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6342..6347
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6348..6353
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6354..6359
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6366..6371

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

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

                                                                                                                                  ol: function (lang, options) {
                                                                                                                                    return tplIconButton(options.iconPrefix + options.icons.lists.ordered, {
                                                                                                                                      event: 'insertOrderedList',
                                                                                                                                      title: lang.lists.ordered
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 13 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6228..6233
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6234..6239
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6240..6245
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6246..6251
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6252..6257
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6258..6263
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6264..6269
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6270..6275
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6342..6347
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6348..6353
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6354..6359
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6360..6365
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6366..6371

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

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

                                                                                                                                  undo: function (lang, options) {
                                                                                                                                    return tplIconButton(options.iconPrefix + options.icons.history.undo, {
                                                                                                                                      event: 'undo',
                                                                                                                                      title: lang.history.undo
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 13 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6228..6233
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6234..6239
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6240..6245
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6246..6251
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6252..6257
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6258..6263
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6264..6269
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6270..6275
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6276..6281
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6342..6347
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6348..6353
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6360..6365
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6366..6371

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

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

                                                                                                                                  superscript: function (lang, options) {
                                                                                                                                    return tplIconButton(options.iconPrefix + options.icons.font.superscript, {
                                                                                                                                      event: 'superscript',
                                                                                                                                      title: lang.font.superscript
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 13 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6228..6233
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6234..6239
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6240..6245
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6246..6251
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6258..6263
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6264..6269
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6270..6275
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6276..6281
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6342..6347
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6348..6353
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6354..6359
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6360..6365
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6366..6371

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

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

                                                                                                                                  clear: function (lang, options) {
                                                                                                                                    return tplIconButton(options.iconPrefix + options.icons.font.clear, {
                                                                                                                                      event: 'removeFormat',
                                                                                                                                      title: lang.font.clear
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 13 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6228..6233
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6234..6239
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6240..6245
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6246..6251
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6252..6257
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6258..6263
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6270..6275
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6276..6281
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6342..6347
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6348..6353
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6354..6359
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6360..6365
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6366..6371

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

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

                                                                                                                                  subscript: function (lang, options) {
                                                                                                                                    return tplIconButton(options.iconPrefix + options.icons.font.subscript, {
                                                                                                                                      event: 'subscript',
                                                                                                                                      title: lang.font.subscript
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 13 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6228..6233
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6234..6239
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6240..6245
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6246..6251
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6252..6257
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6264..6269
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6270..6275
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6276..6281
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6342..6347
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6348..6353
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6354..6359
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6360..6365
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6366..6371

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

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

                                                                                                                                  fullscreen: function (lang, options) {
                                                                                                                                    return tplIconButton(options.iconPrefix + options.icons.options.fullscreen, {
                                                                                                                                      event: 'fullscreen',
                                                                                                                                      title: lang.options.fullscreen
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 13 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6228..6233
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6234..6239
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6240..6245
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6246..6251
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6252..6257
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6258..6263
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6264..6269
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6270..6275
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6276..6281
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6348..6353
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6354..6359
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6360..6365
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6366..6371

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

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

                                                                                                                                  strikethrough: function (lang, options) {
                                                                                                                                    return tplIconButton(options.iconPrefix + options.icons.font.strikethrough, {
                                                                                                                                      event: 'strikethrough',
                                                                                                                                      title: lang.font.strikethrough
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 13 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6228..6233
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6234..6239
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6240..6245
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6252..6257
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6258..6263
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6264..6269
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6270..6275
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6276..6281
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6342..6347
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6348..6353
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6354..6359
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6360..6365
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6366..6371

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

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

                                                                                                                                  bold: function (lang, options) {
                                                                                                                                    return tplIconButton(options.iconPrefix + options.icons.font.bold, {
                                                                                                                                      event: 'bold',
                                                                                                                                      title: lang.font.bold
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 13 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6234..6239
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6240..6245
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6246..6251
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6252..6257
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6258..6263
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6264..6269
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6270..6275
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6276..6281
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6342..6347
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6348..6353
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6354..6359
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6360..6365
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6366..6371

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

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

                                                                                                                                  underline: function (lang, options) {
                                                                                                                                    return tplIconButton(options.iconPrefix + options.icons.font.underline, {
                                                                                                                                      event: 'underline',
                                                                                                                                      title: lang.font.underline
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 13 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6228..6233
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6234..6239
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6246..6251
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6252..6257
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6258..6263
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6264..6269
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6270..6275
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6276..6281
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6342..6347
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6348..6353
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6354..6359
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6360..6365
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6366..6371

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

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

                                                                                                                                  codeview: function (lang, options) {
                                                                                                                                    return tplIconButton(options.iconPrefix + options.icons.options.codeview, {
                                                                                                                                      event: 'codeview',
                                                                                                                                      title: lang.options.codeview
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 13 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6228..6233
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6234..6239
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6240..6245
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6246..6251
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6252..6257
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6258..6263
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6264..6269
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6270..6275
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6276..6281
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6342..6347
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6354..6359
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6360..6365
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6366..6371

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

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

                                                                                                                                    var noneButton = tplIconButton(options.iconPrefix + options.icons.image.shapeNone, {
                                                                                                                                      title: lang.image.shapeNone,
                                                                                                                                      event: 'imageShape',
                                                                                                                                      value: ''
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 7 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6409..6413
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6414..6418
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6419..6423
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6425..6429
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6430..6434
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6435..6439
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6446..6450

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

                                                                                                                                    var removeButton = tplIconButton(options.iconPrefix + options.icons.image.remove, {
                                                                                                                                      title: lang.image.remove,
                                                                                                                                      event: 'removeMedia',
                                                                                                                                      value: 'none'
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 7 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6409..6413
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6414..6418
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6419..6423
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6425..6429
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6430..6434
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6435..6439
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6440..6444

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

                                                                                                                                    var circleButton = tplIconButton(options.iconPrefix + options.icons.image.shapeCircle, {
                                                                                                                                      title: lang.image.shapeCircle,
                                                                                                                                      event: 'imageShape',
                                                                                                                                      value: 'img-circle'
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 7 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6409..6413
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6414..6418
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6419..6423
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6425..6429
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6435..6439
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6440..6444
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6446..6450

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

                                                                                                                                    var leftButton = tplIconButton(options.iconPrefix + options.icons.image.floatLeft, {
                                                                                                                                      title: lang.image.floatLeft,
                                                                                                                                      event: 'floatMe',
                                                                                                                                      value: 'left'
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 7 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6414..6418
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6419..6423
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6425..6429
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6430..6434
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6435..6439
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6440..6444
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6446..6450

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

                                                                                                                                    var rightButton = tplIconButton(options.iconPrefix + options.icons.image.floatRight, {
                                                                                                                                      title: lang.image.floatRight,
                                                                                                                                      event: 'floatMe',
                                                                                                                                      value: 'right'
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 7 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6409..6413
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6419..6423
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6425..6429
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6430..6434
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6435..6439
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6440..6444
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6446..6450

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

                                                                                                                                    var thumbnailButton = tplIconButton(options.iconPrefix + options.icons.image.shapeThumbnail, {
                                                                                                                                      title: lang.image.shapeThumbnail,
                                                                                                                                      event: 'imageShape',
                                                                                                                                      value: 'img-thumbnail'
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 7 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6409..6413
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6414..6418
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6419..6423
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6425..6429
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6430..6434
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6440..6444
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6446..6450

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

                                                                                                                                    var roundedButton = tplIconButton(options.iconPrefix + options.icons.image.shapeRounded, {
                                                                                                                                      title: lang.image.shapeRounded,
                                                                                                                                      event: 'imageShape',
                                                                                                                                      value: 'img-rounded'
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 7 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6409..6413
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6414..6418
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6419..6423
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6430..6434
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6435..6439
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6440..6444
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6446..6450

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

                                                                                                                                    var justifyButton = tplIconButton(options.iconPrefix + options.icons.image.floatNone, {
                                                                                                                                      title: lang.image.floatNone,
                                                                                                                                      event: 'floatMe',
                                                                                                                                      value: 'none'
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 7 other locations - About 1 hr to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6409..6413
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6414..6418
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6425..6429
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6430..6434
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6435..6439
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6440..6444
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6446..6450

                                                                                                                            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

                                                                                                                                this.undo = function ($editable) {
                                                                                                                                  triggerOnBeforeChange($editable);
                                                                                                                                  $editable.data('NoteHistory').undo();
                                                                                                                                  triggerOnChange($editable);
                                                                                                                                };
                                                                                                                            Severity: Minor
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 55 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3666..3670

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

                                                                                                                            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 nextPointUntil = function (point, pred) {
                                                                                                                                  while (point) {
                                                                                                                                    if (pred(point)) {
                                                                                                                                      return point;
                                                                                                                                    }
                                                                                                                            Severity: Minor
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 55 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 1194..1204

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

                                                                                                                            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

                                                                                                                                this.redo = function ($editable) {
                                                                                                                                  triggerOnBeforeChange($editable);
                                                                                                                                  $editable.data('NoteHistory').redo();
                                                                                                                                  triggerOnChange($editable);
                                                                                                                                };
                                                                                                                            Severity: Minor
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 55 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3655..3659

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

                                                                                                                            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 prevPointUntil = function (point, pred) {
                                                                                                                                  while (point) {
                                                                                                                                    if (pred(point)) {
                                                                                                                                      return point;
                                                                                                                                    }
                                                                                                                            Severity: Minor
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 55 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 1213..1223

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

                                                                                                                            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 = function (array, item) {
                                                                                                                                  var idx = indexOf(array, item);
                                                                                                                                  if (idx === -1) { return null; }
                                                                                                                            
                                                                                                                                  return array[idx + 1];
                                                                                                                            Severity: Minor
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 50 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 493..498

                                                                                                                            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

                                                                                                                                    return tplIconButton(options.iconPrefix + options.icons.table.table, {
                                                                                                                                      title: lang.table.table,
                                                                                                                                      dropdown: tplDropdown(dropdown, 'note-table')
                                                                                                                                    });
                                                                                                                            Severity: Minor
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 50 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6329..6332

                                                                                                                            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

                                                                                                                                    return tplIconButton(options.iconPrefix + options.icons.font.height, {
                                                                                                                                      title: lang.font.height,
                                                                                                                                      dropdown: tplDropdown(items, 'note-check')
                                                                                                                                    });
                                                                                                                            Severity: Minor
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 50 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6135..6138

                                                                                                                            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

                                                                                                                                var prev = function (array, item) {
                                                                                                                                  var idx = indexOf(array, item);
                                                                                                                                  if (idx === -1) { return null; }
                                                                                                                            
                                                                                                                                  return array[idx - 1];
                                                                                                                            Severity: Minor
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 50 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 482..487

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

                                                                                                                                    var centerButton = tplIconButton(options.iconPrefix + options.icons.paragraph.center, {
                                                                                                                                      title: lang.paragraph.center,
                                                                                                                                      event: 'justifyCenter'
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 6 other locations - About 50 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6283..6286
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6291..6294
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6295..6298
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6300..6303
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6304..6307
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6381..6384

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

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

                                                                                                                                    var leftButton = tplIconButton(options.iconPrefix + options.icons.paragraph.left, {
                                                                                                                                      title: lang.paragraph.left,
                                                                                                                                      event: 'justifyLeft'
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 6 other locations - About 50 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6287..6290
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6291..6294
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6295..6298
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6300..6303
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6304..6307
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6381..6384

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

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

                                                                                                                                    var outdentButton = tplIconButton(options.iconPrefix + options.icons.paragraph.outdent, {
                                                                                                                                      title: lang.paragraph.outdent,
                                                                                                                                      event: 'outdent'
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 6 other locations - About 50 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6283..6286
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6287..6290
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6291..6294
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6295..6298
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6304..6307
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6381..6384

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

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

                                                                                                                                    var justifyButton = tplIconButton(options.iconPrefix + options.icons.paragraph.justify, {
                                                                                                                                      title: lang.paragraph.justify,
                                                                                                                                      event: 'justifyFull'
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 6 other locations - About 50 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6283..6286
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6287..6290
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6291..6294
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6300..6303
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6304..6307
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6381..6384

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

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

                                                                                                                                    var indentButton = tplIconButton(options.iconPrefix + options.icons.paragraph.indent, {
                                                                                                                                      title: lang.paragraph.indent,
                                                                                                                                      event: 'indent'
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 6 other locations - About 50 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6283..6286
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6287..6290
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6291..6294
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6295..6298
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6300..6303
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6381..6384

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

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

                                                                                                                                    var unlinkButton = tplIconButton(options.iconPrefix + options.icons.link.unlink, {
                                                                                                                                      title: lang.link.unlink,
                                                                                                                                      event: 'unlink'
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 6 other locations - About 50 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6283..6286
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6287..6290
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6291..6294
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6295..6298
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6300..6303
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6304..6307

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

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

                                                                                                                                    var rightButton = tplIconButton(options.iconPrefix + options.icons.paragraph.right, {
                                                                                                                                      title: lang.paragraph.right,
                                                                                                                                      event: 'justifyRight'
                                                                                                                                    });
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 6 other locations - About 50 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6283..6286
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6287..6290
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6295..6298
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6300..6303
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6304..6307
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6381..6384

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

                                                                                                                            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

                                                                                                                                this.activate = function ($toolbar) {
                                                                                                                                  $toolbar.find('button')
                                                                                                                                          .not('button[data-event="codeview"]')
                                                                                                                                          .removeClass('disabled');
                                                                                                                                };
                                                                                                                            Severity: Minor
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 40 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 4543..4547

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

                                                                                                                            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

                                                                                                                                this.deactivate = function ($toolbar) {
                                                                                                                                  $toolbar.find('button')
                                                                                                                                          .not('button[data-event="codeview"]')
                                                                                                                                          .addClass('disabled');
                                                                                                                                };
                                                                                                                            Severity: Minor
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 40 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 4533..4537

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

                                                                                                                            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

                                                                                                                                    '<div ' + colClass + '>' + tplShortcutStyle(lang, options) + '</div>' +
                                                                                                                                    '<div ' + colClass + '>' + tplShortcutPara(lang, options) + '</div>'
                                                                                                                            Severity: Minor
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 35 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6593..6594

                                                                                                                            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

                                                                                                                                    '<div ' + colClass + '>' + tplShortcutAction(lang, options) + '</div>' +
                                                                                                                                    '<div ' + colClass + '>' + tplShortcutText(lang, options) + '</div>',
                                                                                                                            Severity: Minor
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 35 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6595..6596

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

                                                                                                                                this.insertOrderedList = function ($editable) {
                                                                                                                                  beforeCommand($editable);
                                                                                                                                  bullet.insertOrderedList($editable);
                                                                                                                                  afterCommand($editable);
                                                                                                                                };
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 4 other locations - About 35 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3860..3864
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3880..3884
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3889..3893
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3898..3902

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

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

                                                                                                                                this.outdent = function ($editable) {
                                                                                                                                  beforeCommand($editable);
                                                                                                                                  bullet.outdent($editable);
                                                                                                                                  afterCommand($editable);
                                                                                                                                };
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 4 other locations - About 35 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3860..3864
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3871..3875
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3880..3884
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3889..3893

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

                                                                                                                            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

                                                                                                                                  $dialog.find('button.close, a.modal-close').click(function () {
                                                                                                                                    $(this).closest('.modal').modal('hide');
                                                                                                                                  });
                                                                                                                            Severity: Minor
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 35 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6787..6789

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

                                                                                                                            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 toggleBtn = function ($btn, isEnable) {
                                                                                                                                  $btn.toggleClass('disabled', !isEnable);
                                                                                                                                  $btn.attr('disabled', !isEnable);
                                                                                                                                };
                                                                                                                            Severity: Minor
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 35 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 5341..5344

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

                                                                                                                            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

                                                                                                                                  $dialog.find('button.close, a.modal-close').click(function () {
                                                                                                                                    $(this).closest('.modal').modal('hide');
                                                                                                                                  });
                                                                                                                            Severity: Minor
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 35 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 6875..6877

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

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

                                                                                                                                this.indent = function ($editable) {
                                                                                                                                  beforeCommand($editable);
                                                                                                                                  bullet.indent($editable);
                                                                                                                                  afterCommand($editable);
                                                                                                                                };
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 4 other locations - About 35 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3860..3864
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3871..3875
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3880..3884
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3898..3902

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

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

                                                                                                                                this.insertParagraph = function ($editable) {
                                                                                                                                  beforeCommand($editable);
                                                                                                                                  typing.insertParagraph($editable);
                                                                                                                                  afterCommand($editable);
                                                                                                                                };
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 4 other locations - About 35 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3871..3875
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3880..3884
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3889..3893
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3898..3902

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

                                                                                                                            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 toggleBtn = function ($btn, isEnable) {
                                                                                                                                  $btn.toggleClass('disabled', !isEnable);
                                                                                                                                  $btn.attr('disabled', !isEnable);
                                                                                                                                };
                                                                                                                            Severity: Minor
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 35 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 5218..5221

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

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

                                                                                                                                this.insertUnorderedList = function ($editable) {
                                                                                                                                  beforeCommand($editable);
                                                                                                                                  bullet.insertUnorderedList($editable);
                                                                                                                                  afterCommand($editable);
                                                                                                                                };
                                                                                                                            Severity: Major
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 4 other locations - About 35 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3860..3864
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3871..3875
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3889..3893
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 3898..3902

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

                                                                                                                            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 (plugin.buttons) {
                                                                                                                                  $.each(plugin.buttons, function (name, button) {
                                                                                                                                    renderer.addButtonInfo(name, button);
                                                                                                                                  });
                                                                                                                                }
                                                                                                                            Severity: Minor
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 35 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 7123..7127

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

                                                                                                                            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 (plugin.dialogs) {
                                                                                                                                  $.each(plugin.dialogs, function (name, dialog) {
                                                                                                                                    renderer.addDialogInfo(name, dialog);
                                                                                                                                  });
                                                                                                                                }
                                                                                                                            Severity: Minor
                                                                                                                            Found in admin/view/javascript/summernote/summernote.js and 1 other location - About 35 mins to fix
                                                                                                                            admin/view/javascript/summernote/summernote.js on lines 7117..7121

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

                                                                                                                            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