app/src/main/java/ch/epfl/sdp/appart/database/firestoreservicehelpers/FirestoreAdHelper.java
File FirestoreAdHelper.java
has 274 lines of code (exceeds 250 allowed). Consider refactoring. Open
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
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
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
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
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
Open
private CompletableFuture<Void> uploadCardFromReferences(Ad ad, DocumentReference adRef,
DocumentReference cardRef, StorageReference imagesRef,
String firstImageRef) {