src/main/java/de/uniks/networkparser/gui/TileMap.java
Method getValue
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
Open
@Override
public Object getValue(Object entity, String attribute) {
if (entity instanceof TileMap == false) {
return null;
}
- 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
Method setValue
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
Open
@Override
public boolean setValue(Object entity, String attribute, Object value, String type) {
if (entity instanceof TileMap == false) {
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
Method setValue
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Override
public boolean setValue(Object entity, String attribute, Object value, String type) {
if (entity instanceof TileMap == false) {
return false;
}
Method getValue
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Override
public Object getValue(Object entity, String attribute) {
if (entity instanceof TileMap == false) {
return null;
}
File TileMap.java
has 302 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
package de.uniks.networkparser.gui;
/*
The MIT License
Avoid deeply nested control flow statements. Open
Open
if (text.charAt(i) != ',') {
i++;
continue;
}
Avoid too many return
statements within this method. Open
Open
return null;
Avoid too many return
statements within this method. Open
Open
return null;
Avoid too many return
statements within this method. Open
Open
return true;
Avoid too many return
statements within this method. Open
Open
return false;
Avoid too many return
statements within this method. Open
Open
return map.images.first().height;
Avoid too many return
statements within this method. Open
Open
return true;
Avoid too many return
statements within this method. Open
Open
return map.images.first().width;
Avoid too many return
statements within this method. Open
Open
return null;
Avoid too many return
statements within this method. Open
Open
return layer;
Avoid too many return
statements within this method. Open
Open
return true;
Avoid too many return
statements within this method. Open
Open
return map.tileheight;
Avoid too many return
statements within this method. Open
Open
return null;
Avoid too many return
statements within this method. Open
Open
return true;
Avoid too many return
statements within this method. Open
Open
return true;
Avoid too many return
statements within this method. Open
Open
return map.images.first().name;
Avoid too many return
statements within this method. Open
Open
return true;
Avoid too many return
statements within this method. Open
Open
return true;
Avoid too many return
statements within this method. Open
Open
return tileset;
Avoid too many return
statements within this method. Open
Open
return null;
Avoid too many return
statements within this method. Open
Open
return map.height;
Avoid too many return
statements within this method. Open
Open
return map.tilewidth;
Avoid too many return
statements within this method. Open
Open
return map.width;
Avoid too many return
statements within this method. Open
Open
return null;