File Field.js
has 371 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Ext JS Library 3.3.0
* Copyright(c) 2006-2010 Ext JS, Inc.
* licensing@extjs.com
* http://www.extjs.com/license
Field
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
Ext.form.Field = Ext.extend(Ext.BoxComponent, {
/**
* <p>The label Element associated with this Field. <b>Only available after this Field has been rendered by a
* {@link form Ext.layout.FormLayout} layout manager.</b></p>
* @type Ext.Element
Function onRender
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
onRender : function(ct, position){
if(!this.el){
var cfg = this.getAutoCreate();
if(!cfg.name){
- 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 onRender
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
onRender : function(ct, position){
if(!this.el){
var cfg = this.getAutoCreate();
if(!cfg.name){
Function markInvalid
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
markInvalid : function(msg){
//don't set the error icon if we're not rendered or marking is prevented
if (this.rendered && !this.preventMark) {
msg = msg || this.invalidText;
- 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 clearInvalid
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
clearInvalid : function(){
//don't remove the error icon if we're not rendered or marking is prevented
if (this.rendered && !this.preventMark) {
this.el.removeClass(this.invalidClass);
var mt = this.getMessageHandler();
- 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"