Showing 13 of 17 total issues
File FABridge.js
has 477 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
/*
Copyright 2006 Adobe Systems Incorporated
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
Function FABridge__bridgeInitialized
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
function FABridge__bridgeInitialized(bridgeName) {
var objects = document.getElementsByTagName("object");
var ol = objects.length;
var activeObjects = [];
if (ol > 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
prototype
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
{
// bootstrapping
Function FABridge__bridgeInitialized
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
function FABridge__bridgeInitialized(bridgeName) {
var objects = document.getElementsByTagName("object");
var ol = objects.length;
var activeObjects = [];
if (ol > 0) {
File web_socket.js
has 262 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Copyright: Hiroshi Ichikawa <http://gimite.net/en/>
// License: New BSD License
// Reference: http://dev.w3.org/html5/websockets/
// Reference: http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol
Function __createFlash
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
WebSocket.prototype.__createFlash = function(url, protocol, proxyHost, proxyPort, headers) {
var self = this;
self.__flash =
WebSocket.__flash.create(url, protocol, proxyHost || null, proxyPort || 0, headers || null);
Function deserialize
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
deserialize: function(packedValue)
{
var result;
- 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 deserialize
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
deserialize: function(packedValue)
{
var result;
Function __initialize
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
WebSocket.__initialize = function() {
if (WebSocket.__swfLocation) {
// For backword compatibility.
window.WEB_SOCKET_SWF_LOCATION = WebSocket.__swfLocation;
}
Function serialize
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
serialize: function(value)
{
var result = {};
var t = typeof(value);
Function serialize
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
serialize: function(value)
{
var result = {};
var t = typeof(value);
- 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 deeply nested control flow statements. Open
if (param.nodeType == 1 && param.tagName.toLowerCase() == "param" && param["name"].toLowerCase() == "flashvars" && param["value"].indexOf(searchStr) >= 0) {
FABridge.attachBridge(activeObjects[k], bridgeName);
flash_found = true;
break;
}
Function __createFlash
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
WebSocket.prototype.__createFlash = function(url, protocol, proxyHost, proxyPort, headers) {