SDPepe/AppArt

View on GitHub
app/src/main/java/ch/epfl/sdp/appart/database/firestoreservicehelpers/FirestoreAdHelper.java

Summary

Maintainability
B
5 hrs
Test Coverage
C
77%

File FirestoreAdHelper.java has 274 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package ch.epfl.sdp.appart.database.firestoreservicehelpers;

import android.net.Uri;
import android.util.Log;
import android.util.Pair;

    Method getAd has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        @NotNull
        @NonNull
        public CompletableFuture<Ad> getAd(String adId) {
            CompletableFuture<Ad> result = new CompletableFuture<>();
    
    

      Method getAndCheckPartialAd has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Invalid

          private CompletableFuture<Ad.AdBuilder> getAndCheckPartialAd(String adId) {
      
              CompletableFuture<Ad.AdBuilder> result = new CompletableFuture<>();
              db.collection(adsPath).document(adId).get().addOnCompleteListener(task -> {
                  if (task.isSuccessful()) {

        Method uploadAdFromReferences has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            private CompletableFuture<Void> uploadAdFromReferences(Ad ad, DocumentReference adRef,
                                       DocumentReference cardRef, StorageReference imagesRef,
                                       List<String> picturesReferences, List<String> panoramasReferences) {

          Method cleanUpIfFailed has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Wontfix

              private void cleanUpIfFailed(boolean taskSuccessful, CompletableFuture<Void> result, DocumentReference adRef,
                                           DocumentReference cardRef, StorageReference imagesRef) {

            Method uploadCardFromReferences has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                private CompletableFuture<Void> uploadCardFromReferences(Ad ad, DocumentReference adRef,
                                             DocumentReference cardRef, StorageReference imagesRef,
                                             String firstImageRef) {

              There are no issues that match your filters.

              Category
              Status