Showing 123 of 172 total issues
Function initFullCalendar
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
var initFullCalendar = function() {
var calendar = getCalendarEl();
var options = {
header: {
Function _setOption
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
_setOption: function(option, value) {
if(value != null){
switch(option) {
case "hidden":
if(value) {
Method destroy
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def destroy
@conversation.move_to_trash(@actor)
respond_to do |format|
- 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 STORE
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
PRESENCE.STORE = (function(P,$,undefined){
var init = function(){ }
var storePassword = function() {
- 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 prototype
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
SocialStream.Callback.prototype = (function(SS, $, undefined) {
var register = function() {
var callback = this,
funcs = Array.prototype.slice.call(arguments),
name = funcs.shift();
- 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 buildYoutubeVideoLink
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function buildYoutubeVideoLink(url){
//Get youtube video id
var youtube_video_id=url.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];
var youtube_api_url = "http://gdata.youtube.com/feeds/api/videos/" + youtube_video_id
Function loadPermissionList
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
var loadPermissionList = function(el) {
var radioInput = $(el);
var relVal = radioInput.val();
$('#permissions').find('.postit').hide();
Function SiteClient
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
SocialStream.SiteClient = (function(SS, $, undefined) {
var callback = new SS.Callback();
var initNewModal = function() {
$('.new_site_client-modal-link').attr('href', '#new_site_client-modal');
Method authorization
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def authorization(params)
case SocialStream::Presence.secure_rest_api
when true
#Authorization using asymmetric RSA keys
begin
Function Profile
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
SocialStream.Profile = (function(SS, $, undefined){
var callback = new SS.Callback();
var initEditButtons = function(options) {
$("#profile-info .update").filter(function(i, el) {
Method models
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def models(search_type, key = nil)
case search_type
when :quick
quick_search_models
when :extended
- 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 fill
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def fill linkser_object
self.title = linkser_object.title if linkser_object.title
self.description = linkser_object.description if linkser_object.description
self.url = linkser_object.last_url
r = linkser_object.resource
- 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 Action
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
SocialStream.Events.Action = (function(SS, $, undefined){
var animateCalendar = function(action) {
if (action.activity_object.type != "Event") {
return;
}
- 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 contact_actors
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def contact_actors(options = {})
subject_types = Array(options[:type] || self.class.subtypes)
subject_classes = subject_types.map{ |s| s.to_s.classify }
as = Actor.select('actors.*').
- 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 authorize_endpoint
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def authorize_endpoint(allow_approval = false)
Rack::OAuth2::Server::Authorize.new do |req, res|
@client = Site::Client.find(req.client_id) || req.bad_request!
res.redirect_uri = @redirect_uri = req.verify_redirect_uri!(@client.callback_url)
- 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 initialize
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def initialize(subject)
#Download alias action
alias_action :download, :to => :read
alias_action :original, :to => :read
- 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 find_profile_subject
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def find_profile_subject
SocialStream.profile_subject_keys.each do |type|
id = params["#{ type }_id"]
next if id.blank?
- 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 document_details_tab_class
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def document_details_tab_class(document, tab)
editing = document && document.errors.present?
case tab
when :edit
- 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 process_dirty_object
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def process_dirty_object(context,new_list)
value = new_list.is_a?(Array) ? new_list.join(', ') : new_list
attrib = "#{context.to_s.singularize}_list"
if changed_attributes.include?(attrib)
- 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 setRosterForBidirectionalTie
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def setRosterForBidirectionalTie(userASid,userBSid,userANick,userBNick,groupForA,groupForB)