app/Services/AdminStatsService.php
Method postsGraph
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
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)');
Method storage
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function storage()
{
return Cache::remember('admin:dashboard:storage:stats', 120000, function() {
$res = [];