Showing 25 of 25 total issues
Function getLogRects
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
public getLogRects(strMode?: any, strMessage?: any, strStackMethod?: string, strStackFile?: string): any {
/**
* Result log stack
*/
const arrResultLog = [];
- 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
File CSDebug.ts
has 441 lines of code (exceeds 250 allowed). Consider refactoring. Open
"use strict";
/**
* Import interface
*/
import ICSDebug from "../Interfaces/ICSDebug";
- Create a ticketCreate a ticket
Function write
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public write(mode: string, strMessage: any): void {
if (
mode &&
strMessage
) {
- 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 _warn
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public _warn(strMessage: any, ...AdditionalMessage: any[]) {
if (that) {
/**
* If use Debug, then call error method, or call default warn console method
*/
- 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 _error
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public _error(strMessage: any, ...AdditionalMessage: any[]) {
if (that) {
/**
* If use Debug, then call error method, or call default error console method
*/
- 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 _info
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public _info(strMessage: any, ...AdditionalMessage: any[]) {
if (that) {
/**
* If use Debug, then call error method, or call default info console method
*/
- 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 _debug
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public _debug(strMessage: any, ...AdditionalMessage: any[]) {
if (that) {
/**
* If use Debug, then call error method, or call default debug console method
*/
- 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 _log
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public _log(strMessage: any, ...AdditionalMessage: any[]) {
if (that) {
/**
* If use Debug, then call error method, or call default log console method
*/
- 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 getLogRects
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public getLogRects(strMode?: any, strMessage?: any, strStackMethod?: string, strStackFile?: string): any {
/**
* Result log stack
*/
const arrResultLog = [];
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if (typeof root !== "undefined") {
/**
* Save default window console methods
*/
this.console = {
- Create a ticketCreate a ticket
Function write
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
public write(mode: string, strMessage: any): void {
if (
mode &&
strMessage
) {
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if (
(
(typeof strStackMethod === "string" && strStackMethod) &&
typeof stack.method === "string" &&
stack.method.indexOf(strStackMethod) === -1
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if (
(
strMode === undefined ||
typeof strMode === "string"
) &&
- Create a ticketCreate a ticket
Function cloneObjectSafely
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static cloneObjectSafely(obj: any, deep: number): any {
const newObj = {};
if (deep < 2) {
for (let j = 0; j < obj.length; j++) {
const i = obj[j];
- 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 _debug
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public _debug(strMessage: any, ...AdditionalMessage: any[]) {
if (that) {
/**
* If use Debug, then call error method, or call default debug console method
*/
- Create a ticketCreate a ticket
Function _error
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public _error(strMessage: any, ...AdditionalMessage: any[]) {
if (that) {
/**
* If use Debug, then call error method, or call default error console method
*/
- Create a ticketCreate a ticket
Function _info
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public _info(strMessage: any, ...AdditionalMessage: any[]) {
if (that) {
/**
* If use Debug, then call error method, or call default info console method
*/
- Create a ticketCreate a ticket
Function _warn
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public _warn(strMessage: any, ...AdditionalMessage: any[]) {
if (that) {
/**
* If use Debug, then call error method, or call default warn console method
*/
- Create a ticketCreate a ticket
Function _log
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public _log(strMessage: any, ...AdditionalMessage: any[]) {
if (that) {
/**
* If use Debug, then call error method, or call default log console method
*/
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if (
(
(typeof strMode === "string" && strMode) &&
log.mode !== strMode
) ||
- Create a ticketCreate a ticket