From 4cee1f4f9b2a05d9f1da04334395f34c98ac605d Mon Sep 17 00:00:00 2001 From: vargenau Date: Mon, 6 Oct 2014 10:19:30 +0000 Subject: [PATCH] Update PHP Doc; type compatibility git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@9195 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/plugin/GraphViz.php | 9 +++++++-- lib/plugin/RecentChangesCached.php | 2 +- lib/plugin/SiteMap.php | 2 +- lib/plugin/VisualWiki.php | 2 +- lib/wikilens/RatingsDb.php | 9 +++++---- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/lib/plugin/GraphViz.php b/lib/plugin/GraphViz.php index 648039d78..69ca9a7ce 100644 --- a/lib/plugin/GraphViz.php +++ b/lib/plugin/GraphViz.php @@ -205,7 +205,7 @@ class WikiPlugin_GraphViz array(255, 255, 255)); } - function processSource($argarray = false) + function processSource($argarray = array()) { if (empty($this->source)) { // create digraph from pages @@ -240,7 +240,12 @@ class WikiPlugin_GraphViz return $source; } - function createDotFile($tempfile = '', $argarray = false) + /** + * @param string $tempfile + * @param array $argarray + * @return mixed + */ + function createDotFile($tempfile = '', $argarray = array()) { $this->source = $this->processSource($argarray); if (!$this->source) diff --git a/lib/plugin/RecentChangesCached.php b/lib/plugin/RecentChangesCached.php index 3d9fe34a7..5b584c9b4 100644 --- a/lib/plugin/RecentChangesCached.php +++ b/lib/plugin/RecentChangesCached.php @@ -79,7 +79,7 @@ class WikiPlugin_RecentChangesCached // ->box is used to display a fixed-width, narrow version with common header. // Just a limited list of pagenames, without date. // This does not use ->run, to avoid pi construction and deconstruction - function box($args = false, $request = false, $basepage = false, $do_save = false) + function box($args = '', $request = null, $basepage = '', $do_save = false) { if (!$request) $request =& $GLOBALS['request']; if (!isset($args['limit'])) $args['limit'] = 12; diff --git a/lib/plugin/SiteMap.php b/lib/plugin/SiteMap.php index da6490605..2ecca8829 100644 --- a/lib/plugin/SiteMap.php +++ b/lib/plugin/SiteMap.php @@ -144,7 +144,7 @@ class WikiPlugin_SiteMap { include_once 'lib/BlockParser.php'; - $args = $this->getArgs($argstr, $request, false); + $args = $this->getArgs($argstr, $request, array()); extract($args); if (!$page) return ''; diff --git a/lib/plugin/VisualWiki.php b/lib/plugin/VisualWiki.php index e7273871e..d13440f01 100644 --- a/lib/plugin/VisualWiki.php +++ b/lib/plugin/VisualWiki.php @@ -397,7 +397,7 @@ class WikiPlugin_VisualWiki * dot. * * @param string $filename - * @param bool $argarray + * @param array $argarray * @internal param string $filename name of the dot file to be created * @internal param float $width width of the output graph in inches * @internal param float $height height of the graph in inches diff --git a/lib/wikilens/RatingsDb.php b/lib/wikilens/RatingsDb.php index d458a2a9c..38767d0c2 100644 --- a/lib/wikilens/RatingsDb.php +++ b/lib/wikilens/RatingsDb.php @@ -417,7 +417,7 @@ class RatingsDb extends WikiDB * If this is null (or left off), the search for ratings * is not restricted by dimension. * - * @param rater The page id of the rater, i.e. page doing the rating. + * @param int $rater The page id of the rater, i.e. page doing the rating. * This is a Wiki page id, often of a user page. * Example: "DanFr" * [optional] @@ -425,21 +425,21 @@ class RatingsDb extends WikiDB * is not restricted by rater. * TODO: Support an array * - * @param ratee The page id of the ratee, i.e. page being rated. + * @param int $ratee The page id of the ratee, i.e. page being rated. * Example: "DudeWheresMyCar" * [optional] * If this is null (or left off), the search for ratings * is not restricted by ratee. * TODO: Support an array * - * @param orderby An order-by clause with fields and (optionally) ASC + * @param string $orderby An order-by clause with fields and (optionally) ASC * or DESC. * Example: "ratingvalue DESC" * [optional] * If this is null (or left off), the search for ratings * has no guaranteed order * - * @param pageinfo The type of page that has its info returned (i.e., + * @param string $pageinfo The type of page that has its info returned (i.e., * 'pagename', 'hits', and 'pagedata') in the rows. * Example: "rater" * [optional] @@ -448,6 +448,7 @@ class RatingsDb extends WikiDB * * @return DB iterator with results */ + function sql_get_rating($dimension = null, $rater = null, $ratee = null, $orderby = null, $pageinfo = "ratee") { -- 2.45.0