SF.net SVN: phpwiki:[11048] trunk/lib/plugin

vargenau--- via phpwiki-checkins <[email protected]> Fri, 14 Jul 2023 09:19:33 +0000
Newsgroups gmane.comp.web.wiki.phpwiki.checkins
Message-ID <[email protected]>
Revision: 11048
          http://sourceforge.net/p/phpwiki/code/11048
Author:   vargenau
Date:     2023-07-14 09:19:32 +0000 (Fri, 14 Jul 2023)
Log Message:
-----------
plugin: PHP 7: add types for function arguments and return

Modified Paths:
--------------
    trunk/lib/plugin/AddComment.php
    trunk/lib/plugin/AllPages.php
    trunk/lib/plugin/AllUsers.php
    trunk/lib/plugin/AnalyseAccessLogSql.php
    trunk/lib/plugin/AppendText.php
    trunk/lib/plugin/AsciiMath.php
    trunk/lib/plugin/AsciiSVG.php
    trunk/lib/plugin/AtomFeed.php
    trunk/lib/plugin/AuthorHistory.php
    trunk/lib/plugin/BackLinks.php
    trunk/lib/plugin/BlogArchives.php
    trunk/lib/plugin/BlogJournal.php
    trunk/lib/plugin/BoxRight.php
    trunk/lib/plugin/CacheTest.php
    trunk/lib/plugin/Calendar.php
    trunk/lib/plugin/CalendarList.php
    trunk/lib/plugin/Chart.php
    trunk/lib/plugin/Comment.php
    trunk/lib/plugin/CreateBib.php
    trunk/lib/plugin/CreatePage.php
    trunk/lib/plugin/CreateToc.php
    trunk/lib/plugin/CurrentTime.php
    trunk/lib/plugin/DebugAuthInfo.php
    trunk/lib/plugin/DebugBackendInfo.php
    trunk/lib/plugin/DebugGroupInfo.php
    trunk/lib/plugin/DebugRetransform.php
    trunk/lib/plugin/Diff.php
    trunk/lib/plugin/DynamicIncludePage.php
    trunk/lib/plugin/EditMetaData.php
    trunk/lib/plugin/ExternalSearch.php
    trunk/lib/plugin/FacebookLike.php
    trunk/lib/plugin/FileInfo.php
    trunk/lib/plugin/FoafViewer.php
    trunk/lib/plugin/FullTextSearch.php
    trunk/lib/plugin/FuzzyPages.php
    trunk/lib/plugin/GoTo.php
    trunk/lib/plugin/GoogleMaps.php
    trunk/lib/plugin/GooglePlugin.php
    trunk/lib/plugin/GraphViz.php
    trunk/lib/plugin/HelloWorld.php
    trunk/lib/plugin/HtmlConverter.php
    trunk/lib/plugin/IncludePage.php
    trunk/lib/plugin/IncludePages.php
    trunk/lib/plugin/IncludeSiteMap.php
    trunk/lib/plugin/IncludeTree.php
    trunk/lib/plugin/InterWikiSearch.php
    trunk/lib/plugin/JabberPresence.php
    trunk/lib/plugin/LdapSearch.php
    trunk/lib/plugin/LikePages.php
    trunk/lib/plugin/LinkDatabase.php
    trunk/lib/plugin/LinkSearch.php
    trunk/lib/plugin/ListPages.php
    trunk/lib/plugin/ListRelations.php
    trunk/lib/plugin/ListSubpages.php
    trunk/lib/plugin/MediawikiTable.php
    trunk/lib/plugin/ModeratedPage.php
    trunk/lib/plugin/MostPopular.php
    trunk/lib/plugin/NewPagesPerUser.php
    trunk/lib/plugin/NoCache.php
    trunk/lib/plugin/OldStyleTable.php
    trunk/lib/plugin/OrphanedPages.php
    trunk/lib/plugin/PageDump.php
    trunk/lib/plugin/PageGroup.php
    trunk/lib/plugin/PageHistory.php
    trunk/lib/plugin/PageInfo.php
    trunk/lib/plugin/PageTrail.php
    trunk/lib/plugin/PasswordReset.php
    trunk/lib/plugin/PhotoAlbum.php
    trunk/lib/plugin/PhpHighlight.php
    trunk/lib/plugin/Ploticus.php
    trunk/lib/plugin/PluginManager.php
    trunk/lib/plugin/PopUp.php
    trunk/lib/plugin/PopularNearby.php
    trunk/lib/plugin/PopularTags.php
    trunk/lib/plugin/PreferenceApp.php
    trunk/lib/plugin/PrevNext.php
    trunk/lib/plugin/Processing.php
    trunk/lib/plugin/RandomPage.php
    trunk/lib/plugin/RateIt.php
    trunk/lib/plugin/RawHtml.php
    trunk/lib/plugin/RecentChanges.php
    trunk/lib/plugin/RecentComments.php
    trunk/lib/plugin/RecentEdits.php
    trunk/lib/plugin/RecentReferrers.php
    trunk/lib/plugin/RedirectTo.php
    trunk/lib/plugin/RelatedChanges.php
    trunk/lib/plugin/RichTable.php
    trunk/lib/plugin/RssFeed.php
    trunk/lib/plugin/SearchHighlight.php
    trunk/lib/plugin/SemanticRelations.php
    trunk/lib/plugin/SemanticSearch.php
    trunk/lib/plugin/SemanticSearchAdvanced.php
    trunk/lib/plugin/SiteMap.php
    trunk/lib/plugin/SpellCheck.php
    trunk/lib/plugin/SqlResult.php
    trunk/lib/plugin/SyncWiki.php
    trunk/lib/plugin/SyntaxHighlighter.php
    trunk/lib/plugin/SystemInfo.php
    trunk/lib/plugin/TeX2png.php
    trunk/lib/plugin/Template.php
    trunk/lib/plugin/TexToPng.php
    trunk/lib/plugin/TitleSearch.php
    trunk/lib/plugin/Transclude.php
    trunk/lib/plugin/TranslateText.php
    trunk/lib/plugin/UnfoldSubpages.php
    trunk/lib/plugin/UpLoad.php
    trunk/lib/plugin/UriResolver.php
    trunk/lib/plugin/UserPreferences.php
    trunk/lib/plugin/UserRatings.php
    trunk/lib/plugin/Video.php
    trunk/lib/plugin/WantedPages.php
    trunk/lib/plugin/WatchPage.php
    trunk/lib/plugin/WhoIsOnline.php
    trunk/lib/plugin/WikiAdminChown.php
    trunk/lib/plugin/WikiAdminDeleteAcl.php
    trunk/lib/plugin/WikiAdminPurge.php
    trunk/lib/plugin/WikiAdminRemove.php
    trunk/lib/plugin/WikiAdminRename.php
    trunk/lib/plugin/WikiAdminSearchReplace.php
    trunk/lib/plugin/WikiAdminSelect.php
    trunk/lib/plugin/WikiAdminSetAcl.php
    trunk/lib/plugin/WikiAdminSetAclSimple.php
    trunk/lib/plugin/WikiAdminSetExternal.php
    trunk/lib/plugin/WikiAdminUtils.php
    trunk/lib/plugin/WikiBlog.php
    trunk/lib/plugin/WikiForm.php
    trunk/lib/plugin/WikiFormRich.php
    trunk/lib/plugin/WikiForum.php
    trunk/lib/plugin/WikiPoll.php
    trunk/lib/plugin/WikiTranslation.php
    trunk/lib/plugin/WikicreoleTable.php
    trunk/lib/plugin/YouTube.php
    trunk/lib/plugin/text2png.php

Modified: trunk/lib/plugin/AddComment.php
===================================================================
--- trunk/lib/plugin/AddComment.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/AddComment.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -36,7 +36,7 @@
 
 class WikiPlugin_AddComment extends WikiPlugin_WikiBlog
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return sprintf(_("Show and add comments for %s."), '[pagename]');
     }
@@ -55,7 +55,7 @@
     //  jshide - boolean  - quick javascript expansion of the comments
     //                      and addcomment box
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('pagename' => '[pagename]',
             'order' => 'normal',

Modified: trunk/lib/plugin/AllPages.php
===================================================================
--- trunk/lib/plugin/AllPages.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/AllPages.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -32,12 +32,12 @@
 
 class WikiPlugin_AllPages extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("List all pages in this wiki.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array_merge(
             PageList::supportedArgs(),

Modified: trunk/lib/plugin/AllUsers.php
===================================================================
--- trunk/lib/plugin/AllUsers.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/AllUsers.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -35,12 +35,12 @@
 
 class WikiPlugin_AllUsers extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("List all once authenticated users.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array_merge(
             PageList::supportedArgs(),

Modified: trunk/lib/plugin/AnalyseAccessLogSql.php
===================================================================
--- trunk/lib/plugin/AnalyseAccessLogSql.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/AnalyseAccessLogSql.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -61,7 +61,7 @@
      * @param array $args
      * @return string
      */
-    private function getQueryString(&$args)
+    private function getQueryString(array &$args): string
     {
         // extract any parametrised conditions from the arguments,
         // in particular, how much history to select
@@ -258,7 +258,7 @@
         );
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array(
             'mode' => 'referring_domains',
@@ -272,7 +272,7 @@
         );
     }
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Show summary information from the access log table.");
     }
@@ -362,7 +362,7 @@
         }
     }
 
-    private function getWhereConditions(&$args)
+    private function getWhereConditions(&$args): string
     {
         $where_conditions = '';
 

Modified: trunk/lib/plugin/AppendText.php
===================================================================
--- trunk/lib/plugin/AppendText.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/AppendText.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -35,12 +35,12 @@
 
 class WikiPlugin_AppendText extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Append text to any page in this wiki.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('page' => '[pagename]',
             'pages' => false,
@@ -51,7 +51,7 @@
         );
     }
 
-    private function fallback($addtext, $oldtext, $notfound, $message)
+    private function fallback($addtext, $oldtext, $notfound, $message): string
     {
         $message->pushContent(sprintf(_("ā€œ%sā€ not found"), $notfound) . ". " .
             _("Appending at the end.") . "\n");

Modified: trunk/lib/plugin/AsciiMath.php
===================================================================
--- trunk/lib/plugin/AsciiMath.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/AsciiMath.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -44,12 +44,12 @@
 {
     public $source;
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Render ASCII Math as MathML.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array();
     }

Modified: trunk/lib/plugin/AsciiSVG.php
===================================================================
--- trunk/lib/plugin/AsciiSVG.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/AsciiSVG.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -31,12 +31,12 @@
 {
     public $source;
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Render inline ASCII SVG.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('width' => 200,
             'height' => 200,
@@ -102,7 +102,7 @@
 
 class AsciiSVG_HTML extends HtmlElement
 {
-    public function startTag()
+    public function startTag(): string
     {
         $start = "<" . $this->_tag;
         $this->_setClasses();

Modified: trunk/lib/plugin/AtomFeed.php
===================================================================
--- trunk/lib/plugin/AtomFeed.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/AtomFeed.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -31,12 +31,12 @@
 
 class WikiPlugin_AtomFeed extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _('Atom Aggregator Plugin.');
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array(
             'feed' => "",

Modified: trunk/lib/plugin/AuthorHistory.php
===================================================================
--- trunk/lib/plugin/AuthorHistory.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/AuthorHistory.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -55,12 +55,12 @@
 {
     public $_args;
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("List all page revisions edited by one user with diff links, or show a PageHistory-like list of a single page for only one user.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         global $request;
         return array('exclude' => '',

Modified: trunk/lib/plugin/BackLinks.php
===================================================================
--- trunk/lib/plugin/BackLinks.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/BackLinks.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -26,12 +26,12 @@
 
 class WikiPlugin_BackLinks extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return sprintf(_("List all pages which link to %s."), '[pagename]');
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array_merge(
             PageList::supportedArgs(),

Modified: trunk/lib/plugin/BlogArchives.php
===================================================================
--- trunk/lib/plugin/BlogArchives.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/BlogArchives.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -37,12 +37,12 @@
 
 class WikiPlugin_BlogArchives extends WikiPlugin_WikiBlog
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("List blog months links for the current or ADMIN user.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return //array_merge
             //(

Modified: trunk/lib/plugin/BlogJournal.php
===================================================================
--- trunk/lib/plugin/BlogJournal.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/BlogJournal.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -36,12 +36,12 @@
 
 class WikiPlugin_BlogJournal extends WikiPlugin_WikiBlog
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Include latest blog entries for the current or ADMIN user.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('count' => 7,
             'user' => '',

Modified: trunk/lib/plugin/BoxRight.php
===================================================================
--- trunk/lib/plugin/BoxRight.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/BoxRight.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -28,17 +28,17 @@
 
 class WikiPlugin_BoxRight extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("A simple plugin for <div class=boxright> with wikimarkup.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array();
     }
 
-    public function managesValidators()
+    public function managesValidators(): bool
     {
         // The plugin output will only change if the plugin
         // invocation (page text) changes --- so the necessary

Modified: trunk/lib/plugin/CacheTest.php
===================================================================
--- trunk/lib/plugin/CacheTest.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/CacheTest.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -42,7 +42,7 @@
 {
     /* --------- overwrite abstract methods ---------------- */
 
-    public function getPluginType()
+    public function getPluginType(): int
     {
         return PLUGIN_CACHED_IMG_ONDEMAND;
     }
@@ -52,7 +52,7 @@
         return _('This is a simple example using WikiPluginCached.');
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('text' => $this->getDescription(),
             'font' => '3',
@@ -101,7 +101,7 @@
         return $text;
     }
 
-    public function getExpire($dbi, $argarray, $request)
+    public function getExpire($dbi, $argarray, $request): string
     {
         return '+600'; // 600 seconds life time
     }
@@ -147,7 +147,7 @@
     // we could have used the simple built-in text2img function
     // instead of writing our own:
 
-    public function lazy_produceGraphics($text, $font)
+    public function lazy_produceGraphics($text, $font): string
     {
         if ($font < 1 || $font > 5) {
             $text = "Fontnr. (font=\"$font\") should be in range 1-5";

Modified: trunk/lib/plugin/Calendar.php
===================================================================
--- trunk/lib/plugin/Calendar.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/Calendar.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -41,12 +41,12 @@
     private $_today;
     public $_links;
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Calendar");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('prefix' => '[pagename]' . '/',
             'date_format' => '%Y-%m-%d',
@@ -66,7 +66,7 @@
      * @param  string $basepage The pagename the plugin is invoked from.
      * @return array  List of pagenames linked to (or false).
      */
-    public function getWikiPageLinks($argstr, $basepage)
+    public function getWikiPageLinks($argstr, $basepage): array
     {
         if (isset($this->_links)) {
             return $this->_links;

Modified: trunk/lib/plugin/CalendarList.php
===================================================================
--- trunk/lib/plugin/CalendarList.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/CalendarList.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -59,12 +59,12 @@
     public $args;
     public $_links;
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("CalendarList");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('prefix' => '[pagename]',
             'date_format' => '%Y-%m-%d',
@@ -91,7 +91,7 @@
      * @param  string $basepage The pagename the plugin is invoked from.
      * @return array  List of pagenames linked to (or false).
      */
-    public function getWikiPageLinks($argstr, $basepage)
+    public function getWikiPageLinks($argstr, $basepage): array
     {
         if (isset($this->_links)) {
             return $this->_links;
@@ -127,7 +127,7 @@
         return $timeTMP;
     }
 
-    private function _date($dbi, $time)
+    private function _date($dbi, $time): array
     {
         $args = &$this->args;
         $date_string = strftime($args['date_format'], $time);

Modified: trunk/lib/plugin/Chart.php
===================================================================
--- trunk/lib/plugin/Chart.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/Chart.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -49,12 +49,12 @@
 {
     public $source;
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Render SVG charts.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('width' => 200,
             'height' => 200,
@@ -163,7 +163,7 @@
 
 class SVG_HTML extends HtmlElement
 {
-    public function startTag()
+    public function startTag(): string
     {
         $start = "<" . $this->_tag;
         $this->_setClasses();

Modified: trunk/lib/plugin/Comment.php
===================================================================
--- trunk/lib/plugin/Comment.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/Comment.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -39,13 +39,13 @@
 
 class WikiPlugin_Comment extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Embed hidden comments in WikiPages.");
     }
 
     // No arguments here.
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array();
     }

Modified: trunk/lib/plugin/CreateBib.php
===================================================================
--- trunk/lib/plugin/CreateBib.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/CreateBib.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -34,12 +34,12 @@
 
 class WikiPlugin_CreateBib extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Automatically create a Bibtex file from linked pages.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('pagename' => '[pagename]'); // The page from which the BibTex file is generated
     }
@@ -48,7 +48,7 @@
      * @param array $content
      * @return array
      */
-    private function extractBibTeX($content)
+    private function extractBibTeX(array $content): array
     {
         $bib = array();
 
@@ -77,7 +77,7 @@
      * @param array $content
      * @return array
      */
-    private function extractArticles($content)
+    private function extractArticles(array $content): array
     {
         $articles = array();
         for ($i = 0; $i < count($content); $i++) {
@@ -96,7 +96,7 @@
      * @param WikiDB_Page $thispage
      * @param string $filename
      */
-    private function dumpFile($thispage, $filename)
+    private function dumpFile($thispage, string $filename)
     {
         include_once 'lib/loadsave.php';
         $mailified = MailifyPage($thispage);

Modified: trunk/lib/plugin/CreatePage.php
===================================================================
--- trunk/lib/plugin/CreatePage.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/CreatePage.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -39,12 +39,12 @@
 
 class WikiPlugin_CreatePage extends WikiPlugin_Template
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Create a wiki page by the provided name.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('s' => false,
             'initial_content' => '',

Modified: trunk/lib/plugin/CreateToc.php
===================================================================
--- trunk/lib/plugin/CreateToc.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/CreateToc.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -42,12 +42,12 @@
 
 class WikiPlugin_CreateToc extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Create a Table of Contents and automatically link to headers.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array(
             'extracollapse' => true, // provide an entry +/- link to collapse
@@ -77,7 +77,7 @@
         }
     }
 
-    private function roman_counter($number)
+    private function roman_counter($number): string
     {
         $n = intval($number);
         $result = '';
@@ -93,7 +93,7 @@
         return $result;
     }
 
-    private function letter_counter($number)
+    private function letter_counter($number): string
     {
         if ($number <= 26) {
             return chr(ord("A") + $number - 1);
@@ -121,7 +121,7 @@
     }
 
     // Get HTML header corresponding to current level (level is set of ! or =)
-    private function getHeader($level)
+    private function getHeader($level): string
     {
         $count = substr_count($level, '!');
         switch ($count) {
@@ -148,7 +148,7 @@
         return "";
     }
 
-    private function quote($heading)
+    private function quote($heading): string
     {
         if (TOC_FULL_SYNTAX) {
             $theading = TransformInline($heading);
@@ -262,7 +262,7 @@
         $levels,
         $firstlevelstyle,
         $basepage
-    )
+    ): array
     {
         if (!$levels) {
             $levels = array(1, 2);

Modified: trunk/lib/plugin/CurrentTime.php
===================================================================
--- trunk/lib/plugin/CurrentTime.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/CurrentTime.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -54,13 +54,13 @@
 
 class WikiPlugin_CurrentTime extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Display current time and date.");
     }
 
     // Establish default values for each of this plugin's arguments.
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('format' => '%Y-%m-%d %T');
     }

Modified: trunk/lib/plugin/DebugAuthInfo.php
===================================================================
--- trunk/lib/plugin/DebugAuthInfo.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/DebugAuthInfo.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -34,12 +34,12 @@
 
 class WikiPlugin_DebugAuthInfo extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Display general and user specific auth information.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('userid' => '');
     }
@@ -143,7 +143,7 @@
     }
 
     // needed to store serialized objects-values only (perm, pref)
-    private function obj2hash($obj, $exclude = array())
+    private function obj2hash($obj, $exclude = array()): array
     {
         $a = array();
         $fields = get_object_vars($obj);
@@ -236,7 +236,7 @@
         return $rows;
     }
 
-    private function buildConstHash($constants)
+    private function buildConstHash($constants): array
     {
         $hash = array();
         foreach ($constants as $c) {

Modified: trunk/lib/plugin/DebugBackendInfo.php
===================================================================
--- trunk/lib/plugin/DebugBackendInfo.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/DebugBackendInfo.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -246,7 +246,7 @@
         return $rows;
     }
 
-    private function _showvalue($val): RawXml
+    private function _showvalue($val)
     {
         return $val ? $val : HTML::raw('&nbsp;');
     }

Modified: trunk/lib/plugin/DebugGroupInfo.php
===================================================================
--- trunk/lib/plugin/DebugGroupInfo.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/DebugGroupInfo.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -28,12 +28,12 @@
 
 class WikiPlugin_DebugGroupInfo extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Show Group Information.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array();
     }

Modified: trunk/lib/plugin/DebugRetransform.php
===================================================================
--- trunk/lib/plugin/DebugRetransform.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/DebugRetransform.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -28,12 +28,12 @@
 
 class WikiPlugin_DebugRetransform extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return sprintf(_("Show a markup retransformation of page %s."), '[pagename]');
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('page' => '[pagename]');
     }

Modified: trunk/lib/plugin/Diff.php
===================================================================
--- trunk/lib/plugin/Diff.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/Diff.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -34,7 +34,7 @@
 
 class WikiPlugin_Diff extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Display differences between revisions.");
     }
@@ -41,7 +41,7 @@
 
     // Establish default values for each of this plugin's arguments.
     // todo: makes only sense with more args.
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('pagename' => '[pagename]',
             'versions' => false,

Modified: trunk/lib/plugin/DynamicIncludePage.php
===================================================================
--- trunk/lib/plugin/DynamicIncludePage.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/DynamicIncludePage.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -32,12 +32,12 @@
 
 class WikiPlugin_DynamicIncludePage extends WikiPlugin_IncludePage
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Dynamically include the content from another wiki page.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array_merge(
             WikiPlugin_IncludePage::getDefaultArguments(),

Modified: trunk/lib/plugin/EditMetaData.php
===================================================================
--- trunk/lib/plugin/EditMetaData.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/EditMetaData.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -47,12 +47,12 @@
 {
     public $_args;
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return sprintf(_("Edit metadata for %s."), '[pagename]');
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('page' => '[pagename]');
     }

Modified: trunk/lib/plugin/ExternalSearch.php
===================================================================
--- trunk/lib/plugin/ExternalSearch.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/ExternalSearch.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -42,7 +42,7 @@
     public $_name;
     public $_s;
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Redirect to an external web site based on form input.");
         //fixme: better description
@@ -64,7 +64,7 @@
         }
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('s' => false,
             'formsize' => 30,

Modified: trunk/lib/plugin/FacebookLike.php
===================================================================
--- trunk/lib/plugin/FacebookLike.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/FacebookLike.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -32,12 +32,12 @@
 
 class WikiPlugin_FacebookLike extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Display a Facebook Like button.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('width' => 450,
             'height' => 35,

Modified: trunk/lib/plugin/FileInfo.php
===================================================================
--- trunk/lib/plugin/FileInfo.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/FileInfo.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -39,7 +39,7 @@
 // you need to do:
 // yum install php-process
 if (!function_exists('posix_getpwuid')) {
-    function posix_getpwuid()
+    function posix_getpwuid(): bool
     {
         return false;
     }
@@ -46,7 +46,7 @@
 }
 
 if (!function_exists('posix_getgrgid')) {
-    function posix_getgrgid()
+    function posix_getgrgid(): bool
     {
         return false;
     }
@@ -54,12 +54,12 @@
 
 class WikiPlugin_FileInfo extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Display file information like size, date... of uploaded files.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array(
             'file' => false, // relative path from PHPWIKI_DIR. (required)
@@ -225,7 +225,7 @@
         return $result;
     }
 
-    private function formatsize($n, $factor, $suffix)
+    private function formatsize($n, $factor, $suffix): string
     {
         if ($n > $factor) {
             $b = $n / $factor;
@@ -235,7 +235,7 @@
         return '';
     }
 
-    private function phonysize($a)
+    private function phonysize($a): string
     {
         $factor = 1024 * 1024 * 1024;
         if ($a > $factor) {

Modified: trunk/lib/plugin/FoafViewer.php
===================================================================
--- trunk/lib/plugin/FoafViewer.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/FoafViewer.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -58,7 +58,7 @@
 {
     // The handler is handled okay. The only problem is that it still
     // throws a fatal.
-    private function error_handler($error)
+    private function error_handler($error): bool
     {
         if (strstr($error->errstr, "Failed opening required 'XML/FOAF/Parser.php'")) {
             return true;
@@ -68,12 +68,12 @@
         return false;
     }
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Parse an RDF FOAF file and extract information to render as HTML.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('foaf' => false, // the URI to parse
             //'userid'   => false,
@@ -214,7 +214,7 @@
      * @todo Make sure it can look more than 1 layer deep
      * @todo Pass in dublincore metadata
      */
-    public function iterateHTML($array, $index, $dc = null)
+    public function iterateHTML(array $array, int $index, $dc = null)
     {
         for ($i = 0; $i < count($array[$index]); $i++) {
             //Cater for different types

Modified: trunk/lib/plugin/FullTextSearch.php
===================================================================
--- trunk/lib/plugin/FullTextSearch.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/FullTextSearch.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -38,12 +38,12 @@
  */
 class WikiPlugin_FullTextSearch extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Search the content of all pages in this wiki.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         // All PageList::supportedArgs, except 'pagename'
         $args = array_merge(
@@ -190,7 +190,7 @@
      * @param string $hilight_re
      * @return array
      */
-    public function showhits($page, $hilight_re)
+    public function showhits($page, string $hilight_re): array
     {
         $current = $page->getCurrentRevision();
         $matches = preg_grep("/$hilight_re/i", $current->getContent());
@@ -205,7 +205,7 @@
         return $html;
     }
 
-    public static function highlight_line($line, $hilight_re)
+    public static function highlight_line($line, $hilight_re): array
     {
         while (preg_match("/^(.*?)($hilight_re)/i", $line, $m)) {
             $line = substr($line, strlen($m[0]));

Modified: trunk/lib/plugin/FuzzyPages.php
===================================================================
--- trunk/lib/plugin/FuzzyPages.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/FuzzyPages.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -40,7 +40,7 @@
     private $searchterm_metaphone;
     private $debug;
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return sprintf(
             _("Search for page titles similar to %s."),
@@ -48,13 +48,13 @@
         );
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('s' => '',
                      'debug' => false);
     }
 
-    private function spelling_similarity($subject)
+    private function spelling_similarity($subject): int
     {
         $spelling_similarity_score = 0;
         similar_text(
@@ -65,7 +65,7 @@
         return $spelling_similarity_score;
     }
 
-    private function sound_similarity($subject)
+    private function sound_similarity($subject): int
     {
         $sound_similarity_score = 0;
         similar_text(

Modified: trunk/lib/plugin/GoTo.php
===================================================================
--- trunk/lib/plugin/GoTo.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/GoTo.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -34,12 +34,12 @@
 
 class WikiPlugin_GoTo extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Go to or create page.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('size' => 32);
     }

Modified: trunk/lib/plugin/GoogleMaps.php
===================================================================
--- trunk/lib/plugin/GoogleMaps.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/GoogleMaps.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -59,12 +59,12 @@
 
 class WikiPlugin_GoogleMaps extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Display a marker with further infos (when clicking) on given coordinates.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array(
             'Longitude' => '',

Modified: trunk/lib/plugin/GooglePlugin.php
===================================================================
--- trunk/lib/plugin/GooglePlugin.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/GooglePlugin.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -41,12 +41,12 @@
 
 class WikiPlugin_GooglePlugin extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Make use of the Google API.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('q' => '',
             'mode' => 'search', // or 'cache' or 'spell'

Modified: trunk/lib/plugin/GraphViz.php
===================================================================
--- trunk/lib/plugin/GraphViz.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/GraphViz.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -70,7 +70,7 @@
     public $source;
     public $_mapfile;
 
-    private function mapTypes()
+    private function mapTypes(): array
     {
         return array("imap", "cmapx", "ismap", "cmap");
     }
@@ -80,7 +80,7 @@
      * or HTML if the imagetype is not supported by GD (EPS, SVG, SVGZ) (not yet)
      * or IMG_INLINE if device = png, gif or jpeg
      */
-    public function getPluginType()
+    public function getPluginType(): int
     {
         $type = $this->decideImgType($this->_args['imgtype']);
         if ($type == $this->_args['imgtype']) {
@@ -108,12 +108,12 @@
         return _("GraphViz image or imagemap creation of directed graphs.");
     }
 
-    public function managesValidators()
+    public function managesValidators(): bool
     {
         return true;
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array(
             'imgtype' => 'png', // png,gif,svgz,svg,...
@@ -135,7 +135,7 @@
      * functions are called seldomly) or to about two minutes
      * if a help screen is created.
      */
-    public function getExpire($dbi, $argarray, $request)
+    public function getExpire($dbi, $argarray, $request): string
     {
         if (!empty($argarray['help'])) {
             return '+120';
@@ -152,7 +152,7 @@
      * @param Request $request
      * @return string 'png', 'jpeg', 'gif'
      */
-    public function getImageType($dbi, $argarray, $request)
+    public function getImageType($dbi, $argarray, $request): string
     {
         return $argarray['imgtype'];
     }
@@ -173,7 +173,7 @@
      * TODO: *map features.
      * @return string image handle
      */
-    public function helpImage()
+    public function helpImage(): string
     {
         $def = $this->defaultArguments();
         $imgtypes = $GLOBALS['PLUGIN_CACHED_IMGTYPES'];
@@ -206,7 +206,7 @@
         );
     }
 
-    public function processSource($argarray = array())
+    public function processSource($argarray = array()): string
     {
         if (empty($this->source)) {
             // create digraph from pages
@@ -249,7 +249,7 @@
      * @param array $argarray
      * @return mixed
      */
-    public function createDotFile($tempfile = '', $argarray = array())
+    public function createDotFile(string $tempfile = '', array $argarray = array())
     {
         $this->source = $this->processSource($argarray);
         if (!$this->source) {
@@ -348,12 +348,12 @@
      *
      * @return string
      */
-    protected function pngArg()
+    protected function pngArg(): string
     {
         return 'imgtype';
     }
 
-    protected function getMap($dbi, $argarray, $request)
+    protected function getMap($dbi, $argarray, $request): array
     {
         $result = $this->invokeDot($argarray);
         if (is_a($result, 'HtmlElement')) {
@@ -378,7 +378,7 @@
      * @param label     string  not used anymore
      * @return array
      */
-    public function invokeDot($argarray)
+    public function invokeDot($argarray): array
     {
         /**
          * @var WikiRequest $request

Modified: trunk/lib/plugin/HelloWorld.php
===================================================================
--- trunk/lib/plugin/HelloWorld.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/HelloWorld.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -42,13 +42,13 @@
 
 class WikiPlugin_HelloWorld extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Simple Sample Plugin.");
     }
 
     // Establish default values for each of this plugin's arguments.
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('salutation' => "Hello",
                      'name' => "World");

Modified: trunk/lib/plugin/HtmlConverter.php
===================================================================
--- trunk/lib/plugin/HtmlConverter.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/HtmlConverter.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -34,12 +34,12 @@
 
 class WikiPlugin_HtmlConverter extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Convert HTML markup into wiki markup.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array();
     }

Modified: trunk/lib/plugin/IncludePage.php
===================================================================
--- trunk/lib/plugin/IncludePage.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/IncludePage.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -31,12 +31,12 @@
 
 class WikiPlugin_IncludePage extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Include text from another wiki page.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array(
             'page' => false, // the page to include
@@ -51,7 +51,7 @@
         );
     }
 
-    public function getWikiPageLinks($argstr, $basepage)
+    public function getWikiPageLinks($argstr, $basepage): array
     {
         $args = $this->getArgs($argstr);
         $page = isset($args['page']) ? $args['page'] : '';
@@ -224,7 +224,7 @@
      * Handles the arguments: section, sectionhead, lines, words, bytes,
      * for UnfoldSubpages, IncludePage, ...
      */
-    protected function extractParts($c, $pagename, $args)
+    protected function extractParts($c, $pagename, $args): string
     {
         extract($args);
 

Modified: trunk/lib/plugin/IncludePages.php
===================================================================
--- trunk/lib/plugin/IncludePages.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/IncludePages.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -32,12 +32,12 @@
 
 class WikiPlugin_IncludePages extends WikiPlugin_IncludePage
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Include multiple pages.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array_merge(
             array('pages' => '', // the pages to include
@@ -46,7 +46,7 @@
         );
     }
 
-    public function getWikiPageLinks($argstr, $basepage)
+    public function getWikiPageLinks($argstr, $basepage): array
     {
         $args = $this->getArgs($argstr);
         if (is_string($args['exclude']) and !empty($args['exclude'])) {

Modified: trunk/lib/plugin/IncludeSiteMap.php
===================================================================
--- trunk/lib/plugin/IncludeSiteMap.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/IncludeSiteMap.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -49,12 +49,12 @@
 
 class WikiPlugin_IncludeSiteMap extends WikiPlugin_SiteMap
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Include recursively all linked pages starting at [pagename].");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('exclude' => '',
             'include_self' => false,

Modified: trunk/lib/plugin/IncludeTree.php
===================================================================
--- trunk/lib/plugin/IncludeTree.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/IncludeTree.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -36,12 +36,12 @@
 
 class WikiPlugin_IncludeTree extends WikiPlugin_SiteMap
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Display Dynamic Category Tree.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('exclude' => '',
             'include_self' => false,

Modified: trunk/lib/plugin/InterWikiSearch.php
===================================================================
--- trunk/lib/plugin/InterWikiSearch.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/InterWikiSearch.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -26,12 +26,12 @@
 
 class WikiPlugin_InterWikiSearch extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Perform searches on InterWiki sites listed in InterWikiMap.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('s' => '',
             'formsize' => 30,

Modified: trunk/lib/plugin/JabberPresence.php
===================================================================
--- trunk/lib/plugin/JabberPresence.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/JabberPresence.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -45,13 +45,13 @@
 
 class WikiPlugin_JabberPresence extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Display Jabber presence.");
     }
 
     // Establish default values for each of this plugin's arguments.
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('scripturl' => "http://edgar.netflint.net/status.php",
             'jid' => MY_JABBER_ID,

Modified: trunk/lib/plugin/LdapSearch.php
===================================================================
--- trunk/lib/plugin/LdapSearch.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/LdapSearch.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -51,12 +51,12 @@
 
 class WikiPlugin_LdapSearch extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Search an LDAP directory.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('host' => "", // default: LDAP_AUTH_HOST
             'port' => 389, // ignored if host = full uri

Modified: trunk/lib/plugin/LikePages.php
===================================================================
--- trunk/lib/plugin/LikePages.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/LikePages.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -27,7 +27,7 @@
 
 class WikiPlugin_LikePages extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return sprintf(
             _("List page names which share an initial or final title word with ā€œ%sā€."),
@@ -35,7 +35,7 @@
         );
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array_merge(
             PageList::supportedArgs(),
@@ -133,7 +133,7 @@
         return $pagelist;
     }
 
-    private function _quote($str)
+    private function _quote($str): string
     {
         return "'" . str_replace("'", "''", $str) . "'";
     }

Modified: trunk/lib/plugin/LinkDatabase.php
===================================================================
--- trunk/lib/plugin/LinkDatabase.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/LinkDatabase.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -39,7 +39,7 @@
  */
 class WikiPlugin_LinkDatabase extends WikiPluginCached
 {
-    public function getPluginType()
+    public function getPluginType(): int
     {
         return PLUGIN_CACHED_HTML;
     }
@@ -49,12 +49,12 @@
         return _("List all pages with all links in various formats for some Java Visualization tools.");
     }
 
-    public function getExpire($dbi, $argarray, $request)
+    public function getExpire($dbi, $argarray, $request): string
     {
         return '+900'; // 15 minutes
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array_merge(
             PageList::supportedArgs(),

Modified: trunk/lib/plugin/LinkSearch.php
===================================================================
--- trunk/lib/plugin/LinkSearch.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/LinkSearch.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -35,12 +35,12 @@
 {
     public $current_row;
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Search page and link names.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array_merge(
             PageList::supportedArgs(), // paging and more.

Modified: trunk/lib/plugin/ListPages.php
===================================================================
--- trunk/lib/plugin/ListPages.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/ListPages.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -36,12 +36,12 @@
 
 class WikiPlugin_ListPages extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("List pages that are explicitly given as the pages argument.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array_merge(
             PageList::supportedArgs(),

Modified: trunk/lib/plugin/ListRelations.php
===================================================================
--- trunk/lib/plugin/ListRelations.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/ListRelations.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -32,12 +32,12 @@
 
 class WikiPlugin_ListRelations extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Display the list of all defined relations and optionnally attributes in this entire wiki.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array_merge(
             PageList::supportedArgs(), // paging and more.

Modified: trunk/lib/plugin/ListSubpages.php
===================================================================
--- trunk/lib/plugin/ListSubpages.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/ListSubpages.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -32,12 +32,12 @@
 
 class WikiPlugin_ListSubpages extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Lists the names of all SubPages of the current page.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array_merge(
             PageList::supportedArgs(),

Modified: trunk/lib/plugin/MediawikiTable.php
===================================================================
--- trunk/lib/plugin/MediawikiTable.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/MediawikiTable.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -54,12 +54,12 @@
 
 class WikiPlugin_MediawikiTable extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Layout tables using a Mediawiki-like markup style.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array();
     }
@@ -71,7 +71,7 @@
      * @param  string $basepage The pagename the plugin is invoked from.
      * @return array  List of pagenames linked to.
      */
-    public function getWikiPageLinks($argstr, $basepage)
+    public function getWikiPageLinks($argstr, $basepage): array
     {
         return getTextLinks($argstr);
     }

Modified: trunk/lib/plugin/ModeratedPage.php
===================================================================
--- trunk/lib/plugin/ModeratedPage.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/ModeratedPage.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -41,12 +41,12 @@
 {
     public $_tokens;
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Support moderated pages.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('page' => '[pagename]',
             'moderators' => false,
@@ -111,7 +111,7 @@
      * @param string $argstr
      * @return array
      */
-    public function resolve_argstr(&$request, $argstr)
+    public function resolve_argstr(&$request, $argstr): array
     {
         $args = $this->getArgs($argstr);
         $group = $request->getGroup();
@@ -169,7 +169,7 @@
      * @param array $moderated
      * @return bool|HtmlElement
      */
-    public function lock_check(&$request, &$page, $moderated)
+    public function lock_check(&$request, &$page, array $moderated)
     {
         $action_page = $request->getPage(_("ModeratedPage"));
         $status = $this->getSiteStatus($request, $action_page);
@@ -253,7 +253,7 @@
      * @param WikiDB_Page $page
      * @return bool
      */
-    public function handler(&$request, &$page)
+    public function handler(&$request, &$page): bool
     {
         $action = $request->getArg('action');
         $moderated = $page->get('moderated');
@@ -349,7 +349,7 @@
      * @param array $moderation
      * @return HtmlElement|string
      */
-    public function approve(&$request, $args, &$moderation)
+    public function approve(&$request, array $args, array &$moderation)
     {
         if ($request->isPost()) {
             // this is unsafe because we dont know if it will succeed. but we tried.
@@ -387,7 +387,7 @@
      * @param array $moderation
      * @return HtmlElement|string
      */
-    public function reject(&$request, $args, &$moderation)
+    public function reject(&$request, array $args, array &$moderation)
     {
         // check id, delete action
         if ($request->isPost()) {
@@ -404,7 +404,7 @@
      * @param array $args
      * @param array $moderation
      */
-    public function cleanup_and_notify(&$request, $args, &$moderation)
+    public function cleanup_and_notify(&$request, array $args, array &$moderation)
     {
         $pagename = $moderation['args']['pagename'];
         $page = $request->_dbi->getPage($pagename);
@@ -446,7 +446,7 @@
      * @param string $pass
      * @return HtmlElement
      */
-    private function approval_form(&$request, $args, $moderation, $pass = 'approve')
+    private function approval_form(&$request, array $args, array $moderation, string $pass = 'approve')
     {
         $header = HTML::h3(_("Please approve or reject this request:"));
 

Modified: trunk/lib/plugin/MostPopular.php
===================================================================
--- trunk/lib/plugin/MostPopular.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/MostPopular.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -27,12 +27,12 @@
 
 class WikiPlugin_MostPopular extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("List the most popular pages.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array_merge(
             PageList::supportedArgs(),

Modified: trunk/lib/plugin/NewPagesPerUser.php
===================================================================
--- trunk/lib/plugin/NewPagesPerUser.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/NewPagesPerUser.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -32,7 +32,7 @@
 
 class WikiPlugin_NewPagesPerUser extends WikiPlugin
 {
-    private function cmp_by_count($a, $b)
+    private function cmp_by_count($a, $b): int
     {
         if ($a['count'] == $b['count']) {
             return 0;
@@ -40,12 +40,12 @@
         return $a['count'] < $b['count'] ? 1 : -1;
     }
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("List all new pages per month per user.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('userid' => '',
             'month' => '',

Modified: trunk/lib/plugin/NoCache.php
===================================================================
--- trunk/lib/plugin/NoCache.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/NoCache.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -38,12 +38,12 @@
 
 class WikiPlugin_NoCache extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Don't cache this page.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('nocache' => 1);
     }

Modified: trunk/lib/plugin/OldStyleTable.php
===================================================================
--- trunk/lib/plugin/OldStyleTable.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/OldStyleTable.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -47,12 +47,12 @@
 
 class WikiPlugin_OldStyleTable extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Layout tables using the old markup style.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array(
             'caption' => '',
@@ -69,7 +69,7 @@
      * @param  string $basepage The pagename the plugin is invoked from.
      * @return array  List of pagenames linked to.
      */
-    public function getWikiPageLinks($argstr, $basepage)
+    public function getWikiPageLinks($argstr, $basepage): array
     {
         return getTextLinks($argstr);
     }

Modified: trunk/lib/plugin/OrphanedPages.php
===================================================================
--- trunk/lib/plugin/OrphanedPages.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/OrphanedPages.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -32,12 +32,12 @@
 
 class WikiPlugin_OrphanedPages extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("List pages which are not linked to by any other page.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('noheader' => false,
             'include_empty' => false,

Modified: trunk/lib/plugin/PageDump.php
===================================================================
--- trunk/lib/plugin/PageDump.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/PageDump.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -54,12 +54,12 @@
     public $MessageId;
     public $pagename;
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("View a single page dump online.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('s' => false,
             'page' => '[pagename]',

Modified: trunk/lib/plugin/PageGroup.php
===================================================================
--- trunk/lib/plugin/PageGroup.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/PageGroup.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -43,12 +43,12 @@
 
 class WikiPlugin_PageGroup extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return sprintf(_("PageGroup for %s."), '[pagename]');
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array(
             'parent' => '',
@@ -60,7 +60,7 @@
     }
 
     // Stolen from IncludePage.php
-    public function extractGroupSection($section, $content, $page)
+    public function extractGroupSection($section, $content, $page): array
     {
         $qsection = preg_replace('/\s+/', '\s+', preg_quote($section, '/'));
         if (preg_match(

Modified: trunk/lib/plugin/PageHistory.php
===================================================================
--- trunk/lib/plugin/PageHistory.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/PageHistory.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -89,7 +89,7 @@
 
 class _PageHistory_HtmlFormatter extends _RecentChanges_HtmlFormatter
 {
-    public function include_versions_in_URLs()
+    public function include_versions_in_URLs(): bool
     {
         return true;
     }
@@ -109,12 +109,12 @@
         );
     }
 
-    public function title()
+    public function title(): string
     {
         return "PageHistory:" . $this->_args['page'];
     }
 
-    public function empty_message()
+    public function empty_message(): string
     {
         return _("No revisions found");
     }
@@ -253,22 +253,22 @@
 
 class _PageHistory_RssFormatter extends _RecentChanges_RssFormatter
 {
-    public function include_versions_in_URLs()
+    public function include_versions_in_URLs(): bool
     {
         return true;
     }
 
-    public function image_properties()
+    public function image_properties(): bool
     {
         return false;
     }
 
-    public function textinput_properties()
+    public function textinput_properties(): bool
     {
         return false;
     }
 
-    public function channel_properties()
+    public function channel_properties(): array
     {
         global $request;
 
@@ -286,7 +286,7 @@
             'dc:date' => Iso8601DateTime(time()));
     }
 
-    public function item_properties($rev)
+    public function item_properties($rev): array
     {
         if (!($title = $this->summary($rev))) {
             $title = sprintf(_("Version %d"), $rev->getVersion());
@@ -306,12 +306,12 @@
 
 class WikiPlugin_PageHistory extends WikiPlugin_RecentChanges
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return sprintf(_("List PageHistory for %s."), '[pagename]');
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('days' => false,
             'show_minor' => true,
@@ -321,7 +321,7 @@
             'format' => false);
     }
 
-    public function getDefaultFormArguments()
+    public function getDefaultFormArguments(): array
     {
         $dflts = WikiPlugin_RecentChanges::getDefaultFormArguments();
         $dflts['textinput'] = 'page';
@@ -328,7 +328,7 @@
         return $dflts;
     }
 
-    public function getMostRecentParams($args)
+    public function getMostRecentParams($args): array
     {
         $params = WikiPlugin_RecentChanges::getMostRecentParams($args);
         $params['include_all_revisions'] = true;

Modified: trunk/lib/plugin/PageInfo.php
===================================================================
--- trunk/lib/plugin/PageInfo.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/PageInfo.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -30,7 +30,7 @@
 
 class WikiPlugin_PageInfo extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return sprintf(
             _("Show extra page Info and statistics for %s."),
@@ -38,7 +38,7 @@
         );
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('page' => '[pagename]',
             'version' => '[version]');

Modified: trunk/lib/plugin/PageTrail.php
===================================================================
--- trunk/lib/plugin/PageTrail.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/PageTrail.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -42,13 +42,13 @@
 {
     public $def_numberlinks = 5;
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Display PageTrail.");
     }
 
     // default values
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('numberlinks' => $this->def_numberlinks,
             'invisible' => false,

Modified: trunk/lib/plugin/PasswordReset.php
===================================================================
--- trunk/lib/plugin/PasswordReset.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/PasswordReset.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -40,12 +40,12 @@
 
 class WikiPlugin_PasswordReset extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Allow admin to reset any users password, allow user to request his password by e-mail.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('user' => '');
     }
@@ -74,7 +74,7 @@
      * @param WikiRequest $request
      * @param string $userid
      */
-    private function doEmail(&$request, $userid)
+    private function doEmail(&$request, string $userid)
     {
         $thisuser = WikiUser($userid);
         $prefs = $thisuser->getPreferences();
@@ -109,7 +109,7 @@
      * @param string $footer
      * @return HtmlElement
      */
-    private function doForm(&$request, $userid = '', $header = '', $footer = '')
+    private function doForm(&$request, string $userid = '', string $header = '', string $footer = '')
     {
         if (!$header) {
             $header = HTML::p(

Modified: trunk/lib/plugin/PhotoAlbum.php
===================================================================
--- trunk/lib/plugin/PhotoAlbum.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/PhotoAlbum.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -41,12 +41,12 @@
 
 class WikiPlugin_PhotoAlbum extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Display a set of photos listed in a text file with optional descriptions.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('src' => '', // textfile of image list, or local dir.
             'url' => '', // if src=localfs, url prefix (webroot for the links)
@@ -520,11 +520,11 @@
      * Calculate the new size in pixels when the original size
      * with a value is given.
      *
-     * @param  integer $oldSize Absolute no. of pixels
+     * @param integer $oldSize Absolute no. of pixels
      * @param  mixed   $value   Either absolute no. or HTML percentage e.g. '50%'
      * @return integer New size in pixels
      */
-    private function newSize($oldSize, $value)
+    private function newSize(int $oldSize, $value): int
     {
         if (trim(substr($value, strlen($value) - 1)) != "%") {
             return $value;
@@ -541,7 +541,7 @@
      * @param array $photos
      * @return string Error if fixed location is not allowed
      */
-    private function fromLocation($src, &$photos)
+    private function fromLocation(string $src, array &$photos): string
     {
         //FIXME!
         if (!IsSafeURL($src)) {
@@ -555,12 +555,12 @@
      * fromFile - read pictures & descriptions (separated by ;)
      *            from $src and return it in array $photos
      *
-     * @param  string $src    path to dir or textfile (local or remote)
-     * @param  array  $photos
-     * @param  string $webpath
+     * @param string $src    path to dir or textfile (local or remote)
+     * @param array $photos
+     * @param string $webpath
      * @return string Error when bad URL or file couldn't be opened
      */
-    private function fromFile($src, &$photos, $webpath = '')
+    private function fromFile(string $src, array &$photos, string $webpath = ''): string
     {
         $src_bak = $src;
         if (preg_match("/^Upload:(.*)$/", $src, $m)) {

Modified: trunk/lib/plugin/PhpHighlight.php
===================================================================
--- trunk/lib/plugin/PhpHighlight.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/PhpHighlight.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -38,13 +38,13 @@
     public $oldhtml;
     public $olddefault;
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("PHP syntax highlighting.");
     }
 
     // Establish default values for each of this plugin's arguments.
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         // TODO: results of ini_get() should be static for multiple
         // invocations of plugin on one WikiPage

Modified: trunk/lib/plugin/Ploticus.php
===================================================================
--- trunk/lib/plugin/Ploticus.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/Ploticus.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -73,7 +73,7 @@
      * or HTML if the imagetype is not supported by GD (EPS, SVG, SVGZ) (not yet)
      * or IMG_INLINE if device = png, gif or jpeg
      */
-    public function getPluginType()
+    public function getPluginType(): int
     {
         if (!empty($this->_args['-csmap'])) {
             return PLUGIN_CACHED_MAP;
@@ -104,12 +104,12 @@
         return _("Ploticus image creation.");
     }
 
-    public function managesValidators()
+    public function managesValidators(): bool
     {
         return true;
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array(
             'device' => 'png', // png,gif,svgz,svg,...
@@ -131,7 +131,7 @@
      * functions are called seldomly) or to about two minutes
      * if a help screen is created.
      */
-    public function getExpire($dbi, $argarray, $request)
+    public function getExpire($dbi, $argarray, $request): string
     {
         if (!empty($argarray['help'])) {
             return '+120';
@@ -152,7 +152,7 @@
      * @param Request $request
      * @return string 'png', 'jpeg', 'gif'
      */
-    public function getImageType($dbi, $argarray, $request)
+    public function getImageType($dbi, $argarray, $request): string
     {
         return $argarray['device'];
     }
@@ -178,7 +178,7 @@
      * TODO: -csmap pointing to the Ploticus documentation at sf.net.
      * @return string image handle
      */
-    public function helpImage()
+    public function helpImage(): string
     {
         $def = $this->defaultArguments();
         //$other_imgtypes = $GLOBALS['PLUGIN_CACHED_IMGTYPES'];
@@ -212,7 +212,7 @@
         );
     }
 
-    public function withShellCommand($script)
+    public function withShellCommand($script): int
     {
         $findme = 'shell';
         $pos = strpos($script, $findme); // uppercase?
@@ -316,12 +316,12 @@
      *
      * @return string
      */
-    protected function pngArg()
+    protected function pngArg(): string
     {
         return 'device';
     }
 
-    protected function getMap($dbi, $argarray, $request)
+    protected function getMap($dbi, $argarray, $request): array
     {
         $img = $this->getImage($dbi, $argarray, $request);
         return array($this->_mapfile, $img);

Modified: trunk/lib/plugin/PluginManager.php
===================================================================
--- trunk/lib/plugin/PluginManager.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/PluginManager.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -29,12 +29,12 @@
 
 class WikiPlugin_PluginManager extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("List of plugins on this wiki.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('info' => 'args');
     }

Modified: trunk/lib/plugin/PopUp.php
===================================================================
--- trunk/lib/plugin/PopUp.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/PopUp.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -47,12 +47,12 @@
 
 class WikiPlugin_PopUp extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Create a clickable popup link.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('link' => "HomePage",
             'title' => "",

Modified: trunk/lib/plugin/PopularNearby.php
===================================================================
--- trunk/lib/plugin/PopularNearby.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/PopularNearby.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -40,12 +40,12 @@
 
 class WikiPlugin_PopularNearby extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("List the most popular pages nearby.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('pagename' => '[pagename]',
             'mode' => 'nearby', // or 'incoming' or 'outgoing'
@@ -136,7 +136,7 @@
      * @param int $limit
      * @return Array of sorted links
      */
-    private function sortedLinks($pages, $direction = false, $limit = 5)
+    private function sortedLinks(array $pages, bool $direction = false, int $limit = 5): array
     {
         $links = array();
         if (is_array($pages)) {
@@ -178,7 +178,7 @@
         return $this->sortByHits($links);
     }
 
-    public function sortByHits($links)
+    public function sortByHits($links): array
     {
         if (!$links) {
             return array();
@@ -189,7 +189,7 @@
     }
 }
 
-function cmp_by_hits($a, $b)
+function cmp_by_hits($a, $b): int
 {
     if ($a['hits'] == $b['hits']) {
         return 0;

Modified: trunk/lib/plugin/PopularTags.php
===================================================================
--- trunk/lib/plugin/PopularTags.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/PopularTags.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -31,7 +31,7 @@
 class WikiPlugin_PopularTags extends WikiPlugin
 {
     // get list of categories sorted by number of backlinks
-    private function cmp_by_count($a, $b)
+    private function cmp_by_count($a, $b): int
     {
         if ($a['count'] == $b['count']) {
             return 0;
@@ -39,12 +39,12 @@
         return $a['count'] < $b['count'] ? 1 : -1;
     }
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("List the most popular tags.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array(
             'limit' => 10,

Modified: trunk/lib/plugin/PreferenceApp.php
===================================================================
--- trunk/lib/plugin/PreferenceApp.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/PreferenceApp.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -49,12 +49,12 @@
 
 class WikiPlugin_PreferenceApp extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Analyze preferences based on voting budget and ratings.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array(
             'category' => null,

Modified: trunk/lib/plugin/PrevNext.php
===================================================================
--- trunk/lib/plugin/PrevNext.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/PrevNext.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -31,12 +31,12 @@
 
 class WikiPlugin_PrevNext extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return sprintf(_("Easy navigation buttons for %s."), '[pagename]');
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array(
             'prev' => '',

Modified: trunk/lib/plugin/Processing.php
===================================================================
--- trunk/lib/plugin/Processing.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/Processing.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -31,12 +31,12 @@
 {
     public $source;
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Render inline Processing.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('width' => 200,
             'height' => 200,
@@ -99,7 +99,7 @@
 
 class Processing_HTML extends HtmlElement
 {
-    public function startTag()
+    public function startTag(): string
     {
         $start = "<" . $this->_tag;
         $this->_setClasses();

Modified: trunk/lib/plugin/RandomPage.php
===================================================================
--- trunk/lib/plugin/RandomPage.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/RandomPage.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -31,12 +31,12 @@
 
 class WikiPlugin_RandomPage extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Display a list of randomly chosen pages or redirects to a random page.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array_merge(
             PageList::supportedArgs(),
@@ -132,7 +132,7 @@
         return $pagelist;
     }
 
-    private function default_exclude()
+    private function default_exclude(): string
     {
         // Some useful default pages to exclude.
         $default_exclude = 'RandomPage,HomePage';

Modified: trunk/lib/plugin/RateIt.php
===================================================================
--- trunk/lib/plugin/RateIt.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/RateIt.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -96,7 +96,7 @@
     public $numusers;
 
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Rating system. Store user ratings per page.");
     }
@@ -141,7 +141,7 @@
         return str_replace("'", "\'", $s);
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('pagename' => '[pagename]',
             'version' => false,
@@ -416,7 +416,7 @@
      *              And only the widget, but no value (for buddies) also.
      * @return $this
      */
-    public function RatingWidgetHtml($pagename, $version, $imgPrefix, $dimension, $small = false)
+    public function RatingWidgetHtml(string $pagename, int $version, string $imgPrefix, int $dimension, bool $small = false)
     {
         global $WikiTheme, $request;
 

Modified: trunk/lib/plugin/RawHtml.php
===================================================================
--- trunk/lib/plugin/RawHtml.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/RawHtml.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -40,17 +40,17 @@
 
 class WikiPlugin_RawHtml extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Provide for raw HTML within wiki pages.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array();
     }
 
-    public function managesValidators()
+    public function managesValidators(): bool
     {
         // The plugin output will only change if the plugin
         // invocation (page text) changes --- so the necessary
@@ -166,7 +166,7 @@
         return $html;
     }
 
-    public function safe_html($html, $allowedtags = "")
+    public function safe_html($html, $allowedtags = ""): string
     {
         $version = "safe_html.php/0.4";
 

Modified: trunk/lib/plugin/RecentChanges.php
===================================================================
--- trunk/lib/plugin/RecentChanges.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/RecentChanges.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -77,24 +77,24 @@
         return $title;
     }
 
-    public function include_versions_in_URLs()
+    public function include_versions_in_URLs(): bool
     {
         return (bool)$this->_args['show_all'];
     }
 
-    public function date($rev)
+    public function date($rev): string
     {
         global $WikiTheme;
         return $WikiTheme->getDay($rev->get('mtime'));
     }
 
-    public function time($rev)
+    public function time($rev): string
     {
         global $WikiTheme;
         return $WikiTheme->formatTime($rev->get('mtime'));
     }
 
-    public function diffURL($rev)
+    public function diffURL($rev): string
     {
         $args = $this->_diffargs;
         if ($this->include_versions_in_URLs()) {
@@ -104,7 +104,7 @@
         return WikiURL($page->getName(), $args, $this->_absurls);
     }
 
-    public function historyURL($rev)
+    public function historyURL($rev): string
     {
         $page = $rev->getPage();
         return WikiURL(
@@ -114,7 +114,7 @@
         );
     }
 
-    public function pageURL($rev)
+    public function pageURL($rev): string
     {
         return WikiURL(
             $this->include_versions_in_URLs() ? $rev : $rev->getPage(),
@@ -123,7 +123,7 @@
         );
     }
 
-    public function authorHasPage($author)
+    public function authorHasPage($author): bool
     {
         global $request;
         $dbi = $request->getDbh();
@@ -135,7 +135,7 @@
         return $this->authorHasPage($author) ? WikiURL($author) : false;
     }
 
-    public function status($rev)
+    public function status($rev): string
     {
         if ($rev->hasDefaultContents()) {
             return 'deleted';
@@ -148,7 +148,7 @@
         return 'updated';
     }
 
-    public function importance($rev)
+    public function importance($rev): string
     {
         return $rev->get('is_minor_edit') ? 'minor' : 'major';
     }
@@ -191,7 +191,7 @@
     }
 
     /* deletions: red, additions: green */
-    public function diffSummary($rev)
+    public function diffSummary($rev): string
     {
         $html = $this->diffURL($rev);
         return '';
@@ -455,7 +455,7 @@
     }
 
     /* was title */
-    public function headline()
+    public function headline(): array
     {
         extract($this->_args);
         return array($this->title(),
@@ -467,7 +467,7 @@
             $this->sidebar_link());
     }
 
-    public function empty_message()
+    public function empty_message(): string
     {
         if (isset($this->_args['caption']) and $this->_args['caption'] == _("Recent Comments")) {
             return _("No comments found");
@@ -636,7 +636,7 @@
  */
 class _RecentChanges_UserContribsFormatter extends _RecentChanges_HtmlFormatter
 {
-    public function headline()
+    public function headline(): array
     {
         global $request;
         extract($this->_args);
@@ -728,7 +728,7 @@
     {
     }
 
-    public function headline()
+    public function headline(): array
     {
         //title click opens the normal RC or RE page in the main browser frame
         extract($this->_args);
@@ -852,7 +852,7 @@
     {
     }
 
-    public function headline()
+    public function headline(): array
     {
         return array();
     }
@@ -914,12 +914,12 @@
 {
     public $_absurls = true;
 
-    public function time($rev)
+    public function time($rev): string
     {
         return Iso8601DateTime($rev->get('mtime'));
     }
 
-    public function pageURI($rev)
+    public function pageURI($rev): string
     {
         return WikiURL($rev, array(), 'absurl');
     }
@@ -980,7 +980,7 @@
             'url' => $img_url);
     }
 
-    public function textinput_properties()
+    public function textinput_properties(): array
     {
         return array('title' => _("Search"),
             'description' => _("Title Search"),
@@ -988,7 +988,7 @@
             'link' => WikiURL(_("TitleSearch"), array(), 'absurl'));
     }
 
-    public function channel_properties()
+    public function channel_properties(): array
     {
         global $request;
 
@@ -1023,7 +1023,7 @@
          */
     }
 
-    public function item_properties($rev)
+    public function item_properties($rev): array
     {
         $page = $rev->getPage();
         $pagename = $page->getName();
@@ -1091,7 +1091,7 @@
         $request->finish(); // NORETURN!!!!
     }
 
-    public function channel_properties()
+    public function channel_properties(): array
     {
         $chann_10 = parent::channel_properties();
         return array_merge(
@@ -1106,12 +1106,12 @@
     }
 
     // xml-rpc registerProcedure not yet implemented
-    public function cloud_properties()
+    public function cloud_properties(): bool
     {
         return false;
     }
 
-    public function cloud_properties_test()
+    public function cloud_properties_test(): array
     {
         return array('protocol' => 'xml-rpc', // xml-rpc or soap or http-post
             'registerProcedure' => 'wiki.rssPleaseNotify',
@@ -1174,7 +1174,7 @@
         $request->finish(); // NORETURN!!!!
     }
 
-    public function item_properties($rev)
+    public function item_properties($rev): array
     {
         $page = $rev->getPage();
         $pagename = $page->getName();
@@ -1378,12 +1378,12 @@
 
 class WikiPlugin_RecentChanges extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("List all recent changes in this wiki.");
     }
 
-    public function managesValidators()
+    public function managesValidators(): bool
     {
         // Note that this is a bit of a fig.
         // We set validators based on the most recently changed page,
@@ -1402,7 +1402,7 @@
         return true;
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('days' => 2,
             'show_minor' => false,
@@ -1429,7 +1429,7 @@
      * @param array $defaults
      * @return array
      */
-    public function getArgs($argstr, $request = false, $defaults = array())
+    public function getArgs($argstr, $request = false, $defaults = array()): array
     {
         if (empty($defaults)) {
             $defaults = $this->getDefaultArguments();
@@ -1455,7 +1455,7 @@
         return $args;
     }
 
-    public function getMostRecentParams($args)
+    public function getMostRecentParams($args): array
     {
         $show_all = false;
         $show_minor = false;

Modified: trunk/lib/plugin/RecentComments.php
===================================================================
--- trunk/lib/plugin/RecentComments.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/RecentComments.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -33,12 +33,12 @@
 
 class WikiPlugin_RecentComments extends WikiPlugin_RecentChanges
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("List basepages with recently added comments.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         $args = parent::getDefaultArguments();
         $args['show_minor'] = false;
@@ -88,7 +88,7 @@
 
 class _RecentChanges_CommentFormatter extends _RecentChanges_HtmlFormatter
 {
-    public function empty_message()
+    public function empty_message(): string
     {
         return _("No comments found");
     }

Modified: trunk/lib/plugin/RecentEdits.php
===================================================================
--- trunk/lib/plugin/RecentEdits.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/RecentEdits.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -26,12 +26,12 @@
 
 class WikiPlugin_RecentEdits extends WikiPlugin_RecentChanges
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("List all recent edits in this wiki.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         $args = parent::getDefaultArguments();
         $args['show_minor'] = true;

Modified: trunk/lib/plugin/RecentReferrers.php
===================================================================
--- trunk/lib/plugin/RecentReferrers.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/RecentReferrers.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -32,12 +32,12 @@
 
 class WikiPlugin_RecentReferrers extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Analyse access log.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array_merge(
             PageList::supportedArgs(),

Modified: trunk/lib/plugin/RedirectTo.php
===================================================================
--- trunk/lib/plugin/RedirectTo.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/RedirectTo.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -40,12 +40,12 @@
 
 class WikiPlugin_RedirectTo extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Redirect to another URL or page.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('href' => '',
                      'page' => '');

Modified: trunk/lib/plugin/RelatedChanges.php
===================================================================
--- trunk/lib/plugin/RelatedChanges.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/RelatedChanges.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -45,12 +45,12 @@
 
 class WikiPlugin_RelatedChanges extends WikiPlugin_RecentChanges
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("List of changes on all pages which are linked to from this page.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         $args = parent::getDefaultArguments();
         $args['page'] = '[pagename]';

Modified: trunk/lib/plugin/RichTable.php
===================================================================
--- trunk/lib/plugin/RichTable.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/RichTable.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -31,12 +31,12 @@
 
 class WikiPlugin_RichTable extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Layout tables using a very rich markup style.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array();
     }
@@ -48,7 +48,7 @@
      * @param  string $basepage The pagename the plugin is invoked from.
      * @return array  List of pagenames linked to.
      */
-    public function getWikiPageLinks($argstr, $basepage)
+    public function getWikiPageLinks($argstr, $basepage): array
     {
         return getTextLinks($argstr);
     }

Modified: trunk/lib/plugin/RssFeed.php
===================================================================
--- trunk/lib/plugin/RssFeed.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/RssFeed.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -30,13 +30,13 @@
 
 class WikiPlugin_RssFeed extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Simple RSS Feed aggregator.");
     }
 
     // Establish default values for each of this plugin's arguments.
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('feed' => "",
             'description' => "",

Modified: trunk/lib/plugin/SearchHighlight.php
===================================================================
--- trunk/lib/plugin/SearchHighlight.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/SearchHighlight.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -37,12 +37,12 @@
 
 class WikiPlugin_SearchHighlight extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Hilight referred search terms.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         // s, engine and engine_url are picked from the request
         return array(

Modified: trunk/lib/plugin/SemanticRelations.php
===================================================================
--- trunk/lib/plugin/SemanticRelations.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/SemanticRelations.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -33,12 +33,12 @@
 
 class WikiPlugin_SemanticRelations extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Display the list of relations and attributes on this page.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array(
             'page' => "[pagename]", // which pages (glob allowed), default: current

Modified: trunk/lib/plugin/SemanticSearch.php
===================================================================
--- trunk/lib/plugin/SemanticSearch.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/SemanticSearch.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -61,12 +61,12 @@
     public $_links;
     public $current_row;
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Search relations and attributes.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array_merge(
             PageList::supportedArgs(), // paging and more.

Modified: trunk/lib/plugin/SemanticSearchAdvanced.php
===================================================================
--- trunk/lib/plugin/SemanticSearchAdvanced.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/SemanticSearchAdvanced.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -61,12 +61,12 @@
 {
     public $_supported_operators;
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Parse and execute a full query expression.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array_merge(
             PageList::supportedArgs(), // paging and more.
@@ -268,7 +268,7 @@
     // is_a::city* and (population < 1.000.000 or population > 10.000.000)
     // => is_a population
     // Do we support wildcards in relation names also? is_*::city
-    public function detectRelationsAndAttributes($subquery)
+    public function detectRelationsAndAttributes($subquery): array
     {
         $relations = array();
         // relations are easy

Modified: trunk/lib/plugin/SiteMap.php
===================================================================
--- trunk/lib/plugin/SiteMap.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/SiteMap.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -54,12 +54,12 @@
     public $dbi;
     public $_default_limit;
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Recursively get BackLinks or links.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('exclude' => '',
             'include_self' => false,

Modified: trunk/lib/plugin/SpellCheck.php
===================================================================
--- trunk/lib/plugin/SpellCheck.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/SpellCheck.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -70,23 +70,23 @@
 
 class WikiPlugin_SpellCheck extends WikiPlugin
 {
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Check the spelling of a page and make suggestions.");
     }
 
-    public function managesValidators()
+    public function managesValidators(): bool
     {
         return true;
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('pagename' => '[]', // button or preview highlight?
         );
     }
 
-    public function pspell_check($text, $lang = false)
+    public function pspell_check($text, $lang = false): array
     {
         if ($lang) {
             $lang = $GLOBALS['LANG'];

Modified: trunk/lib/plugin/SqlResult.php
===================================================================
--- trunk/lib/plugin/SqlResult.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/SqlResult.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -65,12 +65,12 @@
     public $_args;
     public $_sql;
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Display arbitrary SQL result tables.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array(
             'alias' => false, // DSN database specification

Modified: trunk/lib/plugin/SyncWiki.php
===================================================================
--- trunk/lib/plugin/SyncWiki.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/SyncWiki.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -46,12 +46,12 @@
 {
     public $_fileList;
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Synchronize pages with external PhpWiki.");
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array('url' => '',
             'noimport' => 0,
@@ -322,7 +322,7 @@
     }
 
     // TODO: store log or checkpoint for restauration?
-    private function _import($args, $our, $extdate = null)
+    private function _import($args, $our, $extdate = null): string
     {
         $reaction = 'import ';
         if ($args['noimport']) {
@@ -351,7 +351,7 @@
     }
 
     // TODO: store log or checkpoint for restauration?
-    private function _export($args, $our)
+    private function _export($args, $our): string
     {
         global $request;
         $reaction = 'export ';
@@ -388,7 +388,7 @@
     }
 
     // TODO: store log or checkpoint for restauration?
-    private function _upload($args, $path, $timeout)
+    private function _upload($args, $path, $timeout): string
     {
         $reaction = 'upload ';
         if ($args['noupload']) {

Modified: trunk/lib/plugin/SyntaxHighlighter.php
===================================================================
--- trunk/lib/plugin/SyntaxHighlighter.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/SyntaxHighlighter.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -26,17 +26,17 @@
 {
     public $source;
 
-    public function getDescription()
+    public function getDescription(): string
     {
         return _("Source code syntax highlighter (via http://highlightjs.org/).");
     }
 
-    public function managesValidators()
+    public function managesValidators(): bool
     {
         return true;
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array(
             'syntax' => null, // required argument

Modified: trunk/lib/plugin/SystemInfo.php
===================================================================
--- trunk/lib/plugin/SystemInfo.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/SystemInfo.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -49,7 +49,7 @@
 {
     public $_dbi;
 
-    public function getPluginType()
+    public function getPluginType(): int
     {
         return PLUGIN_CACHED_HTML;
     }
@@ -65,12 +65,12 @@
      * call $request->appendValidators() with appropriate arguments,
      * and should override this method to return true.
      */
-    public function managesValidators()
+    public function managesValidators(): bool
     {
         return true;
     }
 
-    public function getExpire($dbi, $argarray, $request)
+    public function getExpire($dbi, $argarray, $request): string
     {
         return '+1800'; // 30 minutes
     }
@@ -100,13 +100,13 @@
         trigger_error('pure virtual', E_USER_ERROR);
     }
 
-    public function getDefaultArguments()
+    public function getDefaultArguments(): array
     {
         return array( // 'separator' => ' ', // on multiple args
         );
     }
 
-    public function database()
+    public function database(): string
     {
         $s = "DATABASE_TYPE: " . DATABASE_TYPE . ", ";
         switch (DATABASE_TYPE) {
@@ -134,7 +134,7 @@
         return $s;
     }
 
-    public function cachestats()
+    public function cachestats(): string
     {
         $dbi =& $this->_dbi;
         $cache = $dbi->_cache;
@@ -147,7 +147,7 @@
         return $s;
     }
 
-    public function pagestats()
+    public function pagestats(): string
     {
         global $request;
         $dbi = $request->getDbh();
@@ -163,7 +163,7 @@
     //What kind of link statistics?
     //  total links in, total links out, mean links per page, ...
     //  Any useful numbers similar to a VisualWiki interestmap?
-    public function linkstats()
+    public function linkstats(): string
     {
         return _("not yet");
     }
@@ -173,7 +173,7 @@
     //   calc this from accesslog info?
     // number of anonymous edits?
     //   easy. related to the view/edit rate in accessstats.
-    public function userstats()
+    public function userstats(): string
     {
         $dbi =& $this->_dbi;
         $h = 0;
@@ -195,13 +195,13 @@
     // total hits per day/month/year
     // view/edit rate
     // TODO: see WhoIsOnline hit stats, and sql accesslogs
-    public function accessstats()
+    public function accessstats(): string
     {
         return _("not yet");
     }
 
     // numeric array
-    private function get_stats($hits, $treshold = 10.0)
+    private function get_stats($hits, $treshold = 10.0): array
     {
         sort($hits);
         reset($hits);
@@ -247,7 +247,7 @@
     //  total, max, mean, median, stddev;
     //  %d pages less than 3 hits (<10%)    <10% percent of the leastpopular
     //  %d pages more than 100 hits (>90%)  >90% percent of the mostpopular
-    public function hitstats()
+    public function hitstats(): string
     {
         $dbi =& $this->_dbi;
         $hits = array();
@@ -390,7 +390,7 @@
     // Cache this costly operation.
     // Even if the whole plugin call is stored internally, we cache this
     // separately with a separate key.
-    public function discspace()
+    public function discspace(): string
     {
         global $DBParams;
 
@@ -437,7 +437,7 @@
         return $s;
     }
 
-    public function inlineimages()
+    public function inlineimages(): string
     {
         return implode(' ', explode('|', INLINE_IMAGES));
     }
@@ -447,12 +447,12 @@
         return $GLOBALS['WikiNameRegexp'];
     }
 
-    public function allowedprotocols()
+    public function allowedprotocols(): string
     {
         return implode(' ', explode('|', ALLOWED_PROTOCOLS));
     }
 
-    public function available_plugins()
+    public function available_plugins(): string
     {
         $fileset = new FileSet(findFile('lib/plugin'), '*.php');
         $list = $fileset->getFiles();
@@ -465,7 +465,7 @@
             . implode(', ', array_map($plugin_function, $list));
     }
 
-    public function supported_languages()
+    public function supported_languages(): string
     {
         $available_languages = listAvailableLanguages();
         natcasesort($available_languages);
@@ -485,7 +485,7 @@
                 : '');
     }
 
-    public function supported_themes()
+    public function supported_themes(): string
     {
         global $WikiTheme;
         $available_themes = listAvailableThemes();
@@ -631,7 +631,7 @@
     return $a;
 }
 
-function mean(&$hits, $total = false)
+function mean(&$hits, $total = false): float
 {
     $n = count($hits);
     if (!$total) {
@@ -640,7 +640,7 @@
     return (float)$total / ($n * 1.0);
 }
 
-function stddev(&$hits, $total = false)
+function stddev(&$hits, $total = false): float
 {
     $n = count($hits);
     if (!$total) {

Modified: trunk/lib/plugin/TeX2png.php
===================================================================
--- trunk/lib/plugin/TeX2png.php	2023-07-13 19:30:51 UTC (rev 11047)
+++ trunk/lib/plugin/TeX2png.php	2023-07-14 09:19:32 UTC (rev 11048)
@@ -42,12 +42,12 @@
     public $dvipsbin = '/usr/bin/dvips';

@@ Diff output truncated at 100000 characters. @@
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



_______________________________________________
phpwiki-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/phpwiki-checkins