From 253d4b48ec708eb42033862dc15c8576f44a48ed Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Wed, 1 Oct 2014 15:32:05 +0200 Subject: more PHPDocs, unused var, small bit code reformatting --- lib/plugins/info/syntax.php | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'lib/plugins/info') diff --git a/lib/plugins/info/syntax.php b/lib/plugins/info/syntax.php index fc0e1af9d..773256faf 100644 --- a/lib/plugins/info/syntax.php +++ b/lib/plugins/info/syntax.php @@ -44,9 +44,14 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { $this->Lexer->addSpecialPattern('~~INFO:\w+~~',$mode,'plugin_info'); } - /** * Handle the match + * + * @param string $match The text matched by the patterns + * @param int $state The lexer state for the match + * @param int $pos The character position of the matched text + * @param Doku_Handler $handler The Doku_Handler object + * @return array Return an array with all data you want to use in render */ function handle($match, $state, $pos, Doku_Handler $handler){ $match = substr($match,7,-2); //strip ~~INFO: from start and ~~ from end @@ -55,6 +60,11 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { /** * Create output + * + * @param string $format string output format being rendered + * @param Doku_Renderer $renderer the current renderer object + * @param array $data data created by handler() + * @return boolean rendered correctly? */ function render($format, Doku_Renderer $renderer, $data) { if($format == 'xhtml'){ @@ -103,6 +113,9 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { * list all installed plugins * * uses some of the original renderer methods + * + * @param string $type + * @param Doku_Renderer_xhtml $renderer */ function _plugins_xhtml($type, Doku_Renderer_xhtml $renderer){ global $lang; @@ -114,7 +127,7 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { // remove subparts foreach($plugins as $p){ if (!$po = plugin_load($type,$p)) continue; - list($name,$part) = explode('_',$p,2); + list($name,/* $part */) = explode('_',$p,2); $plginfo[$name] = $po->getInfo(); } @@ -141,6 +154,8 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { * list all installed plugins * * uses some of the original renderer methods + * + * @param Doku_Renderer_xhtml $renderer */ function _helpermethods_xhtml(Doku_Renderer_xhtml $renderer){ $plugins = plugin_list('helper'); @@ -189,6 +204,8 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { /** * lists all known syntax types and their registered modes + * + * @return string */ function _syntaxtypes_xhtml(){ global $PARSER_MODES; @@ -211,6 +228,8 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { /** * lists all known syntax modes and their sorting value + * + * @return string */ function _syntaxmodes_xhtml(){ $modes = p_get_parsermodes(); -- cgit v1.2.3