davidmigloz/go-bees

View on GitHub
app/src/main/java/com/davidmiguel/gobees/data/source/repository/GoBeesRepository.java

Summary

Maintainability
C
1 day
Test Coverage

GoBeesRepository has 36 methods (exceeds 20 allowed). Consider refactoring.
Open

@SuppressWarnings("WeakerAccess")
public class GoBeesRepository implements GoBeesDataSource {

    private static GoBeesRepository instance = null;

    File GoBeesRepository.java has 273 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * GoBees
     * Copyright (c) 2016 - 2017 David Miguel Lozano
     *
     * This program is free software: you can redistribute it and/or modify

      Method updateApiariesCurrentWeather has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          @SuppressWarnings("ConstantConditions")
          @Override
          public void updateApiariesCurrentWeather(final List<Apiary> apiariesToUpdate,
                                                   @NonNull final TaskCallback callback) {
              checkNotNull(callback);

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

            @SuppressWarnings("ConstantConditions")
            @Override
            public void updateApiariesCurrentWeather(final List<Apiary> apiariesToUpdate,
                                                     @NonNull final TaskCallback callback) {
                checkNotNull(callback);

        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 getRecording has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public void getRecording(long apiaryId, long hiveId, Date start, Date end,
                                     @NonNull GetRecordingCallback callback) {

          There are no issues that match your filters.

          Category
          Status