Showing 205 of 353 total issues
Function _displayThumbs
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_displayThumbs: function() {
var self = this
, tw, th // thumb width/height
, cols
, num = 0 // number of simultaneously visible thumbs
Function JPEGHeaders
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
return function JPEGHeaders(data) {
var headers = [], read, idx, marker, length = 0;
read = new BinaryReader();
read.init(data);
Function send
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
send: function(meta, data) {
var target = this, I = target.getRuntime(), uid, form, input, blob;
_status = _response = null;
Function embed
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
embed: function(el) {
var self = this
, imgCopy
, type, quality, crop
, options = arguments[1] || {}
Function addInput
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addInput() {
var comp = this, I = comp.getRuntime(), shimContainer, browseButton, currForm, form, input, uid;
uid = Basic.guid('uid_');
Function _setOption
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _setOption(option, value, init) {
var oldValue = settings[option];
switch (option) {
case 'max_file_size':
Function settings
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
settings : function(name, value, resetObjects) {
var args = arguments;
var returnValue = value;
Function calculateMovingAverage
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
Open
SWFUpload.speed.calculateMovingAverage = function (history) {
var vals = [], size, sum = 0.0, mean = 0.0, varianceTemp = 0.0, variance = 0.0, standardDev = 0.0;
var i;
var mSum = 0, mCount = 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 Transporter
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Transporter() {
var mod, _runtime, _data, _size, _pos, _chunk_size;
RuntimeClient.call(this);
Function JPEG
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function JPEG(binstr) {
var _binstr, _br, _hm, _ep, _info, hasExif;
function _getDimensions() {
var idx = 0, marker, length;
Function Html5Runtime
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Html5Runtime(options) {
var I = this
, Test = Runtime.capTest
, True = Runtime.capTrue
;
Function extractTags
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function extractTags(IFD_offset, tags2extract) {
var length = data.SHORT(IFD_offset), i, ii,
tag, type, count, tagOffset, offset, value, values = [], hash = {};
for (i = 0; i < length; i++) {
Function exec
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function exec(runtime) {
_xhr.bind('LoadStart', function(e) {
_p('readyState', XMLHttpRequest.LOADING);
self.dispatchEvent('readystatechange');
Function init
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init: function(options) {
var comp = this, I = comp.getRuntime(), input, shimContainer, mimes, browseButton, zIndex, top;
_options = options;
_files = [];
Function addFile
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addFile : function(file, fileName) {
var self = this
, queue = []
, filesAdded = []
, ruid
Function version_compare
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function version_compare(v1, v2, operator) {
// From: http://phpjs.org/functions
// + original by: Philippe Jausions (http://pear.php.net/user/jausions)
// + original by: Aidan Lister (http://aidanlister.com/)
// + reimplemented by: Kankrelune (http://www.webfaktory.info/)
Function Blob
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Blob(ruid, blob) {
function _sliceDetached(start, end, type) {
var blob, data = blobpool[this.uid];
Function RuntimeClient
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
return function RuntimeClient() {
var runtime;
Basic.extend(this, {
/**
MultipleFileUpload
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class MultipleFileUpload extends UploadControl
{
/**
* Is files handle uploads called?
* @var bool
Function send
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
send: function(meta, data) {
var target = this, self = target.getRuntime();
function send() {
meta.transport = self.mode;