fujaba/NetworkParser

View on GitHub
src/main/java/de/uniks/networkparser/ext/story/Task.java

Summary

Maintainability
C
1 day
Test Coverage

Task has 37 methods (exceeds 20 allowed). Consider refactoring.
Open

public class Task extends SendableItem {
    public static final String PROPERTY_COMPLEXITY = "complexity";

    private String complexity;

Severity: Minor
Found in src/main/java/de/uniks/networkparser/ext/story/Task.java - About 4 hrs to fix

    Method withUpdate has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        public Task withUpdate(LogEntry... value) {
            if (value == null) {
                return this;
            }
            for (LogEntry item : value) {
    Severity: Minor
    Found in src/main/java/de/uniks/networkparser/ext/story/Task.java - About 1 hr to fix

    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 withPart has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        public Task withPart(PartTask... value) {
            if (value == null) {
                return this;
            }
            for (PartTask item : value) {
    Severity: Minor
    Found in src/main/java/de/uniks/networkparser/ext/story/Task.java - About 1 hr to fix

    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 withoutPart has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        public Task withoutPart(PartTask... value) {
            if (value != null) {
                for (PartTask item : value) {
                    if (this.part != null && item != null) {
                        this.part.remove((Object) item);
    Severity: Minor
    Found in src/main/java/de/uniks/networkparser/ext/story/Task.java - About 35 mins to fix

    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 withoutUpdate has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        public Task withoutUpdate(LogEntry... value) {
            if (value != null) {
                for (LogEntry item : value) {
                    if (this.update != null && item != null) {
                        this.update.remove(item);
    Severity: Minor
    Found in src/main/java/de/uniks/networkparser/ext/story/Task.java - About 35 mins to fix

    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

    There are no issues that match your filters.

    Category
    Status