From ce02bdf206bd3452a77866fd4ba9e682288c762e Mon Sep 17 00:00:00 2001 From: Danny van Kooten Date: Fri, 23 Feb 2024 10:51:23 +0100 Subject: [PATCH] code styling --- src/functions.php | 14 ++++++++------ src/views/settings-page.php | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/functions.php b/src/functions.php index 1fc1e0f7..88ce7ba3 100644 --- a/src/functions.php +++ b/src/functions.php @@ -21,13 +21,14 @@ function maybe_collect_request() collect_request(); } -function extract_pageview_data() : array { +function extract_pageview_data(): array +{ // do nothing if a required parameter is missing if ( !isset($_GET['p']) || !isset($_GET['nv']) - || !isset($_GET['up'])) - { + || !isset($_GET['up']) + ) { return array(); } @@ -49,7 +50,8 @@ function extract_pageview_data() : array { ); } -function extract_event_data() : array { +function extract_event_data(): array +{ if (!isset($_GET['e']) || !isset($_GET['p']) || !isset($_GET['u']) || !isset($_GET['v'])) { return array(); } @@ -84,9 +86,9 @@ function collect_request() } else { \header($_SERVER['SERVER_PROTOCOL'] . ' 200 OK'); } - } else { + } else { \header($_SERVER['SERVER_PROTOCOL'] . ' 400 Bad Request'); - } + } \header('Content-Type: text/plain'); diff --git a/src/views/settings-page.php b/src/views/settings-page.php index 85cb01c7..5f91bef7 100644 --- a/src/views/settings-page.php +++ b/src/views/settings-page.php @@ -114,8 +114,8 @@

- - + +