From 90dec95b6e1c099071fc13ccdf467b59ebd4de27 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 26 Jun 2022 19:36:45 -0400 Subject: [PATCH] [various] Fix hook function type-hints - Address https://friendica.xyz/display/adf174d5-1562-b8d8-53d7-ffd690518338 --- mathjax/mathjax.php | 2 +- pageheader/pageheader.php | 4 ++-- saml/saml.php | 4 ++-- showmore_dyn/showmore_dyn.php | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mathjax/mathjax.php b/mathjax/mathjax.php index 5565bf0f..db47512b 100644 --- a/mathjax/mathjax.php +++ b/mathjax/mathjax.php @@ -50,7 +50,7 @@ function mathjax_settings(App $a, array &$data) ]; } -function mathjax_footer(App $a, array &$b) +function mathjax_footer(App $a, string &$b) { // if the visitor of the page is not a local_user, use MathJax // otherwise check the users settings. diff --git a/pageheader/pageheader.php b/pageheader/pageheader.php index 5b1bb1b7..f1a7f0cd 100644 --- a/pageheader/pageheader.php +++ b/pageheader/pageheader.php @@ -17,7 +17,7 @@ function pageheader_install() { Hook::register('page_content_top', __FILE__, 'pageheader_fetch'); } -function pageheader_addon_admin(App &$a, &$s) +function pageheader_addon_admin(App &$a, string &$s) { if (!$a->isSiteAdmin()) { return; @@ -52,7 +52,7 @@ function pageheader_addon_admin_post(App $a) } } -function pageheader_fetch(App $a, array &$b) +function pageheader_fetch(App $a, string &$b) { if(file_exists('pageheader.html')){ $s = file_get_contents('pageheader.html'); diff --git a/saml/saml.php b/saml/saml.php index dc25ae6d..db74ce40 100755 --- a/saml/saml.php +++ b/saml/saml.php @@ -80,12 +80,12 @@ function saml_install() Hook::register('footer', __FILE__, 'saml_footer'); } -function saml_head(App $a, array &$b) +function saml_head(App $a, string &$b) { DI::page()->registerStylesheet(__DIR__ . '/saml.css'); } -function saml_footer(App $a, array &$b) +function saml_footer(App $a, string &$b) { $fragment = addslashes(BBCode::convert(DI::config()->get('saml', 'settings_statement'))); $b .= <<registerStylesheet(__DIR__ . '/showmore_dyn.css'); } -function showmore_dyn_footer(App $a, array &$b) +function showmore_dyn_footer(App $a, string &$b) { DI::page()->registerFooterScript(__DIR__ . '/showmore_dyn.js'); }