@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * |
60 | 60 | * @param string $value |
61 | 61 | * |
62 | - * @return array |
|
62 | + * @return string[] |
|
63 | 63 | */ |
64 | 64 | public function getValuesFromString( $value ) { |
65 | 65 | // #664 / T17732 |
@@ -280,6 +280,10 @@ discard block |
||
280 | 280 | return $result; |
281 | 281 | } |
282 | 282 | |
283 | + /** |
|
284 | + * @param integer $type |
|
285 | + * @param SMWDataValue $dataValue |
|
286 | + */ |
|
283 | 287 | protected function makeValueOutputText( $type, $dataValue, $linker ) { |
284 | 288 | switch ( $type ) { |
285 | 289 | case 0: |
@@ -295,6 +299,9 @@ discard block |
||
295 | 299 | } |
296 | 300 | } |
297 | 301 | |
302 | + /** |
|
303 | + * @param string $value |
|
304 | + */ |
|
298 | 305 | private function newContainerSemanticData( $value ) { |
299 | 306 | |
300 | 307 | if ( $this->m_contextPage === null ) { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * |
78 | 78 | * @param DIProperty $property |
79 | 79 | * |
80 | - * @return false|DataItem |
|
80 | + * @return \SMWDataItem |
|
81 | 81 | */ |
82 | 82 | public function getFieldListBy( DIProperty $property ) { |
83 | 83 | |
@@ -383,6 +383,10 @@ discard block |
||
383 | 383 | return $localPropertyDescription; |
384 | 384 | } |
385 | 385 | |
386 | + /** |
|
387 | + * @param DIProperty $property |
|
388 | + * @param string $languageCode |
|
389 | + */ |
|
386 | 390 | private function getPredefinedPropertyDescription( $property, $linker, $languageCode ) { |
387 | 391 | |
388 | 392 | $description = ''; |
@@ -411,6 +415,10 @@ discard block |
||
411 | 415 | return $message; |
412 | 416 | } |
413 | 417 | |
418 | + /** |
|
419 | + * @param DIProperty $property |
|
420 | + * @param string $languageCode |
|
421 | + */ |
|
414 | 422 | private function findLocalPropertyDescription( $property, $linker, $languageCode ) { |
415 | 423 | |
416 | 424 | $text = ''; |
@@ -428,6 +436,10 @@ discard block |
||
428 | 436 | return $text; |
429 | 437 | } |
430 | 438 | |
439 | + /** |
|
440 | + * @param DIProperty $property |
|
441 | + * @param string $languageCode |
|
442 | + */ |
|
431 | 443 | private function findPreferredPropertyLabel( $property, $languageCode ) { |
432 | 444 | |
433 | 445 | $text = ''; |
@@ -445,6 +457,9 @@ discard block |
||
445 | 457 | return $text; |
446 | 458 | } |
447 | 459 | |
460 | + /** |
|
461 | + * @param DIProperty $property |
|
462 | + */ |
|
448 | 463 | private function findTextValueByLanguage( $dataItems, $property, $languageCode ) { |
449 | 464 | |
450 | 465 | if ( $dataItems === null || $dataItems === array() ) { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | /** |
78 | 78 | * @since 2.5 |
79 | 79 | * |
80 | - * @return array |
|
80 | + * @return string[] |
|
81 | 81 | */ |
82 | 82 | public function getErrors() { |
83 | 83 | return $this->querySegmentListBuilder->getErrors(); |
@@ -120,6 +120,9 @@ discard block |
||
120 | 120 | return $this->querySegmentListBuilder->getQuerySegmentList(); |
121 | 121 | } |
122 | 122 | |
123 | + /** |
|
124 | + * @param QuerySegment $querySegment |
|
125 | + */ |
|
123 | 126 | private function collectExtraDescriptionsFromSortKeys( $querySegment ) { |
124 | 127 | |
125 | 128 | $extraDescriptions = array(); |
@@ -138,6 +141,10 @@ discard block |
||
138 | 141 | return $extraDescriptions; |
139 | 142 | } |
140 | 143 | |
144 | + /** |
|
145 | + * @param string $label |
|
146 | + * @param string $order |
|
147 | + */ |
|
141 | 148 | private function findExtraDescriptionBy( $querySegment, $label, $order ) { |
142 | 149 | |
143 | 150 | $description = null; |
@@ -171,6 +178,9 @@ discard block |
||
171 | 178 | return $description; |
172 | 179 | } |
173 | 180 | |
181 | + /** |
|
182 | + * @param QuerySegment $querySegment |
|
183 | + */ |
|
174 | 184 | private function addConjunctionFromExtraDescriptions( $querySegment, array $extraDescriptions ) { |
175 | 185 | |
176 | 186 | $this->querySegmentListBuilder->setSortKeys( |
@@ -62,6 +62,9 @@ discard block |
||
62 | 62 | } |
63 | 63 | } |
64 | 64 | |
65 | + /** |
|
66 | + * @param string $contents |
|
67 | + */ |
|
65 | 68 | private function replaceSpaceIndent( $contents ) { |
66 | 69 | |
67 | 70 | // Change the four-space indent to a tab indent |
@@ -118,6 +121,9 @@ discard block |
||
118 | 121 | return json_encode( $contents, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ); |
119 | 122 | } |
120 | 123 | |
124 | + /** |
|
125 | + * @param string $name |
|
126 | + */ |
|
121 | 127 | private function findAndReplaceEntity( $name, &$entities ) { |
122 | 128 | |
123 | 129 | if ( !isset( $this->contents[$name] ) || $this->contents[$name] === array() ) { |
@@ -140,6 +146,10 @@ discard block |
||
140 | 146 | } |
141 | 147 | } |
142 | 148 | |
149 | + /** |
|
150 | + * @param string $name |
|
151 | + * @param string $type |
|
152 | + */ |
|
143 | 153 | private function findAndReplaceTestCases( $name, $type, &$tests ) { |
144 | 154 | |
145 | 155 | if ( !isset( $this->contents[$name] ) || $this->contents[$name] === array() ) { |
@@ -159,6 +169,10 @@ discard block |
||
159 | 169 | } |
160 | 170 | } |
161 | 171 | |
172 | + /** |
|
173 | + * @param string $path |
|
174 | + * @param string $extension |
|
175 | + */ |
|
162 | 176 | private function findFilesFor( $path, $extension ) { |
163 | 177 | |
164 | 178 | $files = array(); |
@@ -117,7 +117,6 @@ discard block |
||
117 | 117 | * @since 2.5 |
118 | 118 | * |
119 | 119 | * @param array $page |
120 | - * @param integer $defaultNamespace |
|
121 | 120 | */ |
122 | 121 | public function createPage( array $page, $namespace ) { |
123 | 122 | |
@@ -176,6 +175,10 @@ discard block |
||
176 | 175 | } |
177 | 176 | |
178 | 177 | // http://php.net/manual/en/function.file-get-contents.php |
178 | + |
|
179 | + /** |
|
180 | + * @param string $file |
|
181 | + */ |
|
179 | 182 | private function getFileContentsWithEncodingDetection( $file ) { |
180 | 183 | $content = file_get_contents( $file ); |
181 | 184 | return mb_convert_encoding( $content, 'UTF-8', mb_detect_encoding( $content, 'UTF-8, ISO-8859-1, ISO-8859-2', true ) ); |
@@ -178,7 +178,7 @@ |
||
178 | 178 | /** |
179 | 179 | * @since 2.2 |
180 | 180 | * |
181 | - * @param mixed $key |
|
181 | + * @param string $key |
|
182 | 182 | * @param mixed $value |
183 | 183 | */ |
184 | 184 | protected function changeGlobalSettingTo( $key, $value ) { |
@@ -228,6 +228,9 @@ discard block |
||
228 | 228 | $this->errors = array_merge( $this->errors, $errors ); |
229 | 229 | } |
230 | 230 | |
231 | + /** |
|
232 | + * @param string $querystring |
|
233 | + */ |
|
231 | 234 | public function setQueryString( $querystring ) { |
232 | 235 | $this->queryString = $querystring; |
233 | 236 | } |
@@ -322,7 +325,7 @@ discard block |
||
322 | 325 | * |
323 | 326 | * @param integer $limit |
324 | 327 | * |
325 | - * @return Query |
|
328 | + * @return SMWQuery |
|
326 | 329 | */ |
327 | 330 | public function setUnboundLimit( $limit ) { |
328 | 331 | $this->limit = (int)$limit; |
@@ -161,6 +161,9 @@ discard block |
||
161 | 161 | return $dataValue instanceof DataValue && $dataValue->getProperty() !== null && $dataValue->getContextPage() !== null && $dataValue->isEnabledFeature( SMW_DV_PVUC ); |
162 | 162 | } |
163 | 163 | |
164 | + /** |
|
165 | + * @param string $hash |
|
166 | + */ |
|
164 | 167 | private function tryFindMatchResultFor( $hash, $dataValue ) { |
165 | 168 | |
166 | 169 | $descriptionFactory = $this->queryFactory->newDescriptionFactory(); |
@@ -209,6 +212,9 @@ discard block |
||
209 | 212 | return $page; |
210 | 213 | } |
211 | 214 | |
215 | + /** |
|
216 | + * @param string $valueHash |
|
217 | + */ |
|
212 | 218 | private function isKnownBy( $valueHash, $dataValue ) { |
213 | 219 | |
214 | 220 | $contextPage = $dataValue->getContextPage(); |
@@ -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 false|string $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; |