Showing 205 of 353 total issues
Avoid deeply nested control flow statements. Open
if ($('#' + file.id)) {
swfuploadify.queueData.queueSize -= file.size;
swfuploadify.queueData.queueLength -= 1;
delete swfuploadify.queueData.files[file.id];
$('#' + file.id).fadeOut(500, function() {
Avoid deeply nested control flow statements. Open
if (o && typeof o.SetVariable != UNDEF) {
cbObj.success = true;
cbObj.ref = o;
}
Avoid deeply nested control flow statements. Open
if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
ac.appendChild(c[i].cloneNode(true));
}
Function _drawToCanvas
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function _drawToCanvas(img, canvas, x, y, w, h) {
Avoid deeply nested control flow statements. Open
if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
o.setAttribute("class", attObj[m]);
}
else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
o.setAttribute(m, attObj[m]);
Avoid deeply nested control flow statements. Open
if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
setVisibility(id, true);
if (cb) {
cbObj.success = true;
cbObj.ref = getObjectById(id);
Avoid deeply nested control flow statements. Open
if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
o.setAttribute("class", attObj[m]);
}
else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
o.setAttribute(m, attObj[m]);
Avoid deeply nested control flow statements. Open
if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
ac.appendChild(c[i].cloneNode(true));
}
Avoid deeply nested control flow statements. Open
if (i.toLowerCase() == "data") {
parObj.movie = attObj[i];
}
else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
att += ' class="' + attObj[i] + '"';
Avoid deeply nested control flow statements. Open
if (callback(obj[key], key) === false) {
return;
}
Avoid deeply nested control flow statements. Open
if (typeof(q) === OBJ_TYPE && q.length > 0) {
if (q.length == 2) {
if (typeof(q[1]) == FUNC_TYPE) {
// assign modified match
result[q[0]] = q[1].call(this, match);
Avoid deeply nested control flow statements. Open
if (/^(\d|[1-9]\d+)$/.test(value)) { // integer (make sure doesn't start with zero)
value = parseInt(value, 10);
} else if (/^\d*\.\d+$/.test(value)) { // double
value = parseFloat(value);
}
Function Runtime
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function Runtime(options, type, caps, modeCaps, preferredMode) {
Function open
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
open: function(method, url, async, user, password) {
Function processFiles
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function processFiles(array $files, array $names = [])
{
foreach ($files as $name => $controlValue) {
$names[] = $name;
- 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 initSettings
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
SWFUpload.prototype.initSettings = (function (oldInitSettings) {
return function (userSettings) {
if (typeof(oldInitSettings) === "function") {
oldInitSettings.call(this, userSettings);
}
- 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 extendFile
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
SWFUpload.speed.extendFile = function (file, trackingList) {
var tracking;
if (!file) {
return file;
- 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 initSettings
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
SWFUpload.prototype.initSettings = (function (oldInitSettings) {
return function (userSettings) {
if (typeof(oldInitSettings) === "function") {
oldInitSettings.call(this, userSettings);
}
- 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
Avoid too many return
statements within this function. Open
return Math.round(size / 1024) + " " + plupload.translate('kb');
Avoid too many return
statements within this function. Open
return size + " " + plupload.translate('b');