app/assets/javascripts/ext/src/widgets/MessageBox.js
Function MessageBox
has a Cognitive Complexity of 92 (exceeds 5 allowed). Consider refactoring. Open
Open
Ext.MessageBox = function(){
var dlg, opt, mask, waitTimer,
bodyEl, msgEl, textboxEl, textareaEl, progressBar, pp, iconEl, spacerEl,
buttons, activeTextEl, bwidth, bufferIcon = '', iconCls = '',
buttonNames = ['ok', 'yes', 'no', 'cancel'];
- 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 MessageBox
has 338 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Ext.MessageBox = function(){
var dlg, opt, mask, waitTimer,
bodyEl, msgEl, textboxEl, textareaEl, progressBar, pp, iconEl, spacerEl,
buttons, activeTextEl, bwidth, bufferIcon = '', iconCls = '',
buttonNames = ['ok', 'yes', 'no', 'cancel'];
File MessageBox.js
has 341 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* Ext JS Library 3.3.0
* Copyright(c) 2006-2010 Ext JS, Inc.
* licensing@extjs.com
* http://www.extjs.com/license
Function show
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
show : function(options){
if(this.isVisible()){
this.hide();
}
opt = options;
Function getDialog
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getDialog : function(titleText){
if(!dlg){
var btns = [];
buttons = {};
Function prompt
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
prompt : function(title, msg, fn, scope, multiline, value){