Showing 759 of 1,838 total issues
Function stepy
has 203 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
xoops_smallworld.fn.stepy = function (settings) {
if (this.length == 0) {
//debug('Selector invalid or missing!');
return;
Function _create
has 203 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
// Some browsers only repeat keydown events, not keypress events,
// so we use the suppressKeyPress flag to determine if we've already
// handled the keydown event. #7269
// Unfortunately the code for & in keypress is the same as the up arrow,
File jquery.bookmark.js
has 482 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* http://keith-wood.name/bookmark.html
Sharing bookmarks for jQuery v1.4.0.
Written by Keith Wood (kbwood{at}iinet.com.au) March 2008.
Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and
MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
File SwDatabase.php
has 455 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace XoopsModules\Smallworld;
/*
Function _generateHTML
has 171 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_generateHTML: function (inst) {
var today = new Date();
today = this._daylightSavingAdjust(
new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time
var isRTL = this._get(inst, 'isRTL');
Function _generateHTML
has 169 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_generateHTML: function(inst) {
var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
Method showUser
has 167 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function showUser($id)
{
global $arr04, $arr05;
$id = (int)$id;
if ($GLOBALS['xoopsUser'] && $GLOBALS['xoopsUser'] instanceof \XoopsUser) {
File jssocials.js
has 442 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*! jssocials - v1.5.0 - 2017-04-30
* http://js-socials.com
* Copyright (c) 2017 Artem Tabalin; Licensed MIT */
(function(window, $, undefined) {
File jquery.form.js
has 437 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery Form Plugin
* version: 2.43 (12-MAR-2010)
* @requires jQuery v1.3.2 or later
*
Function fileUpload
has 162 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function fileUpload() {
var form = $form[0];
if ($(':input[name=submit]', form).length) {
alert('Error: Form elements must not be named "submit".');
Function historyCheck
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
Open
historyCheck: function () {
// if ((xoops_smallworld.browser.msie) && (xoops_smallworld.browser.version < 8)) {
if (xoops_smallworld.browser.msie) {
// On IE, check for location.hash of iframe
var ihistory = xoops_smallworld("#xoops_smallworld_history")[0];
- 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 _create
has 158 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function () {
var self = this,
o = this.options;
this._keySliding = false;
Function size
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var effectSize = $.effects.effect.size = function( o, done ) {
// Create element
var original, baseline, factor,
el = $( this ),
Function parseDate
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parseDate: function (format, value, settings) {
if (format == null || value == null) {
throw "Invalid arguments";
}
Function position
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.position = function( options ) {
if ( !options || !options.of ) {
return _position.apply( this, arguments );
}
Function _create
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function () {
var self = this,
doc = this.element[0].ownerDocument,
suppressKeyPress;
File blocksadmin.php
has 406 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
* which is considered copyrighted (c) material of the original comment or credit authors.
UploadHandler
has 42 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class UploadHandler
{
protected $options;
// PHP File Upload error message codes:
Function _create
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function () {
// for handling static scoping inside callbacks
var that = this;
// There are 2 kinds of DOM nodes this widget can be instantiated on:
Method smallworld_includeScripts
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function smallworld_includeScripts()
{
/** @var \XoopsModules\Smallworld\Helper $helper */
$helper = Helper::getInstance();
$page = basename($_SERVER['PHP_SELF'], '.php');