MaazAli/phanime

View on GitHub
server/methods/calculateAnimeRatingById.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function calculateAnimeRatingById has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    calculateAnimeRatingById: function(animeId) {
        // Get all the library entries for an anime
        // We only need the rating and episodes seen fields
        var libraryEntries = LibraryEntries.find({animeId: animeId}, {fields: {status: 1, rating: 1, episodesSeen: 1}});
        var ratingCounts = {
Severity: Major
Found in server/methods/calculateAnimeRatingById.js - About 2 hrs to fix

    There are no issues that match your filters.

    Category
    Status