r104571 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104570‎ | r104571 | r104572 >
Date:16:05, 29 November 2011
Author:jeroendedauw
Status:deferred (Comments)
Tags:
Comment:
docs++
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_Factbox.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Factbox.php
@@ -16,6 +16,11 @@
1717 * This function creates wiki text suitable for rendering a Factbox for a given
1818 * SMWSemanticData object that holds all relevant data. It also checks whether the
1919 * given setting of $showfactbox requires displaying the given data at all.
 20+ *
 21+ * @param SMWSemanticData $semdata
 22+ * @param boolean $showfactbox
 23+ *
 24+ * @return string
2025 */
2126 static public function getFactboxText( SMWSemanticData $semdata, $showfactbox = SMW_FACTBOX_NONEMPTY ) {
2227 global $wgContLang;
@@ -106,8 +111,13 @@
107112 * information found in a given ParserOutput object. If the required custom data
108113 * is not found in the given ParserOutput, then semantic data for the provided Title
109114 * object is retreived from the store.
 115+ *
 116+ * @param ParserOutput $parseroutput
 117+ * @param Title $title
 118+ *
 119+ * @return string
110120 */
111 - static public function getFactboxTextFromOutput( $parseroutput, $title ) {
 121+ static public function getFactboxTextFromOutput( ParserOutput $parseroutput, Title $title ) {
112122 global $wgRequest, $smwgShowFactboxEdit, $smwgShowFactbox;
113123 $mws = ( isset( $parseroutput->mSMWMagicWords ) ) ? $parseroutput->mSMWMagicWords : array();
114124 if ( in_array( 'SMW_SHOWFACTBOX', $mws ) ) {
@@ -136,8 +146,13 @@
137147 * This hook copies SMW's custom data from the given ParserOutput object to
138148 * the given OutputPage object, since otherwise it is not possible to access
139149 * it later on to build a Factbox.
 150+ *
 151+ * @param OutputPage $outputpage
 152+ * @param ParserOutput $parseroutput
 153+ *
 154+ * @return true
140155 */
141 - static public function onOutputPageParserOutput( $outputpage, $parseroutput ) {
 156+ static public function onOutputPageParserOutput( OutputPage $outputpage, ParserOutput $parseroutput ) {
142157 global $wgTitle, $wgParser;
143158 $factbox = SMWFactbox::getFactboxTextFromOutput( $parseroutput, $wgTitle );
144159
@@ -155,8 +170,13 @@
156171
157172 /**
158173 * This hook is used for inserting the Factbox text directly after the wiki page.
 174+ *
 175+ * @param OutputPage $outputpage
 176+ * @param string $text
 177+ *
 178+ * @return true
159179 */
160 - static public function onOutputPageBeforeHTML( $outputpage, &$text ) {
 180+ static public function onOutputPageBeforeHTML( OutputPage $outputpage, &$text ) {
161181 if ( isset( $outputpage->mSMWFactboxText ) ) {
162182 $text .= $outputpage->mSMWFactboxText;
163183 }
@@ -166,8 +186,13 @@
167187 /**
168188 * This hook is used for inserting the Factbox text after the article contents (including
169189 * categories).
 190+ *
 191+ * @param string $data
 192+ * @param Skin|null $skin
 193+ *
 194+ * @return true
170195 */
171 - static public function onSkinAfterContent( &$data, $skin = null ) {
 196+ static public function onSkinAfterContent( &$data, Skin $skin = null ) {
172197 global $wgOut;
173198 if ( isset( $wgOut->mSMWFactboxText ) ) {
174199 $data .= $wgOut->mSMWFactboxText;

Follow-up revisions

RevisionCommit summaryAuthorDate
r104574Follow up to r104571;jeroendedauw16:51, 29 November 2011

Comments

#Comment by Nikerabbit (talk | contribs)   07:26, 2 December 2011

Isn't the order usually @param $var Typehint Description?