pixelfed/pixelfed

View on GitHub
app/Services/CollectionService.php

Summary

Maintainability
A
1 hr
Test Coverage

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

    public static function getCollection($id)
    {
        $collection = Cache::remember(self::CACHE_KEY . 'get:' . $id, 86400, function() use($id) {
            $collection = Collection::find($id);
            if(!$collection) {
Severity: Minor
Found in app/Services/CollectionService.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

            return $collection;
    Severity: Major
    Found in app/Services/CollectionService.php - About 30 mins to fix

      There are no issues that match your filters.

      Category
      Status