pixelfed/pixelfed

View on GitHub
app/Services/AdminStatsService.php

Summary

Maintainability
A
2 hrs
Test Coverage

Method postsGraph has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected static function postsGraph()
    {
        $ttl = now()->addHours(12);
        return Cache::remember('admin:dashboard:home:data-postsGraph:v0.1:24hr', $ttl, function() {
            $gb = config('database.default') == 'pgsql' ? ['statuses.id', 'created_at'] : DB::raw('Date(created_at)');
Severity: Minor
Found in app/Services/AdminStatsService.php - About 1 hr to fix

    Method storage has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function storage()
        {
            return Cache::remember('admin:dashboard:storage:stats', 120000, function() {
                $res = [];
    
    
    Severity: Minor
    Found in app/Services/AdminStatsService.php - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status