Showing 135 of 334 total issues
Function _normalizeArguments
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _normalizeArguments(effect, options, speed, callback) {
// allow passing all options as the first parameter
if ($.isPlainObject(effect)) {
options = effect;
Function _refreshItems
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_refreshItems: function (event) {
this.items = [];
this.containers = [this];
Function left
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
left: function (position, data) {
var within = data.within,
withinOffset = within.offset.left + within.scrollLeft,
outerWidth = within.width,
offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
Function HoverListener
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function HoverListener(coordinateGrid) {
var t = this;
var bindType;
Function calendar
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
var calendar = function () {
// page is now ready, initialize the calendar...
var current_room = function () {
return window.location.href.match(/rooms\/(\d+)\/viewings/)[1];
};
- 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 getBaseline
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getBaseline: function (origin, original) {
var y, x;
switch (origin[0]) {
case "top":
y = 0;
Function _drop
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_drop: function (event, custom) {
var draggable = custom || $.ui.ddmanager.current,
childrenIntersection = false;
Function option
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
option: function (key, value) {
var options = key,
parts,
curOption,
i;
Function to
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
spaces.hsla.to = function (rgba) {
if (rgba[0] == null || rgba[1] == null || rgba[2] == null) {
return [null, null, null, rgba[3]];
}
var r = rgba[0] / 255,
Function drag
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
drag: function (ev, ui) {
// NOTE: this `cell` value is only useful for determining in-bounds and all-day.
// Bad for anything else due to the discrepancy between the mouse position and the
// element position while snapping. (problem revealed in PR #55)
Function AgendaWeekView
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function AgendaWeekView(element, calendar) {
var t = this;
// exports
Function BasicWeekView
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function BasicWeekView(element, calendar) {
var t = this;
// exports
Function refreshPositions
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
refreshPositions: function (fast) {
//This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
if (this.offsetParent && this.helper) {
this.offset.parent = this._getParentOffset();
Function transition
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
transition: function (other, distance) {
var end = color(other),
spaceName = end._space(),
space = spaces[spaceName],
startColor = this.alpha() === 0 ? color("transparent") : this,
Function complete
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
complete: function () {
if (el.to.opacity === 0) {
el.css("opacity", el.from.opacity);
}
if (mode === "hide") {
Function slotSelectionMousedown
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function slotSelectionMousedown(ev) {
if (ev.which == 1 && opt('selectable')) { // ev.which==1 means left mouse button
unselect(ev);
var dates;
hoverListener.start(function (cell, origCell) {
Function transfer
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.effects.effect.transfer = function (o, done) {
var elem = $(this),
target = $(o.to),
targetFixed = target.css("position") === "fixed",
body = $("body"),
Function resize
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
resize: function (event, ui) {
var that = $(this).data("ui-resizable"),
o = that.options,
os = that.originalSize,
op = that.originalPosition,
Function rangeToSegments
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function rangeToSegments(startDate, endDate) {
var rowCnt = t.getRowCnt();
var colCnt = t.getColCnt();
var segments = []; // array of segments to return
Function puff
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.effects.effect.puff = function (o, done) {
var elem = $(this),
mode = $.effects.setMode(elem, o.mode || "hide"),
hide = mode === "hide",
percent = parseInt(o.percent, 10) || 150,