@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | /** |
59 | 59 | * @param WikiPage $article |
60 | 60 | * @param string $hash |
61 | - * @return mixed|string |
|
61 | + * @return string |
|
62 | 62 | */ |
63 | 63 | protected function getParserOutputKey( $article, $hash ) { |
64 | 64 | global $wgRequest; |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | /** |
75 | 75 | * @param WikiPage $article |
76 | - * @return mixed|string |
|
76 | + * @return string |
|
77 | 77 | */ |
78 | 78 | protected function getOptionsKey( $article ) { |
79 | 79 | $pageid = $article->getId(); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | * @param WikiPage $article |
129 | 129 | * @param ParserOptions $popts |
130 | 130 | * @param bool $useOutdated (default true) |
131 | - * @return bool|mixed|string |
|
131 | + * @return false|string |
|
132 | 132 | */ |
133 | 133 | public function getKey( $article, $popts, $useOutdated = true ) { |
134 | 134 | global $wgCacheEpoch; |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | * Retrieve the ParserOutput from ParserCache. |
181 | 181 | * false if not found or outdated. |
182 | 182 | * |
183 | - * @param WikiPage|Article $article |
|
183 | + * @param WikiPage $article |
|
184 | 184 | * @param ParserOptions $popts |
185 | 185 | * @param bool $useOutdated (default false) |
186 | 186 | * |
@@ -97,8 +97,8 @@ discard block |
||
97 | 97 | * Way to pass custom data for engines |
98 | 98 | * @since 1.18 |
99 | 99 | * @param string $feature |
100 | - * @param mixed $data |
|
101 | - * @return bool |
|
100 | + * @param boolean $data |
|
101 | + * @return boolean|null |
|
102 | 102 | */ |
103 | 103 | public function setFeatureData( $feature, $data ) { |
104 | 104 | $this->features[$feature] = $data; |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | |
296 | 296 | /** |
297 | 297 | * Find snippet highlight settings for all users |
298 | - * @return array Contextlines, contextchars |
|
298 | + * @return integer[] Contextlines, contextchars |
|
299 | 299 | */ |
300 | 300 | public static function userHighlightPrefs() { |
301 | 301 | $contextlines = 2; // Hardcode this. Old defaults sucked. :) |
@@ -501,6 +501,7 @@ discard block |
||
501 | 501 | * Process completion search results. |
502 | 502 | * Resolves the titles and rescores. |
503 | 503 | * @param SearchSuggestionSet $suggestions |
504 | + * @param string $search |
|
504 | 505 | * @return SearchSuggestionSet |
505 | 506 | */ |
506 | 507 | protected function processCompletionResults( $search, SearchSuggestionSet $suggestions ) { |
@@ -584,7 +585,7 @@ discard block |
||
584 | 585 | * settings, returning a list of index numbers. |
585 | 586 | * @deprecated since 1.27; use SearchEngineConfig::userNamespaces() |
586 | 587 | * @param user $user |
587 | - * @return array |
|
588 | + * @return integer[] |
|
588 | 589 | */ |
589 | 590 | public static function userNamespaces( $user ) { |
590 | 591 | return MediaWikiServices::getInstance()->getSearchEngineConfig()->userNamespaces( $user ); |
@@ -593,7 +594,7 @@ discard block |
||
593 | 594 | /** |
594 | 595 | * An array of namespaces indexes to be searched by default |
595 | 596 | * @deprecated since 1.27; use SearchEngineConfig::defaultNamespaces() |
596 | - * @return array |
|
597 | + * @return integer[] |
|
597 | 598 | */ |
598 | 599 | public static function defaultNamespaces() { |
599 | 600 | return MediaWikiServices::getInstance()->getSearchEngineConfig()->defaultNamespaces(); |
@@ -604,7 +605,7 @@ discard block |
||
604 | 605 | * and preferences |
605 | 606 | * @deprecated since 1.27; use SearchEngineConfig::namespacesAsText() |
606 | 607 | * @param array $namespaces |
607 | - * @return array |
|
608 | + * @return string[] |
|
608 | 609 | */ |
609 | 610 | public static function namespacesAsText( $namespaces ) { |
610 | 611 | return MediaWikiServices::getInstance()->getSearchEngineConfig()->namespacesAsText( $namespaces ); |
@@ -234,7 +234,7 @@ |
||
234 | 234 | * If the user has already been blocked with similar settings, load that block |
235 | 235 | * and change the defaults for the form fields to match the existing settings. |
236 | 236 | * @param array $fields HTMLForm descriptor array |
237 | - * @return bool Whether fields were altered (that is, whether the target is |
|
237 | + * @return boolean|null Whether fields were altered (that is, whether the target is |
|
238 | 238 | * already blocked) |
239 | 239 | */ |
240 | 240 | protected function maybeAlterFormDefaults( &$fields ) { |
@@ -20,13 +20,6 @@ |
||
20 | 20 | |
21 | 21 | /** |
22 | 22 | * @param array $config Configuration options |
23 | - * @param int|null $config['pushPending'] Whether the input should be visually marked as |
|
24 | - * "pending", while requesting suggestions (default: true) |
|
25 | - * @param boolean|null $config['performSearchOnClick'] If true, the script will start a search |
|
26 | - * whenever a user hits a suggestion. If false, the text of the suggestion is inserted into the |
|
27 | - * text field only (default: true) |
|
28 | - * @param string $config['dataLocation'] Where the search input field will be |
|
29 | - * used (header or content, default: header) |
|
30 | 23 | */ |
31 | 24 | public function __construct( array $config = [] ) { |
32 | 25 | $config = array_merge( [ |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | * Returning true will generate errors indicating that the API module needs |
409 | 409 | * updating. |
410 | 410 | * |
411 | - * @return string|false |
|
411 | + * @return boolean |
|
412 | 412 | */ |
413 | 413 | public function needsToken() { |
414 | 414 | return false; |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | * |
422 | 422 | * @since 1.24 |
423 | 423 | * @param array $params All supplied parameters for the module |
424 | - * @return string|array|null |
|
424 | + * @return string |
|
425 | 425 | */ |
426 | 426 | protected function getWebUITokenSalt( array $params ) { |
427 | 427 | return null; |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | /** |
487 | 487 | * Get the parent of this module |
488 | 488 | * @since 1.25 |
489 | - * @return ApiBase|null |
|
489 | + * @return ApiMain |
|
490 | 490 | */ |
491 | 491 | public function getParent() { |
492 | 492 | return $this->isMain() ? null : $this->getMain(); |
@@ -621,6 +621,7 @@ discard block |
||
621 | 621 | /** |
622 | 622 | * Set the continuation manager |
623 | 623 | * @param ApiContinuationManager|null |
624 | + * @param ApiContinuationManager|null $manager |
|
624 | 625 | */ |
625 | 626 | public function setContinuationManager( $manager ) { |
626 | 627 | // Main module has setContinuationManager() method overridden |
@@ -704,6 +705,7 @@ discard block |
||
704 | 705 | * |
705 | 706 | * @param array $params User provided set of parameters, as from $this->extractRequestParams() |
706 | 707 | * @param string $required,... Names of parameters of which exactly one must be set |
708 | + * @param string $required |
|
707 | 709 | */ |
708 | 710 | public function requireOnlyOneParameter( $params, $required /*...*/ ) { |
709 | 711 | $required = func_get_args(); |
@@ -730,6 +732,7 @@ discard block |
||
730 | 732 | * |
731 | 733 | * @param array $params User provided set of parameters, as from $this->extractRequestParams() |
732 | 734 | * @param string $required,... Names of parameters of which at most one must be set |
735 | + * @param string $required |
|
733 | 736 | */ |
734 | 737 | public function requireMaxOneParameter( $params, $required /*...*/ ) { |
735 | 738 | $required = func_get_args(); |
@@ -753,6 +756,7 @@ discard block |
||
753 | 756 | * @since 1.23 |
754 | 757 | * @param array $params User provided set of parameters, as from $this->extractRequestParams() |
755 | 758 | * @param string $required,... Names of parameters of which at least one must be set |
759 | + * @param string $required |
|
756 | 760 | */ |
757 | 761 | public function requireAtLeastOneParameter( $params, $required /*...*/ ) { |
758 | 762 | $required = func_get_args(); |
@@ -2531,7 +2535,7 @@ discard block |
||
2531 | 2535 | * "apihelp-{$this->getModulePath()}-description". |
2532 | 2536 | * |
2533 | 2537 | * @deprecated since 1.25 |
2534 | - * @return Message|string|array |
|
2538 | + * @return boolean |
|
2535 | 2539 | */ |
2536 | 2540 | protected function getDescription() { |
2537 | 2541 | return false; |
@@ -2567,7 +2571,7 @@ discard block |
||
2567 | 2571 | * that value, and boolean false means "no examples". |
2568 | 2572 | * |
2569 | 2573 | * @deprecated since 1.25, use getExamplesMessages() instead |
2570 | - * @return bool|string|array |
|
2574 | + * @return boolean |
|
2571 | 2575 | */ |
2572 | 2576 | protected function getExamples() { |
2573 | 2577 | return false; |
@@ -2576,7 +2580,7 @@ discard block |
||
2576 | 2580 | /** |
2577 | 2581 | * Generates help message for this module, or false if there is no description |
2578 | 2582 | * @deprecated since 1.25 |
2579 | - * @return string|bool |
|
2583 | + * @return string |
|
2580 | 2584 | */ |
2581 | 2585 | public function makeHelpMsg() { |
2582 | 2586 | wfDeprecated( __METHOD__, '1.25' ); |
@@ -2686,7 +2690,7 @@ discard block |
||
2686 | 2690 | * Generates the parameter descriptions for this module, to be displayed in the |
2687 | 2691 | * module's help. |
2688 | 2692 | * @deprecated since 1.25 |
2689 | - * @return string|bool |
|
2693 | + * @return string|false |
|
2690 | 2694 | */ |
2691 | 2695 | public function makeHelpMsgParameters() { |
2692 | 2696 | wfDeprecated( __METHOD__, '1.25' ); |
@@ -2877,7 +2881,7 @@ discard block |
||
2877 | 2881 | |
2878 | 2882 | /** |
2879 | 2883 | * @deprecated since 1.25, always returns 0 |
2880 | - * @return float |
|
2884 | + * @return integer |
|
2881 | 2885 | */ |
2882 | 2886 | public function getProfileTime() { |
2883 | 2887 | wfDeprecated( __METHOD__, '1.25' ); |
@@ -2900,7 +2904,7 @@ discard block |
||
2900 | 2904 | |
2901 | 2905 | /** |
2902 | 2906 | * @deprecated since 1.25, always returns 0 |
2903 | - * @return float |
|
2907 | + * @return integer |
|
2904 | 2908 | */ |
2905 | 2909 | public function getProfileDBTime() { |
2906 | 2910 | wfDeprecated( __METHOD__, '1.25' ); |
@@ -53,6 +53,8 @@ |
||
53 | 53 | |
54 | 54 | /** |
55 | 55 | * Private constructor |
56 | + * @param string $text |
|
57 | + * @param boolean $lineStart |
|
56 | 58 | */ |
57 | 59 | private function __construct( $text, $lineStart ) { |
58 | 60 | $this->text = $text; |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | * Force the dump to use the provided database connection for database |
335 | 335 | * operations, wherever possible. |
336 | 336 | * |
337 | - * @param DatabaseBase|null $db (Optional) the database connection to use. If null, resort to |
|
337 | + * @param null|IDatabase $db (Optional) the database connection to use. If null, resort to |
|
338 | 338 | * use the globally provided ways to get database connections. |
339 | 339 | */ |
340 | 340 | function setDB( IDatabase $db = null ) { |
@@ -422,6 +422,10 @@ discard block |
||
422 | 422 | } |
423 | 423 | |
424 | 424 | class ExportProgressFilter extends DumpFilter { |
425 | + |
|
426 | + /** |
|
427 | + * @param BackupDumper $progress |
|
428 | + */ |
|
425 | 429 | function __construct( &$sink, &$progress ) { |
426 | 430 | parent::__construct( $sink ); |
427 | 431 | $this->progress = $progress; |
@@ -47,6 +47,9 @@ |
||
47 | 47 | protected $lastRev = 0; |
48 | 48 | protected $infiles = null; |
49 | 49 | |
50 | + /** |
|
51 | + * @param string $infile |
|
52 | + */ |
|
50 | 53 | public function __construct( $infile ) { |
51 | 54 | $this->infiles = explode( ';', $infile ); |
52 | 55 | $this->reader = new XMLReader(); |
@@ -117,10 +117,16 @@ |
||
117 | 117 | return $this->repo->getRootDirectory() . '/' . $this->repo->getHashPath( $name ) . $name; |
118 | 118 | } |
119 | 119 | |
120 | + /** |
|
121 | + * @param IDatabase $db |
|
122 | + */ |
|
120 | 123 | private function imageExists( $name, $db ) { |
121 | 124 | return $db->selectField( 'image', '1', [ 'img_name' => $name ], __METHOD__ ); |
122 | 125 | } |
123 | 126 | |
127 | + /** |
|
128 | + * @param IDatabase $db |
|
129 | + */ |
|
124 | 130 | private function pageExists( $name, $db ) { |
125 | 131 | return $db->selectField( |
126 | 132 | 'page', |