@@ -48,10 +48,10 @@ function highlight_php_trimmed($code, $return = false)
4848}
4949
5050// Stats pages still need this
51- function commonHeader ($ title ) { site_header ($ title ); }
51+ function commonHeader ($ title ): void { site_header ($ title ); }
5252
5353// Stats pages still need this
54- function commonFooter () { site_footer (); }
54+ function commonFooter (): void { site_footer (); }
5555
5656// Resize the image using the output of make_image()
5757function resize_image ($ img , $ width = 1 , $ height = 1 )
@@ -105,7 +105,7 @@ function make_image($file, $alt = false, $align = false, $extras = false,
105105
106106// Print an <img> tag out for a given file
107107function print_image ($ file , $ alt = false , $ align = false , $ extras = false ,
108- $ dir = '/images ' )
108+ $ dir = '/images ' ): void
109109{
110110 echo make_image ($ file , $ alt , $ align , $ extras , $ dir );
111111}
@@ -163,12 +163,12 @@ function make_popup_link ($url, $linktext = false, $target = false, $windowprops
163163// print_popup_link()
164164// print a hyperlink to something, within the site, that pops up a new window
165165//
166- function print_popup_link ($ url , $ linktext = false , $ windowprops = "" , $ target = false , $ extras = false ) {
166+ function print_popup_link ($ url , $ linktext = false , $ windowprops = "" , $ target = false , $ extras = false ): void {
167167 echo make_popup_link ($ url , $ linktext , $ windowprops , $ target , $ extras );
168168}
169169
170170// Print a link for a downloadable file (including filesize)
171- function download_link ($ file , $ title )
171+ function download_link ($ file , $ title ): void
172172{
173173 $ download_link = "/distributions/ " . $ file ;
174174
@@ -236,7 +236,7 @@ function clean_note($text)
236236 );
237237}
238238
239- function display_errors ($ errors )
239+ function display_errors ($ errors ): void
240240{
241241 echo '<div class="errors"> ' ;
242242 if (count ($ errors ) > 1 ) {
@@ -254,7 +254,7 @@ function display_errors($errors)
254254
255255// Displays an event. Used in event submission
256256// previews and event information displays
257- function display_event ($ event , $ include_date = 1 )
257+ function display_event ($ event , $ include_date = 1 ): void
258258{
259259 global $ COUNTRIES ;
260260 // Current month (int)($_GET['cm'] ?: 0)
@@ -354,7 +354,7 @@ function display_event($event, $include_date = 1)
354354}
355355
356356// Print news links for archives
357- function news_archive_sidebar ()
357+ function news_archive_sidebar (): void
358358{
359359 global $ SIDEBAR_DATA ;
360360 $ SIDEBAR_DATA = '
447447 return $ retval ;
448448}
449449
450- function site_header ($ title = 'Hypertext Preprocessor ' , $ config = [])
450+ function site_header ($ title = 'Hypertext Preprocessor ' , $ config = []): void
451451{
452452 global $ MYSITE ;
453453
@@ -481,7 +481,7 @@ function site_header($title = 'Hypertext Preprocessor', $config = [])
481481
482482 require __DIR__ . "/header.inc " ;
483483}
484- function site_footer ($ config = [])
484+ function site_footer ($ config = []): void
485485{
486486 require __DIR__ . "/footer.inc " ;
487487}
@@ -511,7 +511,7 @@ function get_news_changes()
511511 return false ;
512512}
513513
514- function news_toc ($ sections = null ) {
514+ function news_toc ($ sections = null ): void {
515515 include __DIR__ . "/pregen-news.inc " ;
516516 $ items = [
517517 "news " => [
@@ -544,7 +544,7 @@ function news_toc($sections = null) {
544544 }
545545 }
546546}
547- function doc_toc ($ lang ) {
547+ function doc_toc ($ lang ): void {
548548 $ file = __DIR__ . "/../manual/ $ lang/toc/index.inc " ;
549549 if (!file_exists ($ file )) {
550550 $ lang = "en " ; // Fallback on english if the translation doesn't exist
@@ -591,15 +591,15 @@ function doc_toc($lang) {
591591 echo "</dl> " ;
592592
593593}
594- function doc_toc_list ($ lang , $ index , $ file ) {
594+ function doc_toc_list ($ lang , $ index , $ file ): void {
595595 include __DIR__ . "/../manual/ $ lang/toc/ $ file.inc " ;
596596
597597 doc_toc_title ($ lang , $ index , $ file );
598598 foreach ($ TOC as $ entry ) {
599599 echo "\t<dd><a href='/manual/ $ lang/ {$ entry [0 ]}'> {$ entry [1 ]}</a></dd> \n" ;
600600 }
601601}
602- function doc_toc_title ($ lang , $ index , $ file , $ elm = "dt " ) {
602+ function doc_toc_title ($ lang , $ index , $ file , $ elm = "dt " ): void {
603603 foreach ($ index as $ entry ) {
604604 if ($ entry [0 ] == "$ file.php " ) {
605605 $ link = $ entry [0 ];
0 commit comments