Showing 167 of 296 total issues
Function _destroy
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_destroy: function(root) {
Ergo.core.Widget.superclass._destroy.call(this);
var self = this;
Function _rerender
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_rerender: function(cascade, diff) {
var w = this;
var o = this.options;
Function _initialize
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_initialize: function(tag, widget, options, ns) {
var dom = this;
this._widget = widget;
Function _construct
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_construct: function(o) {
Ergo.core.Widget.superclass._construct.call(this, o);
var self = this;
Function _rebind
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_rebind: function(update, diff, initial) {
var o = this.options;
var self = this;
Function del
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
del: function(i) {
if(arguments.length == 1) {
this.entry(i).del();
}
else {
Function defineClass
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
E.defineClass = function(class_name, overrides, etype) {
var base_class;
// `extends` class property
Function select
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
select: function(item) {
var _el = this.el;//this.el.filter('.'+item.options.col);
if( item.options.col ) {
var elements = this.el.childNodes;
if(elements.length == 0) {
Function unformatObj
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
E.unformatObj = function(ufmt, s) {
var n=0;
var tmpl = ufmt.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
Function deepMerge
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
E.deepMerge = function(o) {
for(var j = 1; j < arguments.length; j++) {
var srcObj = arguments[j];
Function unset
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
unset: function(from, data) {
// Если состояние не установлено, то ничего не делаем
if(from && !(from in this._current)) {
return false;//$.when({});
- Read upRead up
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 _initialize
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
_initialize: function(src, id, o) {
/**
* Источник данных
- Read upRead up
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 _postConstruct
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_postConstruct: function(o) {
// this._super(o);
Ergo.core.Widget.superclass._postConstruct.call(this, o);
Function _postConstruct
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_postConstruct: function(o) {
if('events' in o){
for(var i in o.events){
Function unset
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
unset: function(from, data) {
// Если состояние не установлено, то ничего не делаем
if(from && !(from in this._current)) {
return false;//$.when({});
Function prop
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
prop: function(i, v, defaultValue) {
if(arguments.length == 1 || arguments.length == 3) {
if( this.options.get && (i in this.options.get) ) {
Function flush
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
flush: function() {
var oid = this.oid;
var composer = this.options.composer || this._compose;
Function _state_on
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_state_on: function(s, data) {
var self = this;
var states = this._states;//this._widget.options.states;
Function set
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
set: function(i, newValue) {
if(arguments.length == 1) {
newValue = i;
var oldValue = this.get();
Function formatObj
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
E.formatObj = function(format_str, obj) {
if(obj === null || obj === undefined) return '';
var m = format_str.match(/^{{([^}{]+?)}}$/);