summaryrefslogtreecommitdiff
path: root/app/Http/RequestHandlers/SiteLogsDownload.php
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2024-03-22 23:19:58 +0000
committerGreg Roach <greg@subaqua.co.uk>2024-03-31 17:33:15 +0100
commitf25fc0f929f69ab8124cf0cecde45e457db7574a (patch)
tree57acdf06e5150c223b5bc7ebb1d520fc2d42acde /app/Http/RequestHandlers/SiteLogsDownload.php
parent0fb4d30bbf89a9b7cbd2dbb11c5f007ba735e5ce (diff)
downloadwebtrees-f25fc0f929f69ab8124cf0cecde45e457db7574a.tar.gz
webtrees-f25fc0f929f69ab8124cf0cecde45e457db7574a.tar.bz2
webtrees-f25fc0f929f69ab8124cf0cecde45e457db7574a.zip
PHP 7.4 - short arrow functions
Diffstat (limited to 'app/Http/RequestHandlers/SiteLogsDownload.php')
-rw-r--r--app/Http/RequestHandlers/SiteLogsDownload.php17
1 files changed, 7 insertions, 10 deletions
diff --git a/app/Http/RequestHandlers/SiteLogsDownload.php b/app/Http/RequestHandlers/SiteLogsDownload.php
index 9d10be3c8c..ccd0c172b9 100644
--- a/app/Http/RequestHandlers/SiteLogsDownload.php
+++ b/app/Http/RequestHandlers/SiteLogsDownload.php
@@ -53,16 +53,13 @@ class SiteLogsDownload implements RequestHandlerInterface
$content = $this->site_logs_service->logsQuery($request)
->orderBy('log_id')
->get()
- ->map(static function (object $row): string {
- return
- '"' . $row->log_time . '",' .
- '"' . $row->log_type . '",' .
- '"' . str_replace('"', '""', $row->log_message) . '",' .
- '"' . $row->ip_address . '",' .
- '"' . str_replace('"', '""', $row->user_name) . '",' .
- '"' . str_replace('"', '""', $row->gedcom_name) . '"' .
- "\n";
- })
+ ->map(static fn(object $row): string => '"' . $row->log_time . '",' .
+ '"' . $row->log_type . '",' .
+ '"' . str_replace('"', '""', $row->log_message) . '",' .
+ '"' . $row->ip_address . '",' .
+ '"' . str_replace('"', '""', $row->user_name) . '",' .
+ '"' . str_replace('"', '""', $row->gedcom_name) . '"' .
+ "\n")
->implode('');
return Registry::responseFactory()->response($content, StatusCodeInterface::STATUS_OK, [