From 80d770babdd6387322cb23319366ec94bf873400 Mon Sep 17 00:00:00 2001 From: Tim van Dijen <tvdijen@gmail.com> Date: Mon, 4 Feb 2019 11:03:11 +0100 Subject: [PATCH] Fixes for modules/memcacheMonitor --- modules/memcacheMonitor/hooks/hook_configpage.php | 3 ++- modules/memcacheMonitor/hooks/hook_frontpage.php | 3 ++- modules/memcacheMonitor/hooks/hook_sanitycheck.php | 2 +- modules/memcacheMonitor/www/memcachestat.php | 14 ++++++++++++++ 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/modules/memcacheMonitor/hooks/hook_configpage.php b/modules/memcacheMonitor/hooks/hook_configpage.php index 4debe964e..497c84893 100644 --- a/modules/memcacheMonitor/hooks/hook_configpage.php +++ b/modules/memcacheMonitor/hooks/hook_configpage.php @@ -1,10 +1,11 @@ <?php + /** * Hook to add the memcacheMonitor module to the config page. * * @param \SimpleSAML\XHTML\Template &$template The template that we should alter in this hook. + * @return void */ - function memcacheMonitor_hook_configpage(\SimpleSAML\XHTML\Template &$template) { $template->data['links']['memcacheMonitor'] = [ diff --git a/modules/memcacheMonitor/hooks/hook_frontpage.php b/modules/memcacheMonitor/hooks/hook_frontpage.php index d25437327..9a1b4f07b 100644 --- a/modules/memcacheMonitor/hooks/hook_frontpage.php +++ b/modules/memcacheMonitor/hooks/hook_frontpage.php @@ -1,10 +1,11 @@ <?php + /** * Hook to add the simple consenet admin module to the frontpage. * * @param array &$links The links on the frontpage, split into sections. + * @return void */ - function memcacheMonitor_hook_frontpage(&$links) { assert(is_array($links)); diff --git a/modules/memcacheMonitor/hooks/hook_sanitycheck.php b/modules/memcacheMonitor/hooks/hook_sanitycheck.php index a7a36c415..ce95aada1 100644 --- a/modules/memcacheMonitor/hooks/hook_sanitycheck.php +++ b/modules/memcacheMonitor/hooks/hook_sanitycheck.php @@ -6,8 +6,8 @@ * This function verifies that all memcache servers work. * * @param array &$hookinfo hookinfo + * @return void */ - function memcacheMonitor_hook_sanitycheck(&$hookinfo) { assert(is_array($hookinfo)); diff --git a/modules/memcacheMonitor/www/memcachestat.php b/modules/memcacheMonitor/www/memcachestat.php index fde791e55..0e79858b9 100644 --- a/modules/memcacheMonitor/www/memcachestat.php +++ b/modules/memcacheMonitor/www/memcachestat.php @@ -1,10 +1,19 @@ <?php +/** + * @param int $input + * @return string + */ function tdate($input) { return date(DATE_RFC822, $input); } + +/** + * @param int $input + * @return string + */ function hours($input) { if ($input < 60) { @@ -19,6 +28,11 @@ function hours($input) return number_format($input / (24 * 60 * 60), 2).' days'; } + +/** + * @param int $input + * @return string + */ function humanreadable($input) { $output = ""; -- GitLab