diff --git a/app/Http/Controllers/Admin/AdminPageController.php b/app/Http/Controllers/Admin/AdminPageController.php index dd09f7cb2..b3c65efc3 100644 --- a/app/Http/Controllers/Admin/AdminPageController.php +++ b/app/Http/Controllers/Admin/AdminPageController.php @@ -41,8 +41,6 @@ class AdminPageController extends BasePageController /** * Get default dashboard statistics - * - * @return array */ protected function getDefaultStats(): array { @@ -62,8 +60,6 @@ class AdminPageController extends BasePageController /** * Get disk space information - * - * @return string */ protected function getDiskSpace(): string { @@ -75,7 +71,7 @@ class AdminPageController extends BasePageController $bytes /= 1024; } - return round($bytes, 2) . ' ' . $units[$i]; + return round($bytes, 2).' '.$units[$i]; } catch (\Exception $e) { return 'N/A'; } diff --git a/app/Services/UserStatsService.php b/app/Services/UserStatsService.php index 84a15fffa..30e941d33 100644 --- a/app/Services/UserStatsService.php +++ b/app/Services/UserStatsService.php @@ -4,15 +4,13 @@ namespace App\Services; use App\Models\User; use App\Models\UserDownload; -use Illuminate\Support\Facades\DB; use Carbon\Carbon; +use Illuminate\Support\Facades\DB; class UserStatsService { /** * Get user statistics by role - * - * @return array */ public function getUsersByRole(): array { @@ -33,8 +31,6 @@ class UserStatsService /** * Get downloads per day for the last 7 days - * - * @return array */ public function getDownloadsPerDay(int $days = 7): array { @@ -64,8 +60,6 @@ class UserStatsService /** * Get API hits per day for the last 7 days * Note: This tracks users' last API access date - * - * @return array */ public function getApiHitsPerDay(int $days = 7): array { @@ -96,8 +90,6 @@ class UserStatsService /** * Get summary statistics - * - * @return array */ public function getSummaryStats(): array { @@ -114,9 +106,6 @@ class UserStatsService /** * Get top downloaders - * - * @param int $limit - * @return array */ public function getTopDownloaders(int $limit = 5): array { @@ -133,4 +122,3 @@ class UserStatsService ->toArray(); } } - diff --git a/resources/views/admin/dashboard.blade.php b/resources/views/admin/dashboard.blade.php index b2926b053..cf7aa382e 100644 --- a/resources/views/admin/dashboard.blade.php +++ b/resources/views/admin/dashboard.blade.php @@ -51,7 +51,7 @@
Active Groups
-{{ number_format($stats['groups'] ?? 0) }}
+{{ number_format($stats['active_groups'] ?? 0) }}