File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 1818use Flarum \User \User ;
1919use FoF \ForumWidgets \SafeCacheRepositoryAdapter ;
2020use Symfony \Contracts \Translation \TranslatorInterface ;
21+
2122use function FoF \ForumWidgets \Helper \pretty_number_format ;
2223
2324class AddStatsToApi
@@ -36,8 +37,8 @@ public function __invoke(): array
3637
3738 $ stats = $ this ->cache ->remember ('fof-forum-stats-widget.stats ' , $ interval , function (): array {
3839 return [
39- 'discussion_count ' => Discussion::count (),
40- 'user_count ' => User::count (),
40+ 'discussion_count ' => Discussion::count (),
41+ 'user_count ' => User::count (),
4142 'comment_post_count ' => CommentPost::count (),
4243 ];
4344 }) ?: [];
Original file line number Diff line number Diff line change 11<?php
22
33/*
4- * This file is part of Flarum .
4+ * This file is part of fof/forum-stats-widget .
55 *
6- * For detailed copyright and license information, please view the
7- * LICENSE file that was distributed with this source code.
6+ * Copyright (c) 2026 FriendsOfFlarum.
7+ *
8+ * For the full copyright and license information, please view the LICENSE.md
9+ * file that was distributed with this source code.
810 */
911
1012use Flarum \Testing \integration \Setup \SetupScript ;
You can’t perform that action at this time.
0 commit comments