kuasha/cosmos

View on GitHub
samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-php.js

Summary

Maintainability
F
1 yr
Test Coverage

File worker-php.js has 5784 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"no use strict";
;(function(window) {
if (typeof window.window != "undefined" && window.document) {
    return;
}

    Function Lexer has 685 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    PHP.Lexer = function( src, ini ) {
    
    
        var heredoc,
        lineBreaker = function( result ) {

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

      PHP.Parser = function ( preprocessedTokens, eval ) {
      
          var yybase = this.yybase,
          yydefault = this.yydefault,
          yycheck = this.yycheck,

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

                        func: function( result, token ) {
        
                            var curlyOpen = 0,
                            len,
                            bracketOpen = 0;

          Function onChange has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              this.onChange = function(e) {
                  var delta = e.data;
                  var range = delta.range;
          
                  if (range.start.row == range.end.row && range.start.row != this.row)

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

                    Array.prototype.splice = function(pos, removeCount){
                        var length = this.length;
                        if (pos > 0) {
                            if (pos > length)
                                pos = length;

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

              PHP.Parser.prototype.getNextToken = function( ) {
              
                  this.startAttributes = {};
                  this.endAttributes = {};
              
              

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

                window.define = function(id, deps, factory) {
                    if (arguments.length == 2) {
                        factory = deps;
                        if (typeof id != "string") {
                            deps = id;

                  Consider simplifying this complex logical expression.
                  Open

                              if (((yyn = yybase[ state ] + tokenId) >= 0
                                  && yyn < this.YYLAST && yycheck[ yyn ] === tokenId
                                  || (state < this.YY2TBLSTATE
                                      && (yyn = yybase[state + this.YYNLSTATES] + tokenId) >= 0
                                      && yyn < this.YYLAST

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

                        Array.prototype.reduce = function reduce(fun /*, initial*/) {
                            var object = toObject(this),
                                self = splitString && _toString(this) == "[object String]" ?
                                    this.split("") :
                                    object,

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

                          Object.defineProperty = function defineProperty(object, property, descriptor) {
                              if ((typeof object != "object" && typeof object != "function") || object === null)
                                  throw new TypeError(ERR_NON_OBJECT_TARGET + object);
                              if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
                                  throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);

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

                            Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
                                var object = toObject(this),
                                    self = splitString && _toString(this) == "[object String]" ?
                                        this.split("") :
                                        object,

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

                              Function.prototype.bind = function bind(that) { // .length is 1
                                  var target = this;
                                  if (typeof target != "function") {
                                      throw new TypeError("Function.prototype.bind called on incompatible " + target);
                                  }

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

                            PHP.Parser.prototype.parseEscapeSequences = function( str, quote ) {
                            
                            
                            
                                if (undefined !== quote) {

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

                              exports.delayedCall = function(fcn, defaultTimeout) {
                                  var timer = null;
                                  var callback = function() {
                                      timer = null;
                                      fcn();

                                Consider simplifying this complex logical expression.
                                Open

                                                        if ((yyn = yybase[ state ] + i) >= 0 && yyn < this.YYLAST && yycheck[ yyn ] == i
                                                         || state < this.YY2TBLSTATE
                                                            && (yyn = yybase[ state + this.YYNLSTATES] + i)
                                                            && yyn < this.YYLAST && yycheck[ yyn ] == i
                                                        ) {

                                  Avoid deeply nested control flow statements.
                                  Open

                                                                      if (match[3]) {
                                                                          results.push(match[3]);
                                                                      }

                                    Avoid deeply nested control flow statements.
                                    Open

                                                        if (yyn < this.YYNLSTATES)
                                                            continue;

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                      if ( token.value !== -1) {
                                                                          var resultString = result[ 0 ];
                                      
                                      
                                      
                                      

                                        Avoid deeply nested control flow statements.
                                        Open

                                                            if (expected.length) {
                                                                expectedString = ', expecting ' + expected.join(' or ');
                                                            }

                                          Avoid deeply nested control flow statements.
                                          Open

                                                          } else if (tailNewPos > tailOldPos) { // case B
                                                              for (i = tailCount; i--; ) {
                                                                  this[tailNewPos+i] = this[tailOldPos+i];
                                                              }
                                                          } // else, add == remove (nothing to do)

                                            Avoid deeply nested control flow statements.
                                            Open

                                                                for (i = 0; i < add; ++i) {
                                                                    this[pos+i] = insert[i];
                                                                }

                                              Avoid deeply nested control flow statements.
                                              Open

                                                                  for (var i = 0; i < tailCount; ++i) {
                                                                      this[tailNewPos+i] = this[tailOldPos+i];
                                                                  }

                                                Avoid deeply nested control flow statements.
                                                Open

                                                                if (end.column >= column)
                                                                    column = start.column;
                                                                else
                                                                    column = Math.max(0, column - (end.column - start.column));

                                                  Avoid deeply nested control flow statements.
                                                  Open

                                                                      for (var i = 0; i < this.TOKEN_MAP_SIZE; ++i) {
                                                                          if ((yyn = yybase[ state ] + i) >= 0 && yyn < this.YYLAST && yycheck[ yyn ] == i
                                                                           || state < this.YY2TBLSTATE
                                                                              && (yyn = yybase[ state + this.YYNLSTATES] + i)
                                                                              && yyn < this.YYLAST && yycheck[ yyn ] == i

                                                    Avoid deeply nested control flow statements.
                                                    Open

                                                                } else if (start.row !== end.row && start.row < row) {
                                                                    if (end.row === row)
                                                                        column = Math.max(0, column - end.column) + start.column;
                                                                    row -= (end.row - start.row);
                                                                } else if (end.row === row) {

                                                      Avoid deeply nested control flow statements.
                                                      Open

                                                                  if (start.row <= row) {
                                                                      if (end.row <= row)
                                                                          row -= end.row - start.row;
                                                                      else {
                                                                          row = start.row;

                                                        Avoid deeply nested control flow statements.
                                                        Open

                                                                                            if( match2 = match[0].match(/^[\[\]\;\:\?\(\)\!\.\,\>\<\=\+\-\/\*\|\&\{\}\@\^\%\$\~]/) ){
                                                                                                results.push(match2[0]);
                                                                                            }else{                                    
                                                                                                type = PHP.Constants.T_STRING;    
                                                                                            }

                                                          Avoid deeply nested control flow statements.
                                                          Open

                                                                                          if ( !Array.isArray( last ) || (last[ 0 ] !== PHP.Constants.T_WHITESPACE && last[ 0 ] !== PHP.Constants.T_OPEN_TAG  && last[ 0 ] !== PHP.Constants.T_COMMENT)) {
                                                                                              return false;
                                                                                          }

                                                            Function onerror has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                            Open

                                                            window.onerror = function(message, file, line, col, err) {

                                                              Avoid too many return statements within this function.
                                                              Open

                                                                              return 0;

                                                                Avoid too many return statements within this function.
                                                                Open

                                                                        return 0;

                                                                  Avoid too many return statements within this function.
                                                                  Open

                                                                              return column <= this.end.column ? 0 : 1;

                                                                    Avoid too many return statements within this function.
                                                                    Open

                                                                                    return 42;

                                                                      Avoid too many return statements within this function.
                                                                      Open

                                                                                      return -1;

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

                                                                        ace.define("ace/mode/php/php",["require","exports","module"], function(require, exports, module) {
                                                                        
                                                                        var PHP = {Constants:{}};
                                                                        
                                                                        
                                                                        
                                                                        samples/adminpanel/app/bower_components/ace-builds/src/worker-php.js on lines 1321..6192

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

                                                                        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

                                                                        ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
                                                                        
                                                                        function Empty() {}
                                                                        
                                                                        if (!Function.prototype.bind) {
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-coffee.js on lines 6894..7589
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-css.js on lines 7692..8387
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-html.js on lines 10822..11517
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-javascript.js on lines 9724..10419
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-json.js on lines 1613..2308
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-lua.js on lines 2849..3544

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

                                                                        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

                                                                        ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
                                                                        "use strict";
                                                                        
                                                                        var oop = require("./lib/oop");
                                                                        var EventEmitter = require("./lib/event_emitter").EventEmitter;
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-coffee.js on lines 726..1083
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-css.js on lines 913..1270
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-html.js on lines 913..1270
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-javascript.js on lines 726..1083
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-json.js on lines 726..1083
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-lua.js on lines 726..1083

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

                                                                        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

                                                                        ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
                                                                        "use strict";
                                                                        var comparePoints = function(p1, p2) {
                                                                            return p1.row - p2.row || p1.column - p2.column;
                                                                        };
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-coffee.js on lines 338..575
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-css.js on lines 525..762
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-html.js on lines 525..762
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-javascript.js on lines 338..575
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-json.js on lines 338..575
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-lua.js on lines 338..575

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

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

                                                                        ;(function(window) {
                                                                        if (typeof window.window != "undefined" && window.document) {
                                                                            return;
                                                                        }
                                                                        
                                                                        
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-coffee.js on lines 2..182
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-css.js on lines 2..182
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-html.js on lines 2..182
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-javascript.js on lines 2..182
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-json.js on lines 2..182
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-lua.js on lines 2..182
                                                                        samples/adminpanel/app/bower_components/ace-builds/src/worker-coffee.js on lines 2..182
                                                                        samples/adminpanel/app/bower_components/ace-builds/src/worker-css.js on lines 2..182
                                                                        samples/adminpanel/app/bower_components/ace-builds/src/worker-html.js on lines 2..182
                                                                        samples/adminpanel/app/bower_components/ace-builds/src/worker-javascript.js on lines 2..182
                                                                        samples/adminpanel/app/bower_components/ace-builds/src/worker-json.js on lines 2..182
                                                                        samples/adminpanel/app/bower_components/ace-builds/src/worker-lua.js on lines 2..182
                                                                        samples/adminpanel/app/bower_components/ace-builds/src/worker-php.js on lines 2..182

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

                                                                        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

                                                                        ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
                                                                        "use strict";
                                                                        
                                                                        var oop = require("./lib/oop");
                                                                        var EventEmitter = require("./lib/event_emitter").EventEmitter;
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-coffee.js on lines 577..724
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-css.js on lines 764..911
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-html.js on lines 764..911
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-javascript.js on lines 577..724
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-json.js on lines 577..724
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-lua.js on lines 577..724

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

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

                                                                        ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
                                                                        "use strict";
                                                                        
                                                                        exports.last = function(a) {
                                                                            return a[a.length - 1];
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-coffee.js on lines 1085..1270
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-css.js on lines 212..397
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-html.js on lines 212..397
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-javascript.js on lines 1085..1270
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-json.js on lines 1085..1270
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-lua.js on lines 1085..1270

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

                                                                        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

                                                                        ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
                                                                        "use strict";
                                                                        
                                                                        var EventEmitter = {};
                                                                        var stopPropagation = function() { this.propagationStopped = true; };
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-coffee.js on lines 212..336
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-css.js on lines 399..523
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-html.js on lines 399..523
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-javascript.js on lines 212..336
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-json.js on lines 212..336
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-lua.js on lines 212..336

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

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

                                                                        ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"], function(require, exports, module) {
                                                                        "use strict";
                                                                        
                                                                        var Document = require("../document").Document;
                                                                        var lang = require("../lib/lang");
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-coffee.js on lines 1272..1319
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-css.js on lines 1272..1319
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-html.js on lines 1272..1319
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-javascript.js on lines 1272..1319
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-json.js on lines 1272..1319
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-lua.js on lines 1272..1319

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

                                                                        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

                                                                        ace.define("ace/mode/php_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/php/php"], function(require, exports, module) {
                                                                        "use strict";
                                                                        
                                                                        var oop = require("../lib/oop");
                                                                        var Mirror = require("../worker/mirror").Mirror;
                                                                        samples/adminpanel/app/bower_components/ace-builds/src/worker-php.js on lines 6194..6240

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

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

                                                                        ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
                                                                        "use strict";
                                                                        
                                                                        exports.inherits = function(ctor, superCtor) {
                                                                            ctor.super_ = superCtor;
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-coffee.js on lines 184..210
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-css.js on lines 184..210
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-html.js on lines 184..210
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-javascript.js on lines 184..210
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-json.js on lines 184..210
                                                                        samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-lua.js on lines 184..210

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

                                                                        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