Showing 11 of 13 total issues
File UserID.ts
has 411 lines of code (exceeds 250 allowed). Consider refactoring. Open
"use strict";
/**
* Import interfaces
*/
import IWindow from "../interfaces/IWindow";
- Create a ticketCreate a ticket
Function each
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public static each(obj, iterator, context) {
if (obj === null) {
return;
}
if (Array.prototype.forEach && obj.forEach === Array.prototype.forEach) {
- Read upRead up
- Create a ticketCreate a ticket
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 getIEPlugins
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public getIEPlugins(): any[] {
try {
let arrResult = [];
/**
* If ActiveXObject supported
- Create a ticketCreate a ticket
Function getRegularPlugins
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public getRegularPlugins() {
try {
/**
* Plugins list
* @type {Array}
- Create a ticketCreate a ticket
Function getIPFromRTC
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public getIPFromRTC(callback) {
try {
window.RTCPeerConnection = (
window.RTCPeerConnection ||
window.mozRTCPeerConnection ||
- Create a ticketCreate a ticket
Function getIPFromServer
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public getIPFromServer(callback) {
try {
if (
this.Settings &&
this.Settings.IPUrl
- Read upRead up
- Create a ticketCreate a ticket
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 getIP
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public getIP(callback) {
try {
if (
this.Settings &&
this.Settings.IPUrl
- Create a ticketCreate a ticket
Function getIPFromServer
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public getIPFromServer(callback) {
try {
if (
this.Settings &&
this.Settings.IPUrl
- Create a ticketCreate a ticket
Function constructor
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(settings: any = {}) {
/**
* Clear previous version of FingerPrint
*/
UserID.clearPrevious();
- Create a ticketCreate a ticket
Function getIPFromRTC
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public getIPFromRTC(callback) {
try {
window.RTCPeerConnection = (
window.RTCPeerConnection ||
window.mozRTCPeerConnection ||
- Read upRead up
- Create a ticketCreate a ticket
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 clearPrevious
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static clearPrevious() {
/**
* Check if localStorage is supported
*/
if (typeof localStorage !== "undefined") {
- Read upRead up
- Create a ticketCreate a ticket
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"