Showing 3,486 of 3,486 total issues
Function fillTo
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
fillTo : function(index, hover) {
if (index != -1) {
var addClass = hover ? 'ux-rating-star-hover' : 'ux-rating-star-on';
var removeClass = hover ? 'ux-rating-star-on' : 'ux-rating-star-hover';
- 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 right
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
right: function(e){
var btnIndex = this.component.items.findIndex('focused', 'true');
var nextIndex = btnIndex + 1 < this.component.items.length ? btnIndex + 1 : 0;
var item = this.component.items.get(nextIndex);
while(!item.btnEl)
- 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 sort
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
sort : function(fieldName, dir)
{
if (this.remoteSort) {
this.setActiveNode(null);
if (this.lastOptions) {
- 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 beforeLoad
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
beforeLoad : function(store, options)
{
var paramNames = this.getParams();
Ext.ux.maximgb.tg.PagingToolbar.superclass.beforeLoad.call(this, store, options);
- 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 ensureVisible
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
ensureVisible : function(row, col, hscroll)
{
var ancestors, record = this.ds.getAt(row);
if (!this.ds.isVisibleNode(record)) {
- 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 sort
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
sort : function(fieldName, dir)
{
if (this.remoteSort) {
this.setActiveNode(null);
if (this.lastOptions) {
- 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 left
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
left: function(e){
var btnIndex = this.component.items.findIndex('focused', 'true');
var nextIndex = btnIndex - 1 >= 0 ? btnIndex - 1 : this.component.items.length - 1;
var item = this.component.items.get(nextIndex);
while(!item.btnEl)
- 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 ensureVisible
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
ensureVisible : function(row, col, hscroll)
{
var ancestors, record = this.ds.getAt(row);
if (!this.ds.isVisibleNode(record)) {
- 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 onStripMouseDown
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
onStripMouseDown : function(e){
if(e.button !== 0){
return;
}
e.preventDefault();
- 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 constructor
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
constructor: function(config)
{
Ext.apply(this, config);
if(!Ext.isFunction(this.tab))
- 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 getTargetColumnIndex
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
getTargetColumnIndex: function(pt){
var grid = this.grid,
v = grid.view,
x = pt.left,
cms = grid.colModel.config,
- 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 handleAJAXLoad
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
handleAJAXLoad: function(el, success, response, options)
{
if(!success)
{
(new Ext.Window({title: 'Error', html: response.responseText})).show();
- 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 markupText
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
markupText: function(text, r){
var entities = r['entities'],
replacements = [],
out_text = '',
end_i;
- 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 mapReady
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
mapReady: function(){
dominoes('$(ext_extensions)/GMapStyledMarker.js', function(){
this.geocoder = new google.maps.Geocoder();
var opts = {
zoom: this.zoomLevel,
- 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 showTooltip
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
showTooltip: function(msg){
if (this.showToolTips !== true){
return;
}
var t = this.tooltip;
- 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
Method update_with_token
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def update_with_token
@alert_attempt = AlertAttempt.find_by_alert_id_and_token(@alert.id, params[:token])
@current_user = @alert_attempt.user
if @alert.respond_to?(:sensitive) && @alert.sensitive?
error = "That resource does not exist or you do not have access to it."
- 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
Method for_user
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.for_user(user)
user_id = user.class == User ? user.id : user
user = user.class == User ? user : User.find(user)
if user.is_super_admin?
self.scoped
- 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
Method accessible_to
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.accessible_to(result,user)
# if no audience is specified then this forum is open to anyone
# if a audience is specified for this forum, am I in the audeience?
if result.audience.nil?
forum = result
- 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
Method super_admin_in_texas_required
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def super_admin_in_texas_required
return true if current_user.is_sysadmin?
unless current_user.role_memberships.count(:conditions => {:role_id => Role.superadmins.map(&:id), :jurisdiction_id => Jurisdiction.find_by_name("Texas") }) > 0
message = "That resource does not exist or you do not have access to it."
if request.xhr?
- 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
Method included
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.included(base)
base.has_many :role_memberships, :include => [:jurisdiction, :role], :dependent => :delete_all
base.has_many :role_requests, :dependent => :delete_all, :include => [:jurisdiction, :role]
base.accepts_nested_attributes_for :role_requests, :organization_membership_requests
base.has_many :roles, :through => :role_memberships, :uniq => true
- 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"