Showing 59 of 59 total issues
Function getKeys
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static getKeys(checkSupport: boolean = true): string[] {
try {
/**
* Validate input data
*/
- 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 clear
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static clear(checkSupport: boolean = true): boolean {
try {
/**
* Validate input data
*/
- 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 getVersion
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public static getVersion(): string {
let os = System.getName();
let osVersion: any = "";
if (/Windows/.test(os)) {
- 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 isVisible
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static isVisible(domNode: HTMLElement,
booElement: boolean,
numDocumentWidth: number,
numDocumentHeight: number): boolean {
/**
- Create a ticketCreate a ticket
Function checkTotalVisibility
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static checkTotalVisibility(domBanner: HTMLElement): number {
/**
* Устанавливаем флаг видимости элемента
* Записываем элемент во временную переменную дял перебора по родителям
* Устанавливаем флаг соответствия элемента исходному
- Create a ticketCreate a ticket
Function getBoundingClientRect
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static getBoundingClientRect(domNode: any, domDocument: Document = document, showForce: boolean = false): {
bottom: number,
height: number,
left: number,
right: number,
- 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 easeInElastic
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static easeInElastic(t: number, b: number, c: number, d: number): number {
if (Easing.isValidParams(t, b, c, d)) {
let s = 1.70158;
let p = 0;
let a = c;
- 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 easeOutElastic
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static easeOutElastic(t: number, b: number, c: number, d: number): number {
if (Easing.isValidParams(t, b, c, d)) {
let s = 1.70158;
let p = 0;
let a = c;
- 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 getVersion
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static getVersion(): string {
let os = System.getName();
let osVersion: any = "";
if (/Windows/.test(os)) {
- Create a ticketCreate a ticket
Function getDOMNode
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static getDOMNode(domNode: any, domDocument: Document = document): Element | boolean {
/**
* Check if domDocument is a valid variable
*/
if (!DOM.isDOMDocument(domDocument)) {
- Create a ticketCreate a ticket
Function getItem
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static getItem(checkSupport: boolean = true,
key: string): string|boolean {
try {
/**
* Validate input data
- Create a ticketCreate a ticket
Function easeInOutElastic
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static easeInOutElastic(t: number, b: number, c: number, d: number): number {
if (Easing.isValidParams(t, b, c, d)) {
let s = 1.70158;
let p = 0;
let a = c;
- Create a ticketCreate a ticket
Function findElementPosition
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static findElementPosition(domNode: any, domDocument: Document = document, showForce: boolean = false) {
const objRet = {
left: 0,
top: 0,
};
- Create a ticketCreate a ticket
Function findElementPosition
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static findElementPosition(domNode: any, domDocument: Document = document, showForce: boolean = false) {
const objRet = {
left: 0,
top: 0,
};
- 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 getName
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static getName(): string {
let browser;
if (Browser.isOpera()) {
browser = "Opera";
} else if (Browser.isOperaNew()) {
- 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 getVersion
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static getVersion(): string {
let version;
if (Browser.isOpera()) {
version = Browser.getOperaVersion();
} else if (Browser.isOperaNew()) {
- 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 easeInOutExpo
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static easeInOutExpo(t: number, b: number, c: number, d: number): number {
if (Easing.isValidParams(t, b, c, d)) {
if (t === 0) {
return b;
}
- 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 removeItem
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static removeItem(checkSupport: boolean = true,
key: string): boolean {
try {
/**
* Validate input data
- 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
Avoid deeply nested control flow statements. Open
if (typeof realObject[method] === "undefined") {
realObject[method] = (...args) => {
if (
typeof staticClass !== "undefined"
- Create a ticketCreate a ticket
Function removeClassName
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static removeClassName(element: HTMLElement, className: string): HTMLElement {
if (
element &&
typeof element === "object" &&
typeof className === "string" &&
- 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"