@@ -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\DataValues\ValueFormatterRegistry; |
13 | 12 | use SMW\DataValues\ValueValidatorRegistry; |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | * label for printout might also be specified. |
169 | 169 | * |
170 | 170 | * @param string $value |
171 | - * @param mixed $caption |
|
171 | + * @param boolean $caption |
|
172 | 172 | */ |
173 | 173 | public function setUserValue( $value, $caption = false ) { |
174 | 174 | |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | /** |
264 | 264 | * @since 2.4 |
265 | 265 | * |
266 | - * @return DIWikiPage|null |
|
266 | + * @return SMWDIWikiPage |
|
267 | 267 | */ |
268 | 268 | public function getContextPage() { |
269 | 269 | return $this->m_contextPage; |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | * |
306 | 306 | * @param string $key |
307 | 307 | * |
308 | - * @return mixed|false |
|
308 | + * @return string|false |
|
309 | 309 | */ |
310 | 310 | public function getOption( $key ) { |
311 | 311 | |
@@ -340,7 +340,6 @@ discard block |
||
340 | 340 | /** |
341 | 341 | * @since 2.4 |
342 | 342 | * |
343 | - * @param string $caption |
|
344 | 343 | */ |
345 | 344 | public function getCaption() { |
346 | 345 | return $this->m_caption; |
@@ -427,7 +426,6 @@ discard block |
||
427 | 426 | * |
428 | 427 | * @param $parameters |
429 | 428 | * @param integer|null $type |
430 | - * @param integer|null $language |
|
431 | 429 | */ |
432 | 430 | public function addErrorMsg( $parameters, $type = null ) { |
433 | 431 | $this->mErrors[Message::getHash( $parameters, $type )] = Message::encode( $parameters, $type ); |
@@ -486,7 +484,7 @@ discard block |
||
486 | 484 | * |
487 | 485 | * @param string $value |
488 | 486 | * |
489 | - * @return Description |
|
487 | + * @return SMW\Query\Language\Description |
|
490 | 488 | * @throws InvalidArgumentException |
491 | 489 | */ |
492 | 490 | public function getQueryDescription( $value ) { |
@@ -507,7 +505,7 @@ discard block |
||
507 | 505 | * |
508 | 506 | * @since 2.4 |
509 | 507 | * |
510 | - * @return DataValueFormatter |
|
508 | + * @return SMW\DataValues\ValueFormatters\DataValueFormatter |
|
511 | 509 | */ |
512 | 510 | public function getDataValueFormatter() { |
513 | 511 | return ValueFormatterRegistry::getInstance()->getDataValueFormatterFor( $this ); |
@@ -591,6 +589,7 @@ discard block |
||
591 | 589 | * |
592 | 590 | * The parameter $linked controls linking of values such as titles and should |
593 | 591 | * be non-NULL and non-false if this is desired. |
592 | + * @return string |
|
594 | 593 | */ |
595 | 594 | abstract public function getLongWikiText( $linked = null ); |
596 | 595 |
@@ -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 getWikiValueByLengthOf( $length ) { |
100 | 103 | |
101 | 104 | if ( mb_strlen( $this->getWikiValue() ) > $length ) { |
@@ -45,6 +45,9 @@ discard block |
||
45 | 45 | */ |
46 | 46 | private $showUrlContextInRawFormat = true; |
47 | 47 | |
48 | + /** |
|
49 | + * @param string $typeid |
|
50 | + */ |
|
48 | 51 | public function __construct( $typeid ) { |
49 | 52 | parent::__construct( $typeid ); |
50 | 53 | switch ( $typeid ) { |
@@ -182,6 +185,7 @@ discard block |
||
182 | 185 | * Returns true if the argument is a valid RFC 3966 phone number. |
183 | 186 | * Only global phone numbers are supported, and no full validation |
184 | 187 | * of parameters (appended via ;param=value) is performed. |
188 | + * @param string $s |
|
185 | 189 | */ |
186 | 190 | protected static function isValidTelURI( $s ) { |
187 | 191 | $tel_uri_regex = '<^tel:\+[0-9./-]*[0-9][0-9./-]*(;[0-9a-zA-Z-]+=(%[0-9a-zA-Z][0-9a-zA-Z]|[0-9a-zA-Z._~:/?#[\]@!$&\'()*+,;=-])*)*$>'; |
@@ -340,6 +344,9 @@ discard block |
||
340 | 344 | return str_replace( ':', ':', $url ); |
341 | 345 | } |
342 | 346 | |
347 | + /** |
|
348 | + * @param string $context |
|
349 | + */ |
|
343 | 350 | private function decodeUriContext( $context, $linker ) { |
344 | 351 | |
345 | 352 | // Prior to decoding turn any `-` into an internal representation to avoid |
@@ -142,6 +142,7 @@ discard block |
||
142 | 142 | * but just controls query generation. For general effect, the default namespaces |
143 | 143 | * should be set to NULL. |
144 | 144 | * |
145 | + * @param boolean $setNS |
|
145 | 146 | * @return Description|null |
146 | 147 | */ |
147 | 148 | private function getSubqueryDescription( &$setNS ) { |
@@ -250,6 +251,7 @@ discard block |
||
250 | 251 | * be the content of "[[ ... ]]". Returns NULL upon error. |
251 | 252 | * |
252 | 253 | * Parameters $setNS has the same use as in getSubqueryDescription(). |
254 | + * @param boolean $setNS |
|
253 | 255 | */ |
254 | 256 | private function getLinkDescription( &$setNS ) { |
255 | 257 | // This method is called when we encountered an opening '[['. The following |
@@ -433,6 +435,7 @@ discard block |
||
433 | 435 | * a category or property) and create a suitable description. |
434 | 436 | * The first chunk behind the "[[" has already been read and is |
435 | 437 | * passed as a parameter. |
438 | + * @param string $firstChunk |
|
436 | 439 | */ |
437 | 440 | private function getArticleDescription( $firstChunk, &$setNS ) { |
438 | 441 | $chunk = $firstChunk; |
@@ -478,6 +481,10 @@ discard block |
||
478 | 481 | return $this->finishLinkDescription( $chunk, true, $result, $setNS ); |
479 | 482 | } |
480 | 483 | |
484 | + /** |
|
485 | + * @param boolean $hasNamespaces |
|
486 | + * @param Description|null $result |
|
487 | + */ |
|
481 | 488 | private function finishLinkDescription( $chunk, $hasNamespaces, $result, &$setNS ) { |
482 | 489 | if ( is_null( $result ) ) { // no useful information or concrete error found |
483 | 490 | $this->descriptionProcessor->addErrorWithMsgKey( 'smw_unexpectedpart', $chunk ); // was smw_badqueryatom |
@@ -574,6 +581,7 @@ discard block |
||
574 | 581 | /** |
575 | 582 | * Enter a new subblock in the query, which must at some time be terminated by the |
576 | 583 | * given $endstring delimiter calling popDelimiter(); |
584 | + * @param string $endstring |
|
577 | 585 | */ |
578 | 586 | private function pushDelimiter( $endstring ) { |
579 | 587 | array_push( $this->separatorStack, $endstring ); |
@@ -583,6 +591,7 @@ discard block |
||
583 | 591 | * Exit a subblock in the query ending with the given delimiter. |
584 | 592 | * If the delimiter does not match the top-most open block, false |
585 | 593 | * will be returned. Otherwise return true. |
594 | + * @param string $endstring |
|
586 | 595 | */ |
587 | 596 | private function popDelimiter( $endstring ) { |
588 | 597 | $topdelim = array_pop( $this->separatorStack ); |
@@ -224,6 +224,10 @@ |
||
224 | 224 | return ByLanguageCollationMapper::getInstance()->findFirstLetterForCategory( $sortKey ); |
225 | 225 | } |
226 | 226 | |
227 | + /** |
|
228 | + * @param SMWQueryResult $res |
|
229 | + * @param boolean $first_col |
|
230 | + */ |
|
227 | 231 | private function addRowFieldsToTemplate( $res, $row, &$first_col, $templateRenderer ) { |
228 | 232 | |
229 | 233 | // explicitly number parameters for more robust parsing (values may contain "=") |
@@ -40,7 +40,7 @@ |
||
40 | 40 | * @param integer $from |
41 | 41 | * @param integer $until |
42 | 42 | * |
43 | - * @return DIWikiPage[] |
|
43 | + * @return \SMWDIWikiPage[] |
|
44 | 44 | */ |
45 | 45 | public function getResults( $limit, $from, $until ) { |
46 | 46 | $description = new NamespaceDescription( SMW_NS_CONCEPT ); |
@@ -59,7 +59,6 @@ |
||
59 | 59 | /** |
60 | 60 | * @see DataValue::getShortWikiText |
61 | 61 | * |
62 | - * @param string $value |
|
63 | 62 | */ |
64 | 63 | public function getShortWikiText( $linker = null ) { |
65 | 64 |
@@ -255,6 +255,9 @@ |
||
255 | 255 | return false; |
256 | 256 | } |
257 | 257 | |
258 | + /** |
|
259 | + * @param string $value |
|
260 | + */ |
|
258 | 261 | private function newContainerSemanticData( $value ) { |
259 | 262 | |
260 | 263 | if ( $this->m_contextPage === null ) { |
@@ -124,6 +124,9 @@ |
||
124 | 124 | return $text . $languagecode; |
125 | 125 | } |
126 | 126 | |
127 | + /** |
|
128 | + * @param DataValue $dataValue |
|
129 | + */ |
|
127 | 130 | private function findValueOutputFor( $type, $dataValue, $linker ) { |
128 | 131 | switch ( $type ) { |
129 | 132 | case self::VALUE: |