From f070961bf93e0d8241e6325e253d41b87c50b1c9 Mon Sep 17 00:00:00 2001 From: Tim van Dijen <tvdijen@gmail.com> Date: Mon, 4 Feb 2019 18:11:42 +0100 Subject: [PATCH] Fixes for modules/sanitycheck --- modules/sanitycheck/hooks/hook_configpage.php | 2 ++ modules/sanitycheck/hooks/hook_cron.php | 5 +++-- modules/sanitycheck/hooks/hook_frontpage.php | 2 ++ modules/sanitycheck/hooks/hook_moduleinfo.php | 2 ++ modules/sanitycheck/hooks/hook_sanitycheck.php | 2 ++ 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/sanitycheck/hooks/hook_configpage.php b/modules/sanitycheck/hooks/hook_configpage.php index a4db0492e..68856b930 100644 --- a/modules/sanitycheck/hooks/hook_configpage.php +++ b/modules/sanitycheck/hooks/hook_configpage.php @@ -1,8 +1,10 @@ <?php + /** * Hook to add the sanitycheck link to the config page. * * @param \SimpleSAML\XHTML\Template $template The template that we should alter in this hook. + * @return void */ function sanitycheck_hook_configpage(\SimpleSAML\XHTML\Template &$template) { diff --git a/modules/sanitycheck/hooks/hook_cron.php b/modules/sanitycheck/hooks/hook_cron.php index 15e0736dd..0ab1a6604 100644 --- a/modules/sanitycheck/hooks/hook_cron.php +++ b/modules/sanitycheck/hooks/hook_cron.php @@ -1,10 +1,11 @@ <?php + /** * Hook to run a cron job. * * @param array &$croninfo Output + * @return void */ - function sanitycheck_hook_cron(&$croninfo) { assert(is_array($croninfo)); @@ -35,7 +36,7 @@ function sanitycheck_hook_cron(&$croninfo) $croninfo['summary'][] = 'Sanitycheck error: '.$err; } } - } catch (Exception $e) { + } catch (\Exception $e) { $croninfo['summary'][] = 'Error executing sanity check: '.$e->getMessage(); } } diff --git a/modules/sanitycheck/hooks/hook_frontpage.php b/modules/sanitycheck/hooks/hook_frontpage.php index 1e860e6e6..e1b1a126d 100644 --- a/modules/sanitycheck/hooks/hook_frontpage.php +++ b/modules/sanitycheck/hooks/hook_frontpage.php @@ -1,8 +1,10 @@ <?php + /** * Hook to add the modinfo module to the frontpage. * * @param array &$links The links on the frontpage, split into sections. + * @return void */ function sanitycheck_hook_frontpage(&$links) { diff --git a/modules/sanitycheck/hooks/hook_moduleinfo.php b/modules/sanitycheck/hooks/hook_moduleinfo.php index 87d014e2e..d0eb684e1 100644 --- a/modules/sanitycheck/hooks/hook_moduleinfo.php +++ b/modules/sanitycheck/hooks/hook_moduleinfo.php @@ -1,8 +1,10 @@ <?php + /** * This hook lets the module describe itself. * * @param array &$moduleinfo The links on the frontpage, split into sections. + * @return void */ function sanitycheck_hook_moduleinfo(&$moduleinfo) { diff --git a/modules/sanitycheck/hooks/hook_sanitycheck.php b/modules/sanitycheck/hooks/hook_sanitycheck.php index 8aec6582b..6288c1be6 100644 --- a/modules/sanitycheck/hooks/hook_sanitycheck.php +++ b/modules/sanitycheck/hooks/hook_sanitycheck.php @@ -1,8 +1,10 @@ <?php + /** * Hook to add the modinfo module to the frontpage. * * @param array &$hookinfo hookinfo + * @return void */ function sanitycheck_hook_sanitycheck(&$hookinfo) { -- GitLab