Showing 759 of 1,838 total issues
Function size
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.effects.size = function (o) {
return this.queue(function () {
// Create element
Method parsePubArray
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function parsePubArray($updatesarray, $id)
{
/**
* @var \XoopsModules\Smallworld\Helper $helper
* @var \XoopsModules\Smallworld\SwUserHandler $swUserHandler
Function _doKeyDown
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
_doKeyDown: function(event) {
var onSelect, dateStr, sel,
inst = $.datepicker._getInst(event.target),
handled = true,
isRTL = inst.dpDiv.is(".ui-datepicker-rtl");
Function Animation
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Animation( elem, properties, options ) {
var result,
stopped,
index = 0,
length = animationPrefilters.length,
Consider simplifying this complex logical expression. Open
if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
(t == 'checkbox' || t == 'radio') && !el.checked ||
(t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
tag == 'select' && el.selectedIndex == -1))
return null;
Function smallworld_DoValStart
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
function smallworld_DoValStart() {
xoops_smallworld(document).ready(function () {
// Attact validation to registeration parts in register form
if (smallworldvalidationstrength != 0) {
xoops_smallworld("#smallworld_profileform-next-0").hide();
Function _chunkedUpload
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
_chunkedUpload: function (options, testOnly) {
var that = this,
file = options.files[0],
fs = file.size,
ub = options.uploadedBytes = options.uploadedBytes || 0,
Function send
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
send: function (_, completeCallback) {
form = $('<form style="display:none;"></form>');
form.attr('accept-charset', options.formAcceptCharset);
addParamChar = /\?/.test(options.url) ? '&' : '?';
// XDomainRequest only supports GET and POST:
Function _toggle
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
_toggle: function (toShow, toHide, data, clickedIsActive, down) {
var self = this,
options = self.options;
self.toShow = toShow;
Function smallworld_remDir
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function smallworld_remDir($userid, $directory, $empty = false)
{
if ('' != $userid) {
if ('/' === mb_substr($directory, -1)) {
$directory = mb_substr($directory, 0, -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 smallworld_remDir
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function smallworld_remDir($userid, $directory, $empty = false)
{
//@todo verify $userid should be int and then sanitize $userid accordingly before
// executing this routine
if (!empty($userid)) {
- 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 validate
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
xoops_smallworld.fn.validate = function (options) {
options = xoops_smallworld.extend({
expression: "return true;",
message: "",
error_class: "ValidationErrors",
Function h
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
var h = function (b) {
var c, h, i, j, k, l = b.length;
var m = 1732584193;
var n = -271733879;
var o = -1732584194;
Function formatDate
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
formatDate: function (format, date, settings) {
if (!date) {
return "";
}
File Admin.php
has 298 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace XoopsModules\Smallworld;
/**
Function _clear
has 78 lines of code (exceeds 25 allowed). Consider refactoring. 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 topratedusers
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function topratedusers($direction)
{
$array = [];
if ('up' === $direction) {
- 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 parsePubArray
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function parsePubArray($updatesarray, $id)
{
/**
* @var \XoopsModules\Smallworld\Helper $helper
* @var \XoopsModules\Smallworld\SwUserHandler $swUserHandler
- 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 parsePubArray
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function parsePubArray($updatesarray, $id)
{
/**
* @var \XoopsModules\Smallworld\Helper $helper
* @var \XoopsModules\Smallworld\SwUserHandler $swUserHandler
- 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 array_to_json
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
function array_to_json($array)
{
if (!is_array($array)) {
return false;
}
- 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"