diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2019-04-17 15:02:24 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2019-04-17 15:02:24 +0100 |
| commit | 0797053b7314a8688ee46e4c25ffb66029a38744 (patch) | |
| tree | e4227d594628eeba175f74244cc631084591ec1e /app/Statistics.php | |
| parent | 8e39618ca07b3a40a1a7d96a3d410b9eaf623cae (diff) | |
| download | webtrees-0797053b7314a8688ee46e4c25ffb66029a38744.tar.gz webtrees-0797053b7314a8688ee46e4c25ffb66029a38744.tar.bz2 webtrees-0797053b7314a8688ee46e4c25ffb66029a38744.zip | |
Collections: combine filter() and first()
Diffstat (limited to 'app/Statistics.php')
| -rw-r--r-- | app/Statistics.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/Statistics.php b/app/Statistics.php index 62d75cf2b6..f79ea5205b 100644 --- a/app/Statistics.php +++ b/app/Statistics.php @@ -2618,10 +2618,9 @@ class Statistics implements /** @var ModuleBlockInterface|null $module */ $module = $this->module_service ->findByComponent(ModuleBlockInterface::class, $this->tree, Auth::user()) - ->filter(function (ModuleInterface $module) use ($block): bool { + ->first(function (ModuleInterface $module) use ($block): bool { return $module->name() === $block && $module->name() !== 'html'; - }) - ->first(); + }); if ($module === null) { return ''; |
