CodeforLeipzig/stadtratmonitor

View on GitHub

Showing 611 of 611 total issues

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

          }, c.prototype.attachmentEditorDidRequestRemovingAttributeForAttachment = function(t3, e2) {
            var n2;
            return (n2 = this.delegate) != null && typeof n2.compositionControllerWillUpdateAttachment == "function" && n2.compositionControllerWillUpdateAttachment(e2), this.composition.removeAttributeForAttachment(t3, e2);
          }, c.prototype.attachmentEditorDidRequestRemovalOfAttachment = function(t3) {
public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 2760..2763

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

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

Consider simplifying this complex logical expression.
Open

          if (i2 && i2.type === "childList" && i2.addedNodes && i2.addedNodes) {
            for (var o2 = i2.addedNodes[0]; o2 && o2 !== document && !o2.host; )
              o2 = o2.parentNode;
            var r2 = o2 && (o2.URL || o2._URL || o2.host && o2.host.localName) || "";
            r2 = r2.split("/?").shift().split("/").pop();

    Consider simplifying this complex logical expression.
    Open

         */},{key:"open",value:function open(t,i){var n=this;if(!(this.$element.hasClass("is-open")||this.isRevealed||this.isInCanvas)){var s=this;i&&(this.$lastTrigger=i);"top"===this.options.forceTo?window.scrollTo(0,0):"bottom"===this.options.forceTo&&window.scrollTo(0,document.body.scrollHeight);this.options.transitionTime&&"overlap"!==this.options.transition?this.$element.siblings("[data-off-canvas-content]").css("transition-duration",this.options.transitionTime):this.$element.siblings("[data-off-canvas-content]").css("transition-duration","");this.$element.addClass("is-open").removeClass("is-closed");this.$triggers.attr("aria-expanded","true");this.$element.attr("aria-hidden","false");this.$content.addClass("is-open-"+this.position);if(false===this.options.contentScroll){e("body").addClass("is-off-canvas-open").on("touchmove",this._stopScrolling);this.$element.on("touchstart",this._recordScrollable);this.$element.on("touchmove",this,this._preventDefaultAtEdges);this.$element.on("touchstart","[data-off-canvas-scrollbox]",this._recordScrollable);this.$element.on("touchmove","[data-off-canvas-scrollbox]",this,this._scrollboxTouchMoved)}true===this.options.contentOverlay&&this.$overlay.addClass("is-visible");true===this.options.closeOnClick&&true===this.options.contentOverlay&&this.$overlay.addClass("is-closable");true===this.options.autoFocus&&this.$element.one(transitionend(this.$element),(function(){if(s.$element.hasClass("is-open")){var e=s.$element.find("[data-autofocus]");e.length?e.eq(0).focus():s.$element.find("a, button").eq(0).focus()}}));if(true===this.options.trapFocus){this.$content.attr("tabindex","-1");l.trapFocus(this.$element)}"push"===this.options.transition&&this._fixStickyElements();this._addContentClasses();this.$element.trigger("opened.zf.offCanvas");this.$element.one(transitionend(this.$element),(function(){n.$element.trigger("openedEnd.zf.offCanvas")}))}}

      Function validateModifiers has 57 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function validateModifiers(modifiers) {
          modifiers.forEach(function(modifier) {
            [].concat(Object.keys(modifier), VALID_PROPERTIES).filter(function(value, index, self) {
              return self.indexOf(value) === index;
            }).forEach(function(key) {

        Method definition has 57 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          def self.definition(q, options = {})
            Elasticsearch::DSL::Search.search do
              sort do
                by '_score' if options[:sort_by] == 'score'
                by :published_at, order: 'desc'
        Severity: Major
        Found in app/models/paper_search.rb - About 2 hrs to fix

          Function G has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
          Open

          useMUI:true};var N={dropdown:{cssClass:"dropdown",plugin:H},drilldown:{cssClass:"drilldown",plugin:A},accordion:{cssClass:"accordion-menu",plugin:O}};var G=function(t){_inherits(ResponsiveMenu,t);var n=_createSuper(ResponsiveMenu);function ResponsiveMenu(){_classCallCheck(this,ResponsiveMenu);return n.apply(this,arguments)}_createClass(ResponsiveMenu,[{key:"_setup",value:
          /**
               * Creates a new instance of a responsive menu.
               * @class
               * @name ResponsiveMenu

          Cognitive Complexity

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

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

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

          Further reading

          Function addToJquery has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
          Open

          reflow:function reflow(t,i){"undefined"===typeof i?i=Object.keys(this._plugins):"string"===typeof i&&(i=[i]);var n=this;e.each(i,(function(i,s){var a=n._plugins[s];var o=e(t).find("[data-"+s+"]").addBack("[data-"+s+"]").filter((function(){return"undefined"===typeof e(this).data("zfPlugin")}));o.each((function(){var t=e(this),i={reflow:true};t.attr("data-options")&&t.attr("data-options").split(";").forEach((function(e){var t=e.split(":").map((function(e){return e.trim()}));t[0]&&(i[t[0]]=parseValue(t[1]))}));try{t.data("zfPlugin",new a(e(this),i))}catch(e){console.error(e)}finally{return}}))}))},getFnName:functionName,addToJquery:function addToJquery(){
          /**
               * The Foundation jQuery method.
               * @param {String|Array} method - An action to perform on the current jQuery object.
               */

          Cognitive Complexity

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

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

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

          Further reading

          Function resolveIfNotPlainOrUrl has 56 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function resolveIfNotPlainOrUrl (relUrl, parentUrl) {
              // strip off any trailing query params or hashes
              const queryHashIndex = parentUrl.indexOf('?', parentUrl.indexOf('#') === -1 ? parentUrl.indexOf('#') : parentUrl.length);
              if (queryHashIndex !== -1)
                parentUrl = parentUrl.slice(0, queryHashIndex);

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

                remove: function( elem, types, handler, selector, mappedTypes ) {
                    var j, handleObj, tmp,
                        origCount, t, events,
                        special, handlers, type,
                        namespaces, origType,

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

                      e.Piece = function(n2) {
                        function i(t3, n3) {
                          n3 == null && (n3 = {}), i.__super__.constructor.apply(this, arguments), this.attributes = e.Hash.box(n3);
                        }
                        return t2(i, n2), i.types = {}, i.registerType = function(t3, e2) {

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

                          }, d.prototype.attachmentDidChangePreviewURL = function(t3) {
                            var e2;
                            return this.revision++, (e2 = this.delegate) != null && typeof e2.compositionDidChangeAttachmentPreviewURL == "function" ? e2.compositionDidChangeAttachmentPreviewURL(t3) : void 0;
                          }, d.prototype.editAttachment = function(t3, e2) {
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 4465..4468

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

                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

                     */},{key:"_setCurrentAnchor",value:function _setCurrentAnchor(t){this.$currentAnchor=e(t)}},{key:"_events",value:function _events(){var t=this,i="ontouchstart"in window||"undefined"!==typeof window.ontouchstart;this.$element.on({"open.zf.trigger":this.open.bind(this),"close.zf.trigger":this.close.bind(this),"toggle.zf.trigger":this.toggle.bind(this),"resizeme.zf.trigger":this._setPosition.bind(this)});this.$anchors.off("click.zf.trigger").on("click.zf.trigger",(function(e){t._setCurrentAnchor(this);(false===t.options.forceFollow||i&&t.options.hover&&false===t.$element.hasClass("is-open"))&&e.preventDefault()}));if(this.options.hover){this.$anchors.off("mouseenter.zf.dropdown mouseleave.zf.dropdown").on("mouseenter.zf.dropdown",(function(){t._setCurrentAnchor(this);var i=e("body").data();if("undefined"===typeof i.whatinput||"mouse"===i.whatinput){clearTimeout(t.timeout);t.timeout=setTimeout((function(){t.open();t.$anchors.data("hover",true)}),t.options.hoverDelay)}})).on("mouseleave.zf.dropdown",ignoreMousedisappear((function(){clearTimeout(t.timeout);t.timeout=setTimeout((function(){t.close();t.$anchors.data("hover",false)}),t.options.hoverDelay)})));this.options.hoverPane&&this.$element.off("mouseenter.zf.dropdown mouseleave.zf.dropdown").on("mouseenter.zf.dropdown",(function(){clearTimeout(t.timeout)})).on("mouseleave.zf.dropdown",ignoreMousedisappear((function(){clearTimeout(t.timeout);t.timeout=setTimeout((function(){t.close();t.$anchors.data("hover",false)}),t.options.hoverDelay)})))}this.$anchors.add(this.$element).on("keydown.zf.dropdown",(function(i){var n=e(this);l.handleKey(i,"Dropdown",{open:function open(){if(n.is(t.$anchors)&&!n.is("input, textarea")){t.open();t.$element.attr("tabindex",-1).focus();i.preventDefault()}},close:function close(){t.close();t.$anchors.focus()}})}))}},{key:"_addBodyHandler",value:function _addBodyHandler(){var t=e(document.body).not(this.$element),i=this;t.off("click.zf.dropdown tap.zf.dropdown").on("click.zf.dropdown tap.zf.dropdown",(function(e){if(!i.$anchors.is(e.target)&&!i.$anchors.find(e.target).length&&!i.$element.is(e.target)&&!i.$element.find(e.target).length){i.close();t.off("click.zf.dropdown tap.zf.dropdown")}}))}},{key:"open",value:function open(){this.$element.trigger("closeme.zf.dropdown",this.$element.attr("id"));this.$anchors.addClass("hover").attr({"aria-expanded":true});this.$element.addClass("is-opening");this._setPosition();this.$element.removeClass("is-opening").addClass("is-open").attr({"aria-hidden":false});if(this.options.autoFocus){var e=l.findFocusable(this.$element);e.length&&e.eq(0).focus()}this.options.closeOnClick&&this._addBodyHandler();this.options.trapFocus&&l.trapFocus(this.$element);this.$element.trigger("show.zf.dropdown",[this.$element])}},{key:"close",value:function close(){if(!this.$element.hasClass("is-open"))return false;this.$element.removeClass("is-open").attr({"aria-hidden":true});this.$anchors.removeClass("hover").attr("aria-expanded",false);this.$element.trigger("hide.zf.dropdown",[this.$element]);this.options.trapFocus&&l.releaseFocus(this.$element)}},{key:"toggle",value:function toggle(){if(this.$element.hasClass("is-open")){if(this.$anchors.data("hover"))return;this.close()}else this.open()}},{key:"_destroy",value:function _destroy(){this.$element.off(".zf.trigger").hide();this.$anchors.off(".zf.dropdown");e(document.body).off("click.zf.dropdown tap.zf.dropdown")}}]);return Dropdown}(R);D.defaults={
                public/assets/foundation-sites-ec9e5d7297119b9d170d725de4d511c146a14d23bee7c672baf3fcfd6f1697a5.js on lines 785..785

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

                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

                          }, d.prototype.attachmentDidChangeAttributes = function(t3) {
                            var e2;
                            return this.revision++, (e2 = this.delegate) != null && typeof e2.compositionDidEditAttachment == "function" ? e2.compositionDidEditAttachment(t3) : void 0;
                          }, d.prototype.attachmentDidChangePreviewURL = function(t3) {
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 4468..4471

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

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

                        }, r = {}.hasOwnProperty, s = [].indexOf || function(t3) {
                          for (var e2 = 0, n2 = this.length; n2 > e2; e2++)
                            if (e2 in this && this[e2] === t3)
                              return e2;
                          return -1;
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 891..896
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 1538..1543
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 1667..1672
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 1859..1864
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 2071..2076
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3464..3469
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3682..3687
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3880..3885
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 4834..4839
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 5177..5182

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

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

                        }, s = {}.hasOwnProperty, a = [].indexOf || function(t3) {
                          for (var e2 = 0, n2 = this.length; n2 > e2; e2++)
                            if (e2 in this && this[e2] === t3)
                              return e2;
                          return -1;
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 891..896
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 1538..1543
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 1667..1672
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 1859..1864
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3464..3469
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3616..3621
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3682..3687
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3880..3885
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 4834..4839
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 5177..5182

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

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

                        }, n = {}.hasOwnProperty, i = [].indexOf || function(t3) {
                          for (var e2 = 0, n2 = this.length; n2 > e2; e2++)
                            if (e2 in this && this[e2] === t3)
                              return e2;
                          return -1;
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 891..896
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 1667..1672
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 1859..1864
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 2071..2076
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3464..3469
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3616..3621
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3682..3687
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3880..3885
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 4834..4839
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 5177..5182

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

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

                        var t2, n, i, o, r, s = [].indexOf || function(t3) {
                          for (var e2 = 0, n2 = this.length; n2 > e2; e2++)
                            if (e2 in this && this[e2] === t3)
                              return e2;
                          return -1;
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 1538..1543
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 1667..1672
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 1859..1864
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 2071..2076
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3464..3469
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3616..3621
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3682..3687
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3880..3885
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 4834..4839
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 5177..5182

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

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

                        }, s = {}.hasOwnProperty, a = [].slice, u = [].indexOf || function(t3) {
                          for (var e2 = 0, n2 = this.length; n2 > e2; e2++)
                            if (e2 in this && this[e2] === t3)
                              return e2;
                          return -1;
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 891..896
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 1538..1543
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 1667..1672
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 1859..1864
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 2071..2076
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3464..3469
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3616..3621
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3682..3687
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 4834..4839
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 5177..5182

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

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

                        }, c = {}.hasOwnProperty, l = [].indexOf || function(t3) {
                          for (var e2 = 0, n2 = this.length; n2 > e2; e2++)
                            if (e2 in this && this[e2] === t3)
                              return e2;
                          return -1;
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 891..896
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 1538..1543
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 1859..1864
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 2071..2076
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3464..3469
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3616..3621
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3682..3687
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3880..3885
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 4834..4839
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 5177..5182

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

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

                        }, o = {}.hasOwnProperty, r = [].indexOf || function(t3) {
                          for (var e2 = 0, n2 = this.length; n2 > e2; e2++)
                            if (e2 in this && this[e2] === t3)
                              return e2;
                          return -1;
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 891..896
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 1538..1543
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 1667..1672
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 1859..1864
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 2071..2076
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3464..3469
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3616..3621
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3682..3687
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 3880..3885
                public/assets/trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js on lines 5177..5182

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

                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

                Severity
                Category
                Status
                Source
                Language