@@ -100,6 +100,7 @@ discard block |
||
100 | 100 | * |
101 | 101 | * @return string $key |
102 | 102 | * @param mxied $value |
103 | + * @param string $key |
|
103 | 104 | */ |
104 | 105 | public function setOption( $key, $value ) { |
105 | 106 | $this->options->set( $key, $value ); |
@@ -161,7 +162,7 @@ discard block |
||
161 | 162 | * to format a number that was not hand-formatted by a user. |
162 | 163 | * |
163 | 164 | * @param mixed $value input number |
164 | - * @param integer|false $precision optional positive integer, controls how many digits after |
|
165 | + * @param boolean $precision optional positive integer, controls how many digits after |
|
165 | 166 | * the decimal point are shown |
166 | 167 | * |
167 | 168 | * @since 2.1 |
@@ -277,6 +278,10 @@ discard block |
||
277 | 278 | return round( $value, $this->defaultPrecision ); |
278 | 279 | } |
279 | 280 | |
281 | + /** |
|
282 | + * @param string $decimal |
|
283 | + * @param string $thousand |
|
284 | + */ |
|
280 | 285 | private function doFormatWithPrecision( $value, $precision = false, $decimal, $thousand ) { |
281 | 286 | // Format to some level of precision; number_format does rounding and |
282 | 287 | // locale formatting, x and y are used temporarily since number_format |
@@ -321,6 +326,10 @@ discard block |
||
321 | 326 | return $language; |
322 | 327 | } |
323 | 328 | |
329 | + /** |
|
330 | + * @param string $custom |
|
331 | + * @param string $standard |
|
332 | + */ |
|
324 | 333 | private function getPreferredLocalizedSeparator( $custom, $standard, $language ) { |
325 | 334 | |
326 | 335 | if ( $this->options->has( $custom ) && ( $separator = $this->options->get( $custom ) ) !== false ) { |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace SMW\Tests; |
4 | 4 | |
5 | -use Language; |
|
6 | 5 | use SMW\NumberFormatter; |
7 | 6 | |
8 | 7 | /** |
@@ -1,6 +1,5 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -use SMW\Highlighter; |
|
4 | 3 | use SMW\IntlNumberFormatter; |
5 | 4 | use SMW\Localizer; |
6 | 5 | use SMW\DataValues\ValueFormatters\DataValueFormatter; |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * Parse a string of the form "number unit" where unit is optional. The |
93 | 93 | * results are stored in the $number and $unit parameters. Returns an |
94 | 94 | * error code. |
95 | - * @param $value string to parse |
|
95 | + * @param string $value string to parse |
|
96 | 96 | * @param $number call-by-ref parameter that will be set to the numerical value |
97 | 97 | * @param $unit call-by-ref parameter that will be set to the "unit" string (after the number) |
98 | 98 | * @return integer 0 (no errors), 1 (no number found at all), 2 (number |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | /** |
227 | 227 | * @since 2.4 |
228 | 228 | * |
229 | - * @return float |
|
229 | + * @return string |
|
230 | 230 | */ |
231 | 231 | public function getLocalizedFormattedNumber( $value ) { |
232 | 232 | return $this->getNumberFormatter()->format( $value, $this->getPreferredDisplayPrecision() ); |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | /** |
236 | 236 | * @since 2.4 |
237 | 237 | * |
238 | - * @return float |
|
238 | + * @return string |
|
239 | 239 | */ |
240 | 240 | public function getNormalizedFormattedNumber( $value ) { |
241 | 241 | return $this->getNumberFormatter()->format( $value, $this->getPreferredDisplayPrecision(), IntlNumberFormatter::VALUE_FORMAT ); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | /** |
35 | 35 | * @see DataValue::loadDataItem |
36 | 36 | * |
37 | - * @param SMWDataItem $dataitem |
|
37 | + * @param SMWDataItem $dataItem |
|
38 | 38 | * |
39 | 39 | * @return boolean |
40 | 40 | */ |
@@ -96,6 +96,9 @@ discard block |
||
96 | 96 | return $this->getDataValueFormatter()->format( DataValueFormatter::VALUE ); |
97 | 97 | } |
98 | 98 | |
99 | + /** |
|
100 | + * @param integer $length |
|
101 | + */ |
|
99 | 102 | public function getWikiValueForLengthOf( $length ) { |
100 | 103 | |
101 | 104 | if ( mb_strlen( $this->getWikiValue() ) > $length ) { |
@@ -72,6 +72,9 @@ discard block |
||
72 | 72 | */ |
73 | 73 | protected $linkAttributes = array(); |
74 | 74 | |
75 | + /** |
|
76 | + * @param string $typeid |
|
77 | + */ |
|
75 | 78 | public function __construct( $typeid ) { |
76 | 79 | parent::__construct( $typeid ); |
77 | 80 | switch ( $typeid ) { |
@@ -630,6 +633,9 @@ discard block |
||
630 | 633 | return $dvWikiPage; |
631 | 634 | } |
632 | 635 | |
636 | + /** |
|
637 | + * @param DataItem $subject |
|
638 | + */ |
|
633 | 639 | private function findDisplayTitleFor( $subject ) { |
634 | 640 | |
635 | 641 | $displayTitle = ''; |
@@ -83,7 +83,6 @@ discard block |
||
83 | 83 | * |
84 | 84 | * @since 2.4 |
85 | 85 | * |
86 | - * @param Infolink $link |
|
87 | 86 | */ |
88 | 87 | public function addInfolink( Infolink $infoLink ) { |
89 | 88 | $this->infoLinks[] = $infoLink; |
@@ -92,7 +91,7 @@ discard block |
||
92 | 91 | /** |
93 | 92 | * @since 2.4 |
94 | 93 | * |
95 | - * @param array|false $serviceLinkParameters |
|
94 | + * @param boolean $serviceLinkParameters |
|
96 | 95 | */ |
97 | 96 | public function setServiceLinkParameters( $serviceLinkParameters ) { |
98 | 97 | $this->serviceLinkParameters = $serviceLinkParameters; |
@@ -3,12 +3,11 @@ |
||
3 | 3 | namespace SMW\DataValues; |
4 | 4 | |
5 | 5 | use SMWInfolink as Infolink; |
6 | -use SMWDataValue as DataValue; |
|
6 | +use SMWDataValue as DataValue; |
|
7 | 7 | use SMW\ApplicationFactory; |
8 | 8 | use SMW\InTextAnnotationParser; |
9 | 9 | use SMW\DIProperty; |
10 | 10 | use SMW\Message; |
11 | -use SMWStringValue as StringValue; |
|
12 | 11 | use SMWDIBlob as DIBlob; |
13 | 12 | |
14 | 13 | /** |
@@ -250,6 +250,9 @@ discard block |
||
250 | 250 | return $this->reader; |
251 | 251 | } |
252 | 252 | |
253 | + /** |
|
254 | + * @return SemanticData |
|
255 | + */ |
|
253 | 256 | public function getSemanticData( DIWikiPage $subject, $filter = false ) { |
254 | 257 | |
255 | 258 | $result = $this->cachedValueLookupStore->getSemanticData( |
@@ -261,7 +264,7 @@ discard block |
||
261 | 264 | } |
262 | 265 | |
263 | 266 | /** |
264 | - * @param mixed $subject |
|
267 | + * @param DIWikiPage $subject |
|
265 | 268 | * @param DIProperty $property |
266 | 269 | * @param null $requestOptions |
267 | 270 | * |
@@ -407,7 +410,7 @@ discard block |
||
407 | 410 | /** |
408 | 411 | * @param RequestOptions|null $requestOptions |
409 | 412 | * |
410 | - * @return CachedListLookup |
|
413 | + * @return SMW\SQLStore\Lookup\CachedListLookup |
|
411 | 414 | */ |
412 | 415 | public function getPropertiesSpecial( $requestOptions = null ) { |
413 | 416 | return $this->factory->newPropertyUsageCachedListLookup( $requestOptions ); |
@@ -416,7 +419,7 @@ discard block |
||
416 | 419 | /** |
417 | 420 | * @param RequestOptions|null $requestOptions |
418 | 421 | * |
419 | - * @return CachedListLookup |
|
422 | + * @return SMW\SQLStore\Lookup\CachedListLookup |
|
420 | 423 | */ |
421 | 424 | public function getUnusedPropertiesSpecial( $requestOptions = null ) { |
422 | 425 | return $this->factory->newUnusedPropertyCachedListLookup( $requestOptions ); |
@@ -425,7 +428,7 @@ discard block |
||
425 | 428 | /** |
426 | 429 | * @param RequestOptions|null $requestOptions |
427 | 430 | * |
428 | - * @return CachedListLookup |
|
431 | + * @return SMW\SQLStore\Lookup\CachedListLookup |
|
429 | 432 | */ |
430 | 433 | public function getWantedPropertiesSpecial( $requestOptions = null ) { |
431 | 434 | return $this->factory->newUndeclaredPropertyCachedListLookup( $requestOptions ); |
@@ -473,7 +476,7 @@ discard block |
||
473 | 476 | * |
474 | 477 | * @since 1.8 |
475 | 478 | * @param Title $concept |
476 | - * @return array of error strings (empty if no errors occurred) |
|
479 | + * @return string[] of error strings (empty if no errors occurred) |
|
477 | 480 | */ |
478 | 481 | public function refreshConceptCache( Title $concept ) { |
479 | 482 | return $this->factory->newMasterConceptCache()->refreshConceptCache( $concept ); |
@@ -515,7 +518,7 @@ discard block |
||
515 | 518 | * @since 1.8 |
516 | 519 | * |
517 | 520 | * @param SMWRequestOptions|null $requestOptions |
518 | - * @param string $valuecol |
|
521 | + * @param string $valueCol |
|
519 | 522 | * |
520 | 523 | * @return array |
521 | 524 | */ |