Showing 203 of 346 total issues
File foundation.reveal.js
has 285 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*jslint unparam: true, browser: true, indent: 2 */
;(function ($, window, document, undefined) {
'use strict';
Class Address
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Address < ApplicationRecord
belongs_to :state
belongs_to :country
belongs_to :address_type
Class ApplicationController
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class ApplicationController < ActionController::Base
protect_from_forgery
layout 'application'
helper_method :current_user,
Function datePicker
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
datePicker : function(s)
{
if (!$.event._dpCache) $.event._dpCache = [];
// initialise the date picker controller with the relevant settings...
Function show
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
show : function (init) {
var $timer = null;
// are we paused?
if (this.settings.$li === undefined
Function events
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
events : function () {
var self = this;
$(this.scope).on('arrival.fndtn.magellan', '[data-magellan-arrival]', function (e) {
var $destination = $(this),
$expedition = $destination.closest('[data-magellan-expedition]'),
Class Invoice
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Invoice < ApplicationRecord
include AASM
has_many :payments
has_many :batches, as: :batchable#, :polymorphic => true
File foundation.placeholder.js
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* The MIT License
*
* Copyright (c) 2012 James Allardice
*
Function append_custom_select
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
append_custom_select: function (idx, sel) {
var self = Foundation.libs.forms,
$this = $(sel),
$customSelect = $this.next('div.custom.dropdown'),
$customList = $customSelect.find('ul'),
Function ajax
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.ajax = function(options){
var settings = $.extend({}, options || {})
for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key]
ajaxStart(settings)
Function init
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
self.init = function() {
self.build_markup();
if (settings.timer) {timer = self.create_timer(); timer.start();}
animate = new FadeAnimation(settings, slides_container);
if (settings.animation === 'slide')
Function pos_default
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
pos_default : function (init, resizing) {
var half_fold = Math.ceil($(window).height() / 2),
tip_position = this.settings.$next_tip.offset(),
$nub = this.settings.$next_tip.find('.joyride-nub'),
nub_width = Math.ceil(this.outerWidth($nub) / 2),
Function cb
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function cb() {
if (cbInvoked)
return;
var ok = true;
Function init
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init : function (options) {
return this.each(function () {
var targets, tips, tipTemplate, poll;
Function winnow_results
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Chosen.prototype.winnow_results = function() {
var found, option, part, parts, regex, result, result_id, results, searchText, startpos, text, zregex, _i, _j, _len, _len2, _ref;
this.no_results_clear();
results = 0;
searchText = this.search_field.val() === this.default_text ? "" : $('<div/>').text($.trim(this.search_field.val())).html();
Class Referral
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Referral < ApplicationRecord
belongs_to :referring_user, :foreign_key => "referring_user_id", :class_name => "User"
belongs_to :referral_user, :foreign_key => "referral_user_id", :class_name => "User"
belongs_to :referral_program
belongs_to :referral_type
Class OrderItem
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class OrderItem < ApplicationRecord
include AASM
belongs_to :order
belongs_to :shipping_rate
Function events
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
events : function () {
var self = this;
$(this.scope)
.off('.fndtn.reveal')
Function expose
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
expose : function () {
var expose,
exposeCover,
el,
origCSS,
Function validate
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
validate: function( options ) {
// if nothing is selected, return nothing; can't chain anyway
if (!this.length) {
options && options.debug && window.console && console.warn( "nothing selected, can't validate, returning nothing" );