diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2022-09-06 14:19:38 +0100 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2022-09-06 16:03:38 +0100 |
| commit | 10e0649788c8d7d4974d81c048ca2b225df8f22e (patch) | |
| tree | e8f4c887772aa3e41416d108f46415b5d79974aa /app/Http/RequestHandlers/ControlPanel.php | |
| parent | bb57cf020a15502710bb777953ca13b884312030 (diff) | |
| download | webtrees-10e0649788c8d7d4974d81c048ca2b225df8f22e.tar.gz webtrees-10e0649788c8d7d4974d81c048ca2b225df8f22e.tar.bz2 webtrees-10e0649788c8d7d4974d81c048ca2b225df8f22e.zip | |
CodeStyle
Diffstat (limited to 'app/Http/RequestHandlers/ControlPanel.php')
| -rw-r--r-- | app/Http/RequestHandlers/ControlPanel.php | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/app/Http/RequestHandlers/ControlPanel.php b/app/Http/RequestHandlers/ControlPanel.php index 1814fb2e02..c4e11e6fb4 100644 --- a/app/Http/RequestHandlers/ControlPanel.php +++ b/app/Http/RequestHandlers/ControlPanel.php @@ -235,6 +235,7 @@ class ControlPanel implements RequestHandlerInterface }) ->groupBy(['gedcom.gedcom_id']) ->pluck(new Expression('COUNT(change_id) AS aggregate'), 'gedcom.gedcom_id') + ->map(static fn (string $count): int => (int) $count) ->all(); } @@ -249,9 +250,7 @@ class ControlPanel implements RequestHandlerInterface ->leftJoin('individuals', 'i_file', '=', 'gedcom_id') ->groupBy(['gedcom_id']) ->pluck(new Expression('COUNT(i_id) AS aggregate'), 'gedcom_id') - ->map(static function (string $count) { - return (int) $count; - }); + ->map(static fn (string $count): int => (int) $count); } /** @@ -265,9 +264,7 @@ class ControlPanel implements RequestHandlerInterface ->leftJoin('families', 'f_file', '=', 'gedcom_id') ->groupBy(['gedcom_id']) ->pluck(new Expression('COUNT(f_id) AS aggregate'), 'gedcom_id') - ->map(static function (string $count) { - return (int) $count; - }); + ->map(static fn (string $count): int => (int) $count); } /** @@ -281,9 +278,7 @@ class ControlPanel implements RequestHandlerInterface ->leftJoin('sources', 's_file', '=', 'gedcom_id') ->groupBy(['gedcom_id']) ->pluck(new Expression('COUNT(s_id) AS aggregate'), 'gedcom_id') - ->map(static function (string $count) { - return (int) $count; - }); + ->map(static fn (string $count): int => (int) $count); } /** @@ -297,9 +292,7 @@ class ControlPanel implements RequestHandlerInterface ->leftJoin('media', 'm_file', '=', 'gedcom_id') ->groupBy(['gedcom_id']) ->pluck(new Expression('COUNT(m_id) AS aggregate'), 'gedcom_id') - ->map(static function (string $count) { - return (int) $count; - }); + ->map(static fn (string $count): int => (int) $count); } /** @@ -317,9 +310,7 @@ class ControlPanel implements RequestHandlerInterface }) ->groupBy(['gedcom_id']) ->pluck(new Expression('COUNT(o_id) AS aggregate'), 'gedcom_id') - ->map(static function (string $count) { - return (int) $count; - }); + ->map(static fn (string $count): int => (int) $count); } /** @@ -337,9 +328,7 @@ class ControlPanel implements RequestHandlerInterface }) ->groupBy(['gedcom_id']) ->pluck(new Expression('COUNT(o_id) AS aggregate'), 'gedcom_id') - ->map(static function (string $count) { - return (int) $count; - }); + ->map(static fn (string $count): int => (int) $count); } /** @@ -357,8 +346,6 @@ class ControlPanel implements RequestHandlerInterface }) ->groupBy(['gedcom_id']) ->pluck(new Expression('COUNT(o_id) AS aggregate'), 'gedcom_id') - ->map(static function (string $count) { - return (int) $count; - }); + ->map(static fn (string $count): int => (int) $count); } } |
