Showing 180 of 222 total issues
Function resize
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
resize : function () {
var self = this;
self.S('[' + this.attr_name() + ']').each(function () {
var topbar = self.S(this),
settings = topbar.data(self.attr_name(true) + '-init');
Function adjust_pip
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
adjust_pip : function (dropdown, target, settings, position) {
var sheet = Foundation.stylesheet,
pip_offset_base = 8;
if (dropdown.hasClass(settings.mega_class)) {
Method leibfamilie
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def leibfamilie
familie = []
familie << {description: "", user: self}
if leibbursch
relationship = Relationship.where(user1: leibbursch, name: "Leibbursch", user2: self).first
Function resize
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
resize : function () {
var self = this;
self.S('[' + this.attr_name() + ']').each(function () {
var topbar = self.S(this),
settings = topbar.data(self.attr_name(true) + '-init');
Function adjust_pip
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
adjust_pip : function (dropdown, target, settings, position) {
var sheet = Foundation.stylesheet,
pip_offset_base = 8;
if (dropdown.hasClass(settings.mega_class)) {
Method import_primary_corporation_from
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def import_primary_corporation_from( netenv_user )
corporation = netenv_user.primary_corporation
if netenv_user.ehrenphilister?(corporation)
Method import_stifter_status_from
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def import_stifter_status_from( netenv_user )
netenv_user.corporations.each do |corporation|
date = netenv_user.beitrittsdatum(corporation)
date ||= self.membership_in(corporation).valid_from
if netenv_user.stifter?(corporation)
- 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 last_known_status_group_in
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def last_known_status_group_in( corporation )
status_name = last_known_status_in( corporation )
group_name = "Hospitanten" if status_name == "Hospitant"
group_name = "Kraßfuxen" if status_name == "Fux" || status_name == "Kraßfux"
- 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 create_from_dame
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def create_from_dame
raise 'Kein Auftrag zur Datenverarbeitung erteilt.' unless params[:privacy].present?
if params[:dame_type] == "Philister-Gattin"
damen_group = corporation.sub_group("Philister-Gattinnen") || raise("Für die Verbindung #{corporation.name} ist keine Gruppe 'Philister-Gattinnen' vorhanden.")
- 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 init
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
init : function (section, method, options) {
Foundation.inherit(this, 'add_custom_rule register_media throttle');
var self = this;
self.register_media('topbar', 'foundation-mq-topbar');
Function build_markup
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
self.build_markup = function () {
slides_container.wrap('<div class="' + settings.container_class + '"></div>');
container = slides_container.parent();
slides_container.addClass(settings.slides_container_class);
Function init
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
init : function (section, method, options) {
Foundation.inherit(this, 'add_custom_rule register_media throttle');
var self = this;
self.register_media('topbar', 'foundation-mq-topbar');
Function build_markup
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
self.build_markup = function () {
slides_container.wrap('<div class="' + settings.container_class + '"></div>');
container = slides_container.parent();
slides_container.addClass(settings.slides_container_class);
Function shift
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
shift : function (current, target, callback) {
var clearing = target.parent(),
old_index = this.settings.prev_index || target.index(),
direction = this.direction(clearing, current, target),
dir = this.rtl ? 'right' : 'left',
Function shift
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
shift : function (current, target, callback) {
var clearing = target.parent(),
old_index = this.settings.prev_index || target.index(),
direction = this.direction(clearing, current, target),
dir = this.rtl ? 'right' : 'left',
Function interpret_keyup_action
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
interpret_keyup_action = function (e) {
// Light modification of Heydon Pickering's Practical ARIA Examples: http://heydonworks.com/practical_aria_examples/js/a11y.js
// define current, previous and next (possible) tabs
Function interpret_keyup_action
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
interpret_keyup_action = function (e) {
// Light modification of Heydon Pickering's Practical ARIA Examples: http://heydonworks.com/practical_aria_examples/js/a11y.js
// define current, previous and next (possible) tabs
Function valid_radio
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
valid_radio : function (el, required) {
var name = el.getAttribute('name'),
group = this.S(el).closest('[data-' + this.attr_name(true) + ']').find("[name='" + name + "']"),
count = group.length,
valid = false,
Method fill_info
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
def fill_info
super
self.anzahl_aktivmeldungen = number_of_new_members
self.anzahl_aller_aktiven = corporation.aktivitas.memberships.at_time(end_of_term).count
self.anzahl_burschungen = anzahl_neue BURSCHEN_GROUP_NAMES
Function pos_phone
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
pos_phone : function (init) {
var tip_height = this.settings.$next_tip.outerHeight(),
tip_offset = this.settings.$next_tip.offset(),
target_height = this.settings.$target.outerHeight(),
$nub = $('.joyride-nub', this.settings.$next_tip),