Showing 136 of 282 total issues
Avoid deeply nested control flow statements. Open
if (other && other.value === tile.value) {
return true; // These two tiles can be merged
}
Consider simplifying this complex logical expression. Open
if (t.getVariable("GAME_START_NOW") && !(t.debug && t.paused || "HOOK_NORMAL" !== S(t))) {
t.removeInstance("tutorial"), t.removeInstance("tutorial-arrow");
var e = t.getInstance("block_".concat(t.getVariable("BLOCK_COUNT")));
e && "SWING" === e.status && (t.setTimeMovement("HOOK_UP_MOVEMENT", 500), e.status = "BEFORE_DROP")
}
Consider simplifying this complex logical expression. Open
if (k.status >= 200 && k.status < 300 || 304 == k.status || 0 == k.status && "file:" == _) {
if (E = E || function (t) {
return t && (t = t.split(";", 2)[0]), t && ("text/html" == t ? "html" : "application/json" == t ? "json" : s.test(t) ? "script" : u.test(t) && "xml") || "text"
}(y.mimeType || k.getResponseHeader("content-type")), "arraybuffer" == k.responseType || "blob" == k.responseType) t = k.response; else {
t = k.responseText;
Consider simplifying this complex logical expression. Open
if (c) {
c.processing || (this.timeMovementStartArr.push(t), c.store[u] = [], e.forEach((function (t) {
c.store[u].push({start: parseFloat(t[0]), end: parseFloat(t[1])})
})), a && a());
var l = function () {
Function on
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
}, e.fn.on = function (t, n, o, s, u) {
Function p
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function p(t, e, n, i, r) {
Function m
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function m(t, e, n, i, r) {
Function is_localstorage
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
static is_localstorage(): boolean {
if (typeof localStorage !== 'undefined') {
try {
localStorage.setItem('feature_test', 'yes');
if (localStorage.getItem('feature_test') === 'yes') {
- 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 disableBroadcast
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public disableBroadcast() {
const $tv = this.getBroadcastVideo();
if ($('#tv-stream').length && typeof videojs('tv-stream') !== 'undefined') {
videojs('tv-stream').muted(true);
}
- 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 local
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
static local(key: string, value?: string, options?: StoreOptions): any {
if (!key) {
return false;
}
- 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 constructor
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
constructor(config) {
let onerror, scope = this;
this.canAccessError = this.isErrorAvailable();
this.configure(config);
- 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 arr;
Avoid too many return
statements within this function. Open
return '8';
Avoid too many return
statements within this function. Open
return '6';
Avoid too many return
statements within this function. Open
return getBlockVariation(game._theme.blocks[blockType], blockVariation);
Avoid too many return
statements within this function. Open
return '9';
Avoid too many return
statements within this function. Open
return parsedItem.value;
Avoid too many return
statements within this function. Open
return getBlockVariation(game._theme.complexBlocks[blockType], blockVariation);
Avoid too many return
statements within this function. Open
if (void 0 !== e) return n(e).find(t);
Avoid too many return
statements within this function. Open
return '5';