Showing 759 of 1,838 total issues
File tag-it.js
has 398 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* jQuery UI Tag-it!
*
* @version v2.0 (06/2011)
*
Function embedCode
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
function embedCode(container, externalUrl, embedProvider) {
if (xoops_smallworld('#jqoembeddata').data(externalUrl) != undefined && embedProvider.embedtag.tag != 'iframe') {
var oembedData = {code: xoops_smallworld('#jqoembeddata').data(externalUrl)};
success(oembedData, externalUrl, container);
} else if (embedProvider.yql) {
Function _create
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
var n, i, handle, axis, hname,
that = this,
o = this.options;
Function Callbacks
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.Callbacks = function( options ) {
// Convert options from String-formatted to Object-formatted if needed
// (we check in cache first)
options = typeof options === "string" ?
Function md5
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
String.prototype.md5 = function () {
var a = function (a, b) {
var c = (a & 65535) + (b & 65535);
var d = (a >> 16) + (b >> 16) + (c >> 16);
return d << 16 | c & 65535
Method sendMails
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function sendMails($fromUserId, $toUserId, $event, $link, array $data)
{
$date = date('m-d-Y H:i:s', time());
$mail = new \XoopsMultiMailer();
$wall = new WallUpdates();
Function prep
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
publicMethod.prep = function (object) {
if (!open) {
return;
}
Consider simplifying this complex logical expression. Open
if ( event.pageX == null && original.clientX != null ) {
eventDoc = event.target.ownerDocument || document;
doc = eventDoc.documentElement;
body = eventDoc.body;
Function fetchURL
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function fetchURL($url, $methods = ['fopen', 'curl', 'socket'])
{
/**
* December 21st 2010, Mathew Tinsley (tinsley@tinsology.net)
* http://tinsology.net
- 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 handle_file_upload
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
protected function handle_file_upload(
$uploaded_file,
$name,
$size,
$type,
- 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 parseDate
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
parseDate: function (format, value, settings) {
if (format == null || value == null)
throw 'Invalid arguments';
value = (typeof value == 'object' ? value.toString() : value + '');
if (value == '')
File bootstrap-image-gallery.js
has 362 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Bootstrap Image Gallery 2.10
* https://github.com/blueimp/Bootstrap-Image-Gallery
*
* Copyright 2011, Sebastian Tschan
Function _create
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
this.element.closest( "form" )
.unbind( "reset" + this.eventNamespace )
.bind( "reset" + this.eventNamespace, formResetHandler );
Function position
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.position = function (options) {
if (!options || !options.of) {
return _position.apply(this, arguments);
}
Function _create
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function () {
this.element.closest("form")
.unbind("reset.button")
.bind("reset.button", formResetHandler);
File WallUpdates.php
has 348 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace XoopsModules\Smallworld;
/**
Function apprise
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
function apprise(string, args, callback) {
var default_args =
{
'confirm': false, // Ok and Cancel buttons
'verify': false, // Yes and No buttons
File ajaxupload.3.5.js
has 344 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Ajax upload
* Project page - http://valums.com/ajax-upload/
* Copyright (c) 2008 Andris Valums, http://valums.com
* Licensed under the MIT license (http://valums.com/mit-license/)
Function apprise
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
function apprise(string, args, callback) {
var default_args =
{
'confirm': false, // Ok and Cancel buttons
'verify': false, // Yes and No buttons
- 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 uaMatch
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
function uaMatch( ua ) {
// If an UA is not provided, default to the current browser UA.
if ( ua === undefined ) {
ua = window.navigator.userAgent;
}