@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | * label for printout might also be specified. |
177 | 177 | * |
178 | 178 | * @param string $value |
179 | - * @param mixed $caption |
|
179 | + * @param boolean $caption |
|
180 | 180 | */ |
181 | 181 | public function setUserValue( $value, $caption = false ) { |
182 | 182 | |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | /** |
279 | 279 | * @since 2.4 |
280 | 280 | * |
281 | - * @return DIWikiPage|null |
|
281 | + * @return SMWDIWikiPage |
|
282 | 282 | */ |
283 | 283 | public function getContextPage() { |
284 | 284 | return $this->m_contextPage; |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | * |
321 | 321 | * @param string $key |
322 | 322 | * |
323 | - * @return mixed|false |
|
323 | + * @return string|false |
|
324 | 324 | */ |
325 | 325 | public function getOption( $key ) { |
326 | 326 | |
@@ -355,7 +355,6 @@ discard block |
||
355 | 355 | /** |
356 | 356 | * @since 2.4 |
357 | 357 | * |
358 | - * @param string $caption |
|
359 | 358 | */ |
360 | 359 | public function getCaption() { |
361 | 360 | return $this->m_caption; |
@@ -433,7 +432,6 @@ discard block |
||
433 | 432 | * |
434 | 433 | * @param $parameters |
435 | 434 | * @param integer|null $type |
436 | - * @param integer|null $language |
|
437 | 435 | */ |
438 | 436 | public function addErrorMsg( $parameters, $type = null ) { |
439 | 437 | $this->mErrors[Message::getHash( $parameters, $type )] = Message::encode( $parameters, $type ); |
@@ -492,7 +490,7 @@ discard block |
||
492 | 490 | * |
493 | 491 | * @param string $value |
494 | 492 | * |
495 | - * @return Description |
|
493 | + * @return SMW\Query\Language\Description |
|
496 | 494 | * @throws InvalidArgumentException |
497 | 495 | */ |
498 | 496 | public function getQueryDescription( $value ) { |
@@ -585,6 +583,7 @@ discard block |
||
585 | 583 | * |
586 | 584 | * The parameter $linked controls linking of values such as titles and should |
587 | 585 | * be non-NULL and non-false if this is desired. |
586 | + * @return string |
|
588 | 587 | */ |
589 | 588 | abstract public function getLongWikiText( $linked = null ); |
590 | 589 |
@@ -7,7 +7,6 @@ |
||
7 | 7 | * @defgroup SMWDataValues SMWDataValues |
8 | 8 | * @ingroup SMW |
9 | 9 | */ |
10 | -use SMW\ApplicationFactory; |
|
11 | 10 | use SMW\DataValues\InfoLinksProvider; |
12 | 11 | use SMW\Deserializers\DVDescriptionDeserializerRegistry; |
13 | 12 | use SMW\Localizer; |
@@ -176,14 +176,17 @@ discard block |
||
176 | 176 | * The function sets the provided call-by-ref values to the respective |
177 | 177 | * values. If errors are encountered, they are added to the objects |
178 | 178 | * error list and false is returned. Otherwise, true is returned. |
179 | - * @param $string string input time representation, e.g. "12 May 2007 13:45:23-3:30" |
|
179 | + * @param string $string string input time representation, e.g. "12 May 2007 13:45:23-3:30" |
|
180 | 180 | * @param $datecomponents array of strings that might belong to the specification of a date |
181 | 181 | * @param $calendarmodesl string if model was set in input, otherwise false |
182 | - * @param $era string '+' or '-' if provided, otherwise false |
|
183 | - * @param $hours integer set to a value between 0 and 24 |
|
184 | - * @param $minutes integer set to a value between 0 and 59 |
|
185 | - * @param $seconds integer set to a value between 0 and 59, or false if not given |
|
186 | - * @param $timeoffset double set to a value for time offset (e.g. 3.5), or false if not given |
|
182 | + * @param boolean $era string '+' or '-' if provided, otherwise false |
|
183 | + * @param boolean $hours integer set to a value between 0 and 24 |
|
184 | + * @param boolean $minutes integer set to a value between 0 and 59 |
|
185 | + * @param boolean $seconds integer set to a value between 0 and 59, or false if not given |
|
186 | + * @param boolean $timeoffset double set to a value for time offset (e.g. 3.5), or false if not given |
|
187 | + * @param boolean $calendarmodel |
|
188 | + * @param boolean $microseconds |
|
189 | + * @param boolean $timezone |
|
187 | 190 | * @return boolean stating if the parsing succeeded |
188 | 191 | * @todo This method in principle allows date parsing to be internationalized further. Should be done. |
189 | 192 | */ |
@@ -415,7 +418,7 @@ discard block |
||
415 | 418 | * messages are added to the objects list of errors, and false is |
416 | 419 | * returned. Otherwise, true is returned. |
417 | 420 | * @param $datecomponents array of strings that might belong to the specification of a date |
418 | - * @param $date array set to result |
|
421 | + * @param boolean $date array set to result |
|
419 | 422 | * @return boolean stating if successful |
420 | 423 | */ |
421 | 424 | protected function interpretDateComponents( $datecomponents, &$date ) { |
@@ -666,6 +669,7 @@ discard block |
||
666 | 669 | * @see SMWDataValue::getLongWikiText |
667 | 670 | * |
668 | 671 | * {@inheritDoc} |
672 | + * @return string |
|
669 | 673 | */ |
670 | 674 | public function getLongWikiText( $linker = null ) { |
671 | 675 | return $this->dataValueServiceFactory->getValueFormatter( $this )->format( DataValueFormatter::WIKI_LONG, $linker ); |
@@ -813,10 +817,16 @@ discard block |
||
813 | 817 | } |
814 | 818 | } |
815 | 819 | |
820 | + /** |
|
821 | + * @param string $value |
|
822 | + */ |
|
816 | 823 | private function isInterpretableAsYearOnly( $value ) { |
817 | 824 | return strpos( $value, ' ' ) === false && is_numeric( strval( $value ) ) && ( strval( $value ) < 0 || strlen( $value ) < 6 ); |
818 | 825 | } |
819 | 826 | |
827 | + /** |
|
828 | + * @param string $value |
|
829 | + */ |
|
820 | 830 | private function isInterpretableAsTimestamp( $value ) { |
821 | 831 | // 1200-11-02T12:03:25 or 20120320055913 |
822 | 832 | return ( ( strlen( $value ) > 4 && substr( $value, 10, 1 ) === 'T' ) || strlen( $value ) == 14 ) && wfTimestamp( TS_MW, $value ) !== false; |
@@ -9,7 +9,6 @@ |
||
9 | 9 | use SMW\Tests\TestEnvironment; |
10 | 10 | use SMWNumberValue as NumberValue; |
11 | 11 | use SMWStringValue as StringValue; |
12 | -use SMWTimeValue as TimeValue; |
|
13 | 12 | |
14 | 13 | /** |
15 | 14 | * @covers \SMW\DataValues\InfoLinksProvider |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | /** |
351 | 351 | * @since 2.4 |
352 | 352 | * |
353 | - * @return array |
|
353 | + * @return string[] |
|
354 | 354 | */ |
355 | 355 | public function getCanonicalDatatypeLabels() { |
356 | 356 | return $this->canonicalLabels; |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | * returned for internal types without user labels (e.g. the special types |
363 | 363 | * for some special properties), and for user defined types. |
364 | 364 | * |
365 | - * @return array |
|
365 | + * @return string[] |
|
366 | 366 | */ |
367 | 367 | public function getKnownTypeLabels() { |
368 | 368 | return $this->typeLabels; |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | /** |
372 | 372 | * @since 2.1 |
373 | 373 | * |
374 | - * @return array |
|
374 | + * @return string[] |
|
375 | 375 | */ |
376 | 376 | public function getKnownTypeAliases() { |
377 | 377 | return $this->typeAliases; |
@@ -389,7 +389,6 @@ discard block |
||
389 | 389 | * |
390 | 390 | * @since 2.5 |
391 | 391 | * |
392 | - * @param string $diType |
|
393 | 392 | * |
394 | 393 | * @return string|null |
395 | 394 | */ |
@@ -12,7 +12,6 @@ |
||
12 | 12 | use SMW\MediaWiki\MwCollaboratorFactory; |
13 | 13 | use SMW\MediaWiki\PageCreator; |
14 | 14 | use SMW\MediaWiki\TitleCreator; |
15 | -use SMW\Query\ProfileAnnotator\QueryProfileAnnotatorFactory; |
|
16 | 15 | use SMWQueryParser as QueryParser; |
17 | 16 | use Title; |
18 | 17 | use SMW\Services\SharedServicesContainer; |
@@ -211,7 +211,6 @@ discard block |
||
211 | 211 | /** |
212 | 212 | * @since 2.5 |
213 | 213 | * |
214 | - * @param QueryEngine $queryEngine |
|
215 | 214 | */ |
216 | 215 | public function disableCache() { |
217 | 216 | $this->enabledCache = false; |
@@ -283,7 +282,6 @@ discard block |
||
283 | 282 | /** |
284 | 283 | * @since 2.5 |
285 | 284 | * |
286 | - * @param DIWikiPage|array $list |
|
287 | 285 | * @param string $context |
288 | 286 | */ |
289 | 287 | public function resetCacheBy( $item, $context = '' ) { |
@@ -315,6 +313,11 @@ discard block |
||
315 | 313 | return $this->enabledCache && $this->blobStore->canUse() && ( $query->getContextPage() !== null || ( $query->getContextPage() === null && $this->nonEmbeddedCacheLifetime > 0 ) ); |
316 | 314 | } |
317 | 315 | |
316 | + /** |
|
317 | + * @param string $queryId |
|
318 | + * @param Query $query |
|
319 | + * @param \Onoi\BlobStore\Container $container |
|
320 | + */ |
|
318 | 321 | private function newQueryResultFromCache( $queryId, $query, $container ) { |
319 | 322 | |
320 | 323 | $results = array(); |
@@ -376,6 +379,12 @@ discard block |
||
376 | 379 | return $queryResult; |
377 | 380 | } |
378 | 381 | |
382 | + /** |
|
383 | + * @param QueryResult $queryResult |
|
384 | + * @param string $queryId |
|
385 | + * @param \Onoi\BlobStore\Container $container |
|
386 | + * @param Query $query |
|
387 | + */ |
|
379 | 388 | private function addQueryResultToCache( $queryResult, $queryId, $container, $query ) { |
380 | 389 | |
381 | 390 | if ( ( $context = $query->getOption( Query::PROC_CONTEXT ) ) === false ) { |
@@ -468,6 +477,9 @@ discard block |
||
468 | 477 | return md5( $subject . self::VERSION . $this->hashModifier ); |
469 | 478 | } |
470 | 479 | |
480 | + /** |
|
481 | + * @param string $message |
|
482 | + */ |
|
471 | 483 | private function log( $message, $context = array() ) { |
472 | 484 | |
473 | 485 | if ( $this->logger === null ) { |
@@ -477,6 +489,9 @@ discard block |
||
477 | 489 | $this->logger->info( $message, $context ); |
478 | 490 | } |
479 | 491 | |
492 | + /** |
|
493 | + * @param Query $query |
|
494 | + */ |
|
480 | 495 | private function getNoCacheId( $query ) { |
481 | 496 | |
482 | 497 | $id = 'noCache.misc'; |
@@ -500,6 +515,9 @@ discard block |
||
500 | 515 | return $id; |
501 | 516 | } |
502 | 517 | |
518 | + /** |
|
519 | + * @param string $date |
|
520 | + */ |
|
503 | 521 | private function initStats( $date ) { |
504 | 522 | |
505 | 523 | $this->bufferedStatsdCollector->shouldRecord( $this->isEnabled() ); |
@@ -517,6 +535,10 @@ discard block |
||
517 | 535 | } |
518 | 536 | |
519 | 537 | // http://stackoverflow.com/questions/3777995/php-array-recursive-sum |
538 | + |
|
539 | + /** |
|
540 | + * @param integer $value |
|
541 | + */ |
|
520 | 542 | private static function sum( $value, $container ) { |
521 | 543 | return $value + ( is_array( $container ) ? array_reduce( $container, 'self::sum' ) : $container ); |
522 | 544 | } |
@@ -103,6 +103,10 @@ discard block |
||
103 | 103 | $this->inMemoryPoolCache->getPoolCacheById( 'sql.store.redirect.infostore' )->delete( $hash ); |
104 | 104 | } |
105 | 105 | |
106 | + /** |
|
107 | + * @param string $title |
|
108 | + * @param integer $namespace |
|
109 | + */ |
|
106 | 110 | private function select( $title, $namespace ) { |
107 | 111 | |
108 | 112 | $row = $this->connection->selectRow( |
@@ -118,6 +122,11 @@ discard block |
||
118 | 122 | return $row !== false && isset( $row->o_id ) ? (int)$row->o_id : 0; |
119 | 123 | } |
120 | 124 | |
125 | + /** |
|
126 | + * @param integer $id |
|
127 | + * @param string $title |
|
128 | + * @param integer $namespace |
|
129 | + */ |
|
121 | 130 | private function insert( $id, $title, $namespace ) { |
122 | 131 | |
123 | 132 | $this->connection->insert( |
@@ -130,6 +139,10 @@ discard block |
||
130 | 139 | ); |
131 | 140 | } |
132 | 141 | |
142 | + /** |
|
143 | + * @param string $title |
|
144 | + * @param integer $namespace |
|
145 | + */ |
|
133 | 146 | private function delete( $title, $namespace ) { |
134 | 147 | |
135 | 148 | $this->connection->delete( |
@@ -60,7 +60,6 @@ discard block |
||
60 | 60 | /** |
61 | 61 | * @see DataValue::getShortWikiText |
62 | 62 | * |
63 | - * @param string $value |
|
64 | 63 | */ |
65 | 64 | public function getShortWikiText( $linker = null ) { |
66 | 65 | |
@@ -76,7 +75,6 @@ discard block |
||
76 | 75 | /** |
77 | 76 | * @see DataValue::getLongHtmlText |
78 | 77 | * |
79 | - * @param string $value |
|
80 | 78 | */ |
81 | 79 | public function getLongHtmlText( $linker = null ) { |
82 | 80 | return $this->getShortHtmlText( $linker ); |
@@ -85,7 +83,6 @@ discard block |
||
85 | 83 | /** |
86 | 84 | * @see DataValue::getShortHtmlText |
87 | 85 | * |
88 | - * @param string $value |
|
89 | 86 | */ |
90 | 87 | public function getShortHtmlText( $linker = null ) { |
91 | 88 |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | * |
109 | 109 | * @param string $key |
110 | 110 | * |
111 | - * @return mixed |
|
111 | + * @return string|null |
|
112 | 112 | */ |
113 | 113 | public function getOption( $key ) { |
114 | 114 | |
@@ -220,6 +220,7 @@ discard block |
||
220 | 220 | |
221 | 221 | /** |
222 | 222 | * @since 1.9 |
223 | + * @param string $error |
|
223 | 224 | */ |
224 | 225 | public function addError( $error ) { |
225 | 226 | $this->errors = array_merge( $this->errors, (array)$error ); |
@@ -353,7 +354,7 @@ discard block |
||
353 | 354 | * |
354 | 355 | * @since 1.9 |
355 | 356 | * |
356 | - * @param SMWDataValue $dataValue |
|
357 | + * @param DataValue $dataValue |
|
357 | 358 | */ |
358 | 359 | public function addDataValue( DataValue $dataValue ) { |
359 | 360 | $this->semanticData->addDataValue( $dataValue ); |
@@ -452,6 +453,9 @@ discard block |
||
452 | 453 | } |
453 | 454 | } |
454 | 455 | |
456 | + /** |
|
457 | + * @return SemanticData |
|
458 | + */ |
|
455 | 459 | private function fetchDataFromParserOutput( ParserOutput $parserOutput ) { |
456 | 460 | |
457 | 461 | if ( $this->hasExtensionData() ) { |