Showing 759 of 1,838 total issues
Function _refresh
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_refresh: function() {
var maxHeight,
options = this.options,
heightStyle = options.heightStyle,
parent = this.element.parent();
Function drag
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
drag: function( event, ui, draggable ) {
$.each( draggable.sortables, function() {
var innermostIntersecting = false,
sortable = this;
Function Datepicker
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Datepicker() {
this._curInst = null; // The current instance in use
this._keyEvent = false; // If the last event was a key event
this._disabledInputs = []; // List of date picker inputs that have been disabled
this._datepickerShowing = false; // True if the popup picker is showing , false if not
Function _mouseDrag
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseDrag: function (event) {
var self = this;
this.dragged = true;
if (this.options.disabled)
Function _mouseStart
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseStart: function(event, overrideHandle, noActivation) {
var i, body,
o = this.options;
Function _mouseDrag
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseDrag: function(event) {
var i, item, itemElement, intersection,
o = this.options,
scrolled = false;
Function _updateBookmark
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_updateBookmark: function(target, settings) {
var oldSettings = $.data(target[0], PROP_NAME) || $.extend({}, this._defaults);
settings = extendRemove(oldSettings, settings || {});
$.data(target[0], PROP_NAME, settings);
var sites = settings.sites;
Consider simplifying this complex logical expression. Open
Open
if (document.documentElement["getBoundingClientRect"]) {
// Get Offset using getBoundingClientRect
// http://ejohn.org/blog/getboundingclientrect-is-awesome/
var getOffset = function (el) {
var box = el.getBoundingClientRect(),
Function Sizzle
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Sizzle( selector, context, results, seed ) {
var match, elem, m, nodeType,
// QSA vars
i, groups, old, nid, newContext, newSelector;
Function resize
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
resize: function( event ) {
var woset, hoset, isParent, isOffsetRelative,
that = $( this ).resizable( "instance" ),
o = that.options,
co = that.containerOffset,
Function _mouseDrag
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseDrag: function(event) {
this.dragged = true;
if (this.options.disabled) {
Function buildFragment
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
buildFragment: function( elems, context, scripts, selection ) {
var j, elem, contains,
tmp, tag, tbody, wrap,
l = elems.length,
Function _doKeyDown
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_doKeyDown: function (event) {
var inst = $.datepicker._getInst(event.target);
var handled = true;
var isRTL = inst.dpDiv.is('.ui-datepicker-rtl');
inst._keyEvent = true;
Function Datepicker
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Datepicker() {
this.debug = false; // Change this to true to start debugging
this._curInst = null; // The current instance in use
this._keyEvent = false; // If the last event was a key event
this._disabledInputs = []; // List of date picker inputs that have been disabled
Function widget
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.widget = function( name, base, prototype ) {
var fullName, existingConstructor, constructor, basePrototype,
// proxiedPrototype allows the provided prototype to remain unmodified
// so that it can be used as a mixin for multiple widgets (#8876)
proxiedPrototype = {},
Function _clear
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_clear: function(event, noPropagation) {
this.reverting = false;
// We delay all events that have to be triggered to after the point where the placeholder has been removed and
// everything else normalized again
Function add
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
add: function( elem, types, handler, data, selector ) {
var tmp, events, t, handleObjIn,
special, eventHandle, handleObj,
handlers, type, namespaces, origType,
elemData = jQuery._data( elem );
Function checkVerModule
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
Open
public static function checkVerModule($helper, $source = 'github', $default = 'master')
{
$moduleDirName = basename(dirname(dirname(__DIR__)));
$moduleDirNameUpper = mb_strtoupper($moduleDirName);
$update = '';
- 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 smallworld_search
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
Open
function smallworld_search($queryarray, $andor, $limit, $offset, $userid, $sortby = 'created DESC')
{
$moduleDirName = basename(dirname(__DIR__));
if (file_exists(XOOPS_ROOT_PATH . '/modules/smallworld/language/' . $GLOBALS['xoopsConfig']['language'] . '/main.php')) {
- 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 createTag
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createTag: function (value, additionalClass, duringInitialization) {
var that = this;
value = $.trim(value);