@@ -186,14 +186,17 @@ discard block |
||
186 | 186 | * The function sets the provided call-by-ref values to the respective |
187 | 187 | * values. If errors are encountered, they are added to the objects |
188 | 188 | * error list and false is returned. Otherwise, true is returned. |
189 | - * @param $string string input time representation, e.g. "12 May 2007 13:45:23-3:30" |
|
189 | + * @param string $string string input time representation, e.g. "12 May 2007 13:45:23-3:30" |
|
190 | 190 | * @param $datecomponents array of strings that might belong to the specification of a date |
191 | 191 | * @param $calendarmodesl string if model was set in input, otherwise false |
192 | - * @param $era string '+' or '-' if provided, otherwise false |
|
193 | - * @param $hours integer set to a value between 0 and 24 |
|
194 | - * @param $minutes integer set to a value between 0 and 59 |
|
195 | - * @param $seconds integer set to a value between 0 and 59, or false if not given |
|
196 | - * @param $timeoffset double set to a value for time offset (e.g. 3.5), or false if not given |
|
192 | + * @param boolean $era string '+' or '-' if provided, otherwise false |
|
193 | + * @param boolean $hours integer set to a value between 0 and 24 |
|
194 | + * @param boolean $minutes integer set to a value between 0 and 59 |
|
195 | + * @param boolean $seconds integer set to a value between 0 and 59, or false if not given |
|
196 | + * @param boolean $timeoffset double set to a value for time offset (e.g. 3.5), or false if not given |
|
197 | + * @param boolean $calendarmodel |
|
198 | + * @param boolean $microseconds |
|
199 | + * @param boolean $timezone |
|
197 | 200 | * @return boolean stating if the parsing succeeded |
198 | 201 | * @todo This method in principle allows date parsing to be internationalized further. Should be done. |
199 | 202 | */ |
@@ -405,7 +408,7 @@ discard block |
||
405 | 408 | * messages are added to the objects list of errors, and false is |
406 | 409 | * returned. Otherwise, true is returned. |
407 | 410 | * @param $datecomponents array of strings that might belong to the specification of a date |
408 | - * @param $date array set to result |
|
411 | + * @param boolean $date array set to result |
|
409 | 412 | * @return boolean stating if successful |
410 | 413 | */ |
411 | 414 | protected function interpretDateComponents( $datecomponents, &$date ) { |
@@ -788,6 +791,9 @@ discard block |
||
788 | 791 | } |
789 | 792 | } |
790 | 793 | |
794 | + /** |
|
795 | + * @param string $value |
|
796 | + */ |
|
791 | 797 | private function isInterpretableAsYearOnly( $value ) { |
792 | 798 | return strpos( $value, ' ' ) === false && is_numeric( strval( $value ) ) && ( strval( $value ) < 0 || strlen( $value ) < 6 ); |
793 | 799 | } |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | * |
286 | 286 | * @param DateTime $dateTime |
287 | 287 | * |
288 | - * @return SMWDITime|false |
|
288 | + * @return SMWDITime |
|
289 | 289 | */ |
290 | 290 | public static function newFromDateTime( DateTime $dateTime ) { |
291 | 291 | |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | * |
341 | 341 | * @param string $timestamp must be in format |
342 | 342 | * |
343 | - * @return SMWDITime|false |
|
343 | + * @return SMWDataItem |
|
344 | 344 | */ |
345 | 345 | public static function newFromTimestamp( $timestamp ) { |
346 | 346 | $timestamp = wfTimestamp( TS_MW, (string)$timestamp ); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | * calendar model, presicion. |
38 | 38 | * |
39 | 39 | * @param double $jdValue |
40 | - * @param integer|null $calendarmodel |
|
40 | + * @param integer|null $calendarModel |
|
41 | 41 | * @param integer|null $precision |
42 | 42 | * |
43 | 43 | * @return DITime object |
@@ -113,10 +113,10 @@ discard block |
||
113 | 113 | * calendar model. This calculation assumes that neither calendar |
114 | 114 | * has a year 0. |
115 | 115 | * |
116 | - * @param $year integer representing the year |
|
117 | - * @param $month integer representing the month |
|
118 | - * @param $day integer representing the day |
|
119 | - * @param $calendarmodel integer either SMWDITime::CM_GREGORIAN or SMWDITime::CM_JULIAN |
|
116 | + * @param integer $year integer representing the year |
|
117 | + * @param integer $month integer representing the month |
|
118 | + * @param integer $day integer representing the day |
|
119 | + * @param integer $calendarmodel integer either SMWDITime::CM_GREGORIAN or SMWDITime::CM_JULIAN |
|
120 | 120 | * |
121 | 121 | * @return float Julian Day number |
122 | 122 | * @throws RuntimeException |
@@ -142,9 +142,9 @@ discard block |
||
142 | 142 | * Compute the offset for the Julian Day number from a given time. |
143 | 143 | * This computation is the same for all calendar models. |
144 | 144 | * |
145 | - * @param $hours integer representing the hour |
|
146 | - * @param $minutes integer representing the minutes |
|
147 | - * @param $seconds integer representing the seconds |
|
145 | + * @param integer $hours integer representing the hour |
|
146 | + * @param integer $minutes integer representing the minutes |
|
147 | + * @param integer $seconds integer representing the seconds |
|
148 | 148 | * |
149 | 149 | * @return float offset for a Julian Day number to get this time |
150 | 150 | */ |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | * conversion to Gregorian needs positive JD. If this happens, wrong |
160 | 160 | * values will be returned. Avoid date conversions before 10000 BCE. |
161 | 161 | * |
162 | - * @param $jdvalue float number of Julian Days |
|
162 | + * @param double $jdvalue float number of Julian Days |
|
163 | 163 | * @param $calendarmodel integer either SMWDITime::CM_GREGORIAN or SMWDITime::CM_JULIAN |
164 | 164 | * |
165 | 165 | * @return array( yearnumber, monthnumber, daynumber ) |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | * Extract the time from a Julian Day number and return it as a string. |
208 | 208 | * This conversion is the same for all calendar models. |
209 | 209 | * |
210 | - * @param $jdvalue float number of Julian Days |
|
210 | + * @param double $jdvalue float number of Julian Days |
|
211 | 211 | * @return array( hours, minutes, seconds ) |
212 | 212 | */ |
213 | 213 | protected static function JD2Time( $jdvalue ) { |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | * The third argument was added in SMW 1.9 and should not be used from outside SMW. |
177 | 177 | * |
178 | 178 | * @param string $value |
179 | - * @param mixed $caption |
|
179 | + * @param boolean $caption |
|
180 | 180 | * @param boolean $approximateValue |
181 | 181 | */ |
182 | 182 | public function setUserValue( $value, $caption = false, $approximateValue = false ) { |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | * |
259 | 259 | * @since 1.8 |
260 | 260 | * |
261 | - * @return SMWDIProperty|null |
|
261 | + * @return SMWDIProperty |
|
262 | 262 | */ |
263 | 263 | public function getProperty() { |
264 | 264 | return $this->m_property; |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | /** |
281 | 281 | * @since 2.4 |
282 | 282 | * |
283 | - * @return DIWikiPage|null |
|
283 | + * @return SMWDIWikiPage |
|
284 | 284 | */ |
285 | 285 | public function getContextPage() { |
286 | 286 | return $this->m_contextPage; |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | * |
301 | 301 | * @param string $key |
302 | 302 | * |
303 | - * @return mixed|false |
|
303 | + * @return string|false |
|
304 | 304 | */ |
305 | 305 | public function getOptionValueFor( $key ) { |
306 | 306 | |
@@ -324,7 +324,6 @@ discard block |
||
324 | 324 | /** |
325 | 325 | * @since 2.4 |
326 | 326 | * |
327 | - * @param string $caption |
|
328 | 327 | */ |
329 | 328 | public function getCaption() { |
330 | 329 | return $this->m_caption; |
@@ -492,7 +491,7 @@ discard block |
||
492 | 491 | * |
493 | 492 | * @param string $value |
494 | 493 | * |
495 | - * @return Description |
|
494 | + * @return SMW\Query\Language\Description |
|
496 | 495 | * @throws InvalidArgumentException |
497 | 496 | */ |
498 | 497 | public function getQueryDescription( $value ) { |
@@ -513,7 +512,7 @@ discard block |
||
513 | 512 | * |
514 | 513 | * @since 2.4 |
515 | 514 | * |
516 | - * @return DataValueFormatter |
|
515 | + * @return SMW\DataValues\ValueFormatters\DataValueFormatter |
|
517 | 516 | */ |
518 | 517 | public function getDataValueFormatter() { |
519 | 518 | return ValueFormatterRegistry::getInstance()->getDataValueFormatterFor( $this ); |
@@ -522,7 +521,7 @@ discard block |
||
522 | 521 | /** |
523 | 522 | * @since 2.4 |
524 | 523 | * |
525 | - * @return PropertySpecificationLookup |
|
524 | + * @return SMW\PropertySpecificationLookup |
|
526 | 525 | */ |
527 | 526 | public function getPropertySpecificationLookup() { |
528 | 527 | return ApplicationFactory::getInstance()->getPropertySpecificationLookup(); |
@@ -596,6 +595,7 @@ discard block |
||
596 | 595 | * |
597 | 596 | * The parameter $linker controls linking of values such as titles and should |
598 | 597 | * be some Linker object (or NULL for no linking). |
598 | + * @return string |
|
599 | 599 | */ |
600 | 600 | abstract public function getShortHTMLText( $linker = null ); |
601 | 601 | |
@@ -606,6 +606,7 @@ discard block |
||
606 | 606 | * |
607 | 607 | * The parameter $linked controls linking of values such as titles and should |
608 | 608 | * be non-NULL and non-false if this is desired. |
609 | + * @return string |
|
609 | 610 | */ |
610 | 611 | abstract public function getLongWikiText( $linked = null ); |
611 | 612 |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | * Parse a string of the form "number unit" where unit is optional. The |
75 | 75 | * results are stored in the $number and $unit parameters. Returns an |
76 | 76 | * error code. |
77 | - * @param $value string to parse |
|
77 | + * @param string $value string to parse |
|
78 | 78 | * @param $number call-by-ref parameter that will be set to the numerical value |
79 | 79 | * @param $unit call-by-ref parameter that will be set to the "unit" string (after the number) |
80 | 80 | * @return integer 0 (no errors), 1 (no number found at all), 2 (number |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | /** |
187 | 187 | * @since 2.4 |
188 | 188 | * |
189 | - * @return integer |
|
189 | + * @return string |
|
190 | 190 | */ |
191 | 191 | public function getLocalizedFormattedNumberByPrecision( $value ) { |
192 | 192 | return NumberFormatter::getInstance()->getLocalizedFormattedNumber( $value, $this->getPrecision() ); |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | /** |
196 | 196 | * @since 2.4 |
197 | 197 | * |
198 | - * @return integer |
|
198 | + * @return string |
|
199 | 199 | */ |
200 | 200 | public function getUnformattedNumberByPrecision( $value ) { |
201 | 201 | return NumberFormatter::getInstance()->getUnformattedNumberByPrecision( $value, $this->getPrecision() ); |
@@ -176,6 +176,9 @@ discard block |
||
176 | 176 | return $this->getUnitID( $unit ); |
177 | 177 | } |
178 | 178 | |
179 | + /** |
|
180 | + * @param string|false $unit |
|
181 | + */ |
|
179 | 182 | private function convertToKelvin( $number, $unit ) { |
180 | 183 | |
181 | 184 | switch ( $unit ) { |
@@ -195,6 +198,9 @@ discard block |
||
195 | 198 | return false; // unsupported unit |
196 | 199 | } |
197 | 200 | |
201 | + /** |
|
202 | + * @param string|false $unit |
|
203 | + */ |
|
198 | 204 | private function convertToUnit( $number, $unit ) { |
199 | 205 | |
200 | 206 | switch ( $unit ) { |
@@ -203,6 +203,9 @@ discard block |
||
203 | 203 | return $propertyDescription; |
204 | 204 | } |
205 | 205 | |
206 | + /** |
|
207 | + * @param DIProperty $property |
|
208 | + */ |
|
206 | 209 | private function getPredefinedPropertyDescription( $property, $linker ) { |
207 | 210 | |
208 | 211 | $description = ''; |
@@ -219,6 +222,9 @@ discard block |
||
219 | 222 | return $linker === null ? $message->escaped() : $message->parse(); |
220 | 223 | } |
221 | 224 | |
225 | + /** |
|
226 | + * @param DIProperty $property |
|
227 | + */ |
|
222 | 228 | private function tryToFindLocalPropertyDescription( $property, $linker ) { |
223 | 229 | |
224 | 230 | $description = ''; |
@@ -235,6 +241,9 @@ discard block |
||
235 | 241 | return $description; |
236 | 242 | } |
237 | 243 | |
244 | + /** |
|
245 | + * @param string $languageCode |
|
246 | + */ |
|
238 | 247 | private function findDataValueByLanguage( $dataItems, $languageCode ) { |
239 | 248 | |
240 | 249 | if ( $dataItems === null || $dataItems === array() ) { |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | * |
77 | 77 | * @param string $caption The label for the link. |
78 | 78 | * @param string $target The actual link target. |
79 | - * @param mixed $style CSS class of a span to embedd the link into, or false if no extra style is required. |
|
79 | + * @param string|false $style CSS class of a span to embedd the link into, or false if no extra style is required. |
|
80 | 80 | * @param array $params Array of parameters, format $name => $value, if any. |
81 | 81 | * |
82 | 82 | * @return SMWInfolink |
@@ -125,8 +125,8 @@ discard block |
||
125 | 125 | * |
126 | 126 | * @param string $caption The label for the link. |
127 | 127 | * @param string $subject |
128 | - * @param string $propertyName |
|
129 | - * @param mixed $style CSS class of a span to embed the link into, or false if no extra style is required. |
|
128 | + * @param string $propertyname |
|
129 | + * @param string $style CSS class of a span to embed the link into, or false if no extra style is required. |
|
130 | 130 | * |
131 | 131 | * @return SMWInfolink |
132 | 132 | */ |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | * |
146 | 146 | * @param string $caption The label for the link. |
147 | 147 | * @param string $titleText |
148 | - * @param mixed $style CSS class of a span to embedd the link into, or false if no extra style is required. |
|
148 | + * @param string $style CSS class of a span to embedd the link into, or false if no extra style is required. |
|
149 | 149 | * |
150 | 150 | * @return SMWInfolink |
151 | 151 | */ |
@@ -188,6 +188,7 @@ discard block |
||
188 | 188 | |
189 | 189 | /** |
190 | 190 | * Change the link text. |
191 | + * @param string|false $caption |
|
191 | 192 | */ |
192 | 193 | public function setCaption( $caption ) { |
193 | 194 | $this->mCaption = $caption; |
@@ -195,6 +196,7 @@ discard block |
||
195 | 196 | |
196 | 197 | /** |
197 | 198 | * Change the link's CSS class. |
199 | + * @param string $style |
|
198 | 200 | */ |
199 | 201 | public function setStyle( $style ) { |
200 | 202 | $this->mStyle = $style; |
@@ -750,6 +750,7 @@ |
||
750 | 750 | |
751 | 751 | /** |
752 | 752 | * FIXME MW 1.25 |
753 | + * @param string $key |
|
753 | 754 | */ |
754 | 755 | private function addExternalHelpLinkFor( $key ) { |
755 | 756 |