@@ -100,7 +100,6 @@ discard block |
||
100 | 100 | * @since 2.5 |
101 | 101 | * |
102 | 102 | * @param string $languageCode |
103 | - * @param boolean $readFromFile |
|
104 | 103 | * |
105 | 104 | * @return boolean |
106 | 105 | */ |
@@ -163,6 +162,10 @@ discard block |
||
163 | 162 | return self::$contents[$languageCode]; |
164 | 163 | } |
165 | 164 | |
165 | + /** |
|
166 | + * @param string $languageCode |
|
167 | + * @param string $cacheKey |
|
168 | + */ |
|
166 | 169 | protected function doReadJsonContentsFromFileBy( $languageCode, $cacheKey ) { |
167 | 170 | |
168 | 171 | $contents = json_decode( |
@@ -189,6 +192,9 @@ discard block |
||
189 | 192 | throw new RuntimeException( "Expected a {$file} file" ); |
190 | 193 | } |
191 | 194 | |
195 | + /** |
|
196 | + * @param string $languageCode |
|
197 | + */ |
|
192 | 198 | private function getCacheKeyFrom( $languageCode ) { |
193 | 199 | return $this->cachePrefix . ':' . $languageCode . ':' . md5( $this->ttl . $this->getModificationTimeByLanguageCode( $languageCode ) ); |
194 | 200 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * |
64 | 64 | * @since 1.9 |
65 | 65 | * |
66 | - * @param mixed $error |
|
66 | + * @param string $error |
|
67 | 67 | */ |
68 | 68 | public function addError( $error ) { |
69 | 69 | $this->errors = array_merge( (array)$error === $error ? $error : array( $error ), $this->errors ); |
@@ -239,6 +239,11 @@ discard block |
||
239 | 239 | return $this->parseFromJson( $results ); |
240 | 240 | } |
241 | 241 | |
242 | + /** |
|
243 | + * @param boolean $pipe |
|
244 | + * |
|
245 | + * @return string |
|
246 | + */ |
|
242 | 247 | private function lookAheadOnNextElement( &$params, &$pipe ) { |
243 | 248 | |
244 | 249 | $separator = ''; |
@@ -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(); |
@@ -120,6 +120,7 @@ discard block |
||
120 | 120 | /** |
121 | 121 | * @since 2.2 |
122 | 122 | * |
123 | + * @param string $version |
|
123 | 124 | * @return boolean |
124 | 125 | */ |
125 | 126 | public function requiredToSkipForJsonVersion( $version ) { |
@@ -305,6 +306,11 @@ discard block |
||
305 | 306 | } ); |
306 | 307 | } |
307 | 308 | |
309 | + /** |
|
310 | + * @param string $index |
|
311 | + * |
|
312 | + * @return string |
|
313 | + */ |
|
308 | 314 | private function getFileContentsFor( $index ) { |
309 | 315 | |
310 | 316 | $contents = $this->fileReader->read(); |
@@ -125,7 +125,6 @@ discard block |
||
125 | 125 | * |
126 | 126 | * @since 1.9.0.2 |
127 | 127 | * |
128 | - * @param string $tableName |
|
129 | 128 | * |
130 | 129 | * @return string |
131 | 130 | */ |
@@ -180,6 +179,7 @@ discard block |
||
180 | 179 | * @param $conditions |
181 | 180 | * @param array $options |
182 | 181 | * @param array $joinConditions |
182 | + * @param string $fname |
|
183 | 183 | * |
184 | 184 | * @return ResultWrapper |
185 | 185 | * @throws UnexpectedValueException |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | * |
318 | 318 | * @param array $options |
319 | 319 | * |
320 | - * @return array |
|
320 | + * @return string[] |
|
321 | 321 | */ |
322 | 322 | public function makeSelectOptions( $options ) { |
323 | 323 | return DatabaseHelper::makeSelectOptions( $options ); |
@@ -351,6 +351,7 @@ discard block |
||
351 | 351 | * @note Use a blank trx profiler to ignore exceptions |
352 | 352 | * |
353 | 353 | * @since 2.4 |
354 | + * @param boolean $resetTransactionProfiler |
|
354 | 355 | */ |
355 | 356 | function resetTransactionProfiler( $resetTransactionProfiler ) { |
356 | 357 | $this->resetTransactionProfiler = $resetTransactionProfiler; |
@@ -385,6 +386,7 @@ discard block |
||
385 | 386 | |
386 | 387 | /** |
387 | 388 | * @since 2.4 |
389 | + * @param string $sql |
|
388 | 390 | */ |
389 | 391 | public function queryWithAutoCommit( $sql, $fname = __METHOD__, $ignoreException = false ) { |
390 | 392 | |
@@ -459,6 +461,8 @@ discard block |
||
459 | 461 | * @see DatabaseBase::selectField |
460 | 462 | * |
461 | 463 | * @since 1.9.2 |
464 | + * @param string $table |
|
465 | + * @param string $fieldName |
|
462 | 466 | */ |
463 | 467 | public function selectField( $table, $fieldName, $conditions = '', $fname = __METHOD__, $options = array() ) { |
464 | 468 | return $this->readConnection()->selectField( $table, $fieldName, $conditions, $fname, $options ); |
@@ -468,6 +472,7 @@ discard block |
||
468 | 472 | * @see DatabaseBase::estimateRowCount |
469 | 473 | * |
470 | 474 | * @since 2.1 |
475 | + * @param string $table |
|
471 | 476 | */ |
472 | 477 | public function estimateRowCount( $table, $vars = '*', $conditions = '', $fname = __METHOD__, $options = array() ) { |
473 | 478 | return $this->readConnection()->estimateRowCount( |
@@ -5,9 +5,6 @@ |
||
5 | 5 | use SMW\DIWikiPage; |
6 | 6 | use SMW\Localizer; |
7 | 7 | use SMW\Tests\MwDBaseUnitTestCase; |
8 | -use SMW\Tests\Utils\UtilityFactory; |
|
9 | -use SMW\Tests\TestEnvironment; |
|
10 | -use Title; |
|
11 | 8 | |
12 | 9 | /** |
13 | 10 | * @group SMW |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace SMW\Tests\MediaWiki\Hooks; |
4 | 4 | |
5 | -use SMW\Tests\Utils\UtilityFactory; |
|
6 | 5 | use SMW\MediaWiki\Hooks\HookRegistry; |
7 | 6 | use SMW\ApplicationFactory; |
8 | 7 | use SMW\DIWikiPage; |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | * |
102 | 102 | * @param string $queryString |
103 | 103 | * |
104 | - * @return Query |
|
104 | + * @return \SMWQuery |
|
105 | 105 | */ |
106 | 106 | public function createFromString( $queryString ) { |
107 | 107 | |
@@ -238,10 +238,18 @@ discard block |
||
238 | 238 | return $orders; |
239 | 239 | } |
240 | 240 | |
241 | + /** |
|
242 | + * @param string $sort |
|
243 | + * |
|
244 | + * @return string |
|
245 | + */ |
|
241 | 246 | private function getNormalizedSortLabel( $sort ) { |
242 | 247 | return Localizer::getInstance()->getNamespaceTextById( NS_CATEGORY ) == mb_convert_case( $sort, MB_CASE_TITLE ) ? '_INST' : $sort; |
243 | 248 | } |
244 | 249 | |
250 | + /** |
|
251 | + * @param string $key |
|
252 | + */ |
|
245 | 253 | private function getFromConfigurationWith( $key, $default ) { |
246 | 254 | return isset( $this->configuration[$key] ) ? $this->configuration[$key] : $default; |
247 | 255 | } |
@@ -6,7 +6,6 @@ |
||
6 | 6 | use SMW\SPARQLStore\QueryEngine\Interpreter\ThingDescriptionInterpreter; |
7 | 7 | use SMW\SPARQLStore\QueryEngine\CompoundConditionBuilder; |
8 | 8 | use SMW\Query\Language\ThingDescription; |
9 | -use SMW\DIWikiPage; |
|
10 | 9 | use SMW\DIProperty; |
11 | 10 | |
12 | 11 | /** |
@@ -68,10 +68,18 @@ |
||
68 | 68 | return $profileAnnotator; |
69 | 69 | } |
70 | 70 | |
71 | + /** |
|
72 | + * @param DescriptionProfileAnnotator $profileAnnotator |
|
73 | + * @param string $format |
|
74 | + */ |
|
71 | 75 | private function newFormatProfileAnnotator( $profileAnnotator, $format ) { |
72 | 76 | return new FormatProfileAnnotator( $profileAnnotator, $format ); |
73 | 77 | } |
74 | 78 | |
79 | + /** |
|
80 | + * @param FormatProfileAnnotator $profileAnnotator |
|
81 | + * @param Query $query |
|
82 | + */ |
|
75 | 83 | private function mergeWithDurationProfileAnnotator( $profileAnnotator, $query ) { |
76 | 84 | |
77 | 85 | if ( $query->getOptionBy( 'smwgQueryDurationEnabled' ) === false ) { |
@@ -7,7 +7,6 @@ |
||
7 | 7 | use SMW\Query\ProfileAnnotators\DescriptionProfileAnnotator; |
8 | 8 | use SMW\Query\ProfileAnnotators\FormatProfileAnnotator; |
9 | 9 | use SMW\Query\ProfileAnnotators\DurationProfileAnnotator; |
10 | -use SMW\Query\ProfileAnnotators\SourceProfileAnnotator; |
|
11 | 10 | use SMWContainerSemanticData as ContainerSemanticData; |
12 | 11 | use SMWDIContainer as DIContainer; |
13 | 12 | use SMWQuery as Query; |