@@ -30,7 +30,7 @@ |
||
30 | 30 | /** |
31 | 31 | * Record a log event for a change being patrolled |
32 | 32 | * |
33 | - * @param int|RecentChange $rc Change identifier or RecentChange object |
|
33 | + * @param RecentChange $rc Change identifier or RecentChange object |
|
34 | 34 | * @param bool $auto Was this patrol event automatic? |
35 | 35 | * @param User $user User performing the action or null to use $wgUser |
36 | 36 | * @param string|string[] $tags Change tags to add to the patrol log entry |
@@ -296,7 +296,7 @@ |
||
296 | 296 | /** |
297 | 297 | * Get hooks from a directory of PHP files. |
298 | 298 | * @param string $dir Directory path to start at |
299 | - * @param int $recursive Pass self::FIND_RECURSIVE |
|
299 | + * @param int $recurse Pass self::FIND_RECURSIVE |
|
300 | 300 | * @return array Array: key => hook name; value => array of arguments or string 'unknown' |
301 | 301 | */ |
302 | 302 | private function getHooksFromDir( $dir, $recurse = 0 ) { |
@@ -410,6 +410,11 @@ |
||
410 | 410 | return true; |
411 | 411 | } |
412 | 412 | |
413 | + /** |
|
414 | + * @param WatchedItem|null $item |
|
415 | + * @param string $force |
|
416 | + * @param integer $oldid |
|
417 | + */ |
|
413 | 418 | private function getNotificationTimestamp( User $user, Title $title, $item, $force, $oldid ) { |
414 | 419 | if ( !$oldid ) { |
415 | 420 | // No oldid given, assuming latest revision; clear the timestamp. |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | * Get an explanatory message if this repo is read-only. |
221 | 221 | * This checks if an administrator disabled writes to the backend. |
222 | 222 | * |
223 | - * @return string|bool Returns false if the repo is not read-only |
|
223 | + * @return string|false Returns false if the repo is not read-only |
|
224 | 224 | */ |
225 | 225 | public function getReadOnlyReason() { |
226 | 226 | return $this->backend->getReadOnlyReason(); |
@@ -716,7 +716,7 @@ discard block |
||
716 | 716 | * |
717 | 717 | * @param string $query Query string to append |
718 | 718 | * @param string $entry Entry point; defaults to index |
719 | - * @return string|bool False on failure |
|
719 | + * @return string|false False on failure |
|
720 | 720 | */ |
721 | 721 | public function makeUrl( $query = '', $entry = 'index' ) { |
722 | 722 | if ( isset( $this->scriptDirUrl ) ) { |
@@ -797,7 +797,7 @@ discard block |
||
797 | 797 | /** |
798 | 798 | * Get the URL of the stylesheet to apply to description pages |
799 | 799 | * |
800 | - * @return string|bool False on failure |
|
800 | + * @return string|false False on failure |
|
801 | 801 | */ |
802 | 802 | public function getDescriptionStylesheetUrl() { |
803 | 803 | if ( isset( $this->scriptDirUrl ) ) { |
@@ -958,7 +958,7 @@ discard block |
||
958 | 958 | * |
959 | 959 | * @param string|FSFile $src Source file system path, storage path, or virtual URL |
960 | 960 | * @param string $dst Virtual URL or storage path |
961 | - * @param array|string|null $options An array consisting of a key named headers |
|
961 | + * @param string $options An array consisting of a key named headers |
|
962 | 962 | * listing extra headers. If a string, taken as content-disposition header. |
963 | 963 | * (Support for array of options new in 1.23) |
964 | 964 | * @return FileRepoStatus |
@@ -1158,7 +1158,7 @@ discard block |
||
1158 | 1158 | * Options to $options include: |
1159 | 1159 | * - headers : name/value map of HTTP headers to use in response to GET/HEAD requests |
1160 | 1160 | * |
1161 | - * @param string|FSFile $src The source file system path, storage path, or URL |
|
1161 | + * @param string $src The source file system path, storage path, or URL |
|
1162 | 1162 | * @param string $dstRel The destination relative path |
1163 | 1163 | * @param string $archiveRel The relative path where the existing file is to |
1164 | 1164 | * be archived, if there is one. Relative to the public zone root. |
@@ -738,7 +738,7 @@ discard block |
||
738 | 738 | } |
739 | 739 | |
740 | 740 | /** |
741 | - * @return array|string |
|
741 | + * @return string |
|
742 | 742 | */ |
743 | 743 | function getDefaultDateFormat() { |
744 | 744 | $df = self::$dataCache->getItem( $this->mCode, 'defaultDateFormat' ); |
@@ -922,7 +922,7 @@ discard block |
||
922 | 922 | } |
923 | 923 | |
924 | 924 | /** |
925 | - * @return array |
|
925 | + * @return string[] |
|
926 | 926 | */ |
927 | 927 | function getMonthNamesArray() { |
928 | 928 | $monthNames = [ '' ]; |
@@ -949,7 +949,7 @@ discard block |
||
949 | 949 | } |
950 | 950 | |
951 | 951 | /** |
952 | - * @return array |
|
952 | + * @return string[] |
|
953 | 953 | */ |
954 | 954 | function getMonthAbbreviationsArray() { |
955 | 955 | $monthNames = [ '' ]; |
@@ -1011,7 +1011,7 @@ discard block |
||
1011 | 1011 | * Pass through result from $dateTimeObj->format() |
1012 | 1012 | * @param DateTime|bool|null &$dateTimeObj |
1013 | 1013 | * @param string $ts |
1014 | - * @param DateTimeZone|bool|null $zone |
|
1014 | + * @param null|DateTimeZone $zone |
|
1015 | 1015 | * @param string $code |
1016 | 1016 | * @return string |
1017 | 1017 | */ |
@@ -1808,7 +1808,7 @@ discard block |
||
1808 | 1808 | * |
1809 | 1809 | * @param int $year |
1810 | 1810 | * |
1811 | - * @return string |
|
1811 | + * @return integer |
|
1812 | 1812 | */ |
1813 | 1813 | private static function hebrewYearStart( $year ) { |
1814 | 1814 | $a = intval( ( 12 * ( $year - 1 ) + 17 ) % 19 ); |
@@ -2596,7 +2596,7 @@ discard block |
||
2596 | 2596 | |
2597 | 2597 | /** |
2598 | 2598 | * @param array $matches |
2599 | - * @return mixed|string |
|
2599 | + * @return string |
|
2600 | 2600 | */ |
2601 | 2601 | function ucwordbreaksCallbackAscii( $matches ) { |
2602 | 2602 | return $this->ucfirst( $matches[1] ); |
@@ -2699,7 +2699,7 @@ discard block |
||
2699 | 2699 | |
2700 | 2700 | /** |
2701 | 2701 | * @param string $str |
2702 | - * @return mixed|string |
|
2702 | + * @return string |
|
2703 | 2703 | */ |
2704 | 2704 | function lcfirst( $str ) { |
2705 | 2705 | $o = ord( $str ); |
@@ -2718,7 +2718,7 @@ discard block |
||
2718 | 2718 | /** |
2719 | 2719 | * @param string $str |
2720 | 2720 | * @param bool $first |
2721 | - * @return mixed|string |
|
2721 | + * @return string |
|
2722 | 2722 | */ |
2723 | 2723 | function lc( $str, $first = false ) { |
2724 | 2724 | if ( function_exists( 'mb_strtolower' ) ) { |
@@ -2755,7 +2755,7 @@ discard block |
||
2755 | 2755 | |
2756 | 2756 | /** |
2757 | 2757 | * @param string $str |
2758 | - * @return mixed|string |
|
2758 | + * @return string |
|
2759 | 2759 | */ |
2760 | 2760 | function ucwords( $str ) { |
2761 | 2761 | if ( $this->isMultibyte( $str ) ) { |
@@ -2787,7 +2787,7 @@ discard block |
||
2787 | 2787 | * capitalize words at word breaks |
2788 | 2788 | * |
2789 | 2789 | * @param string $str |
2790 | - * @return mixed |
|
2790 | + * @return string |
|
2791 | 2791 | */ |
2792 | 2792 | function ucwordbreaks( $str ) { |
2793 | 2793 | if ( $this->isMultibyte( $str ) ) { |
@@ -2858,7 +2858,7 @@ discard block |
||
2858 | 2858 | } |
2859 | 2859 | |
2860 | 2860 | /** |
2861 | - * @return array |
|
2861 | + * @return string |
|
2862 | 2862 | */ |
2863 | 2863 | function fallback8bitEncoding() { |
2864 | 2864 | return self::$dataCache->getItem( $this->mCode, 'fallback8bitEncoding' ); |
@@ -4154,6 +4154,8 @@ discard block |
||
4154 | 4154 | * @param Title &$nt The title object of the link |
4155 | 4155 | * @param bool $ignoreOtherCond To disable other conditions when |
4156 | 4156 | * we need to transclude a template or update a category's link |
4157 | + * @param string $link |
|
4158 | + * @param Title $nt |
|
4157 | 4159 | */ |
4158 | 4160 | public function findVariantLink( &$link, &$nt, $ignoreOtherCond = false ) { |
4159 | 4161 | $this->mConverter->findVariantLink( $link, $nt, $ignoreOtherCond ); |
@@ -4469,7 +4471,7 @@ discard block |
||
4469 | 4471 | |
4470 | 4472 | /** |
4471 | 4473 | * @param string $talk |
4472 | - * @return mixed |
|
4474 | + * @return string |
|
4473 | 4475 | */ |
4474 | 4476 | function fixVariableInNamespace( $talk ) { |
4475 | 4477 | if ( strpos( $talk, '$1' ) === false ) { |
@@ -4545,7 +4547,7 @@ discard block |
||
4545 | 4547 | |
4546 | 4548 | /** |
4547 | 4549 | * @todo Document |
4548 | - * @param int|float $seconds |
|
4550 | + * @param double $seconds |
|
4549 | 4551 | * @param array $format Optional |
4550 | 4552 | * If $format['avoid'] === 'avoidseconds': don't mention seconds if $seconds >= 1 hour. |
4551 | 4553 | * If $format['avoid'] === 'avoidminutes': don't mention seconds/minutes if $seconds > 48 hours. |
@@ -4714,7 +4716,7 @@ discard block |
||
4714 | 4716 | * @param string $details HTML safe text between brackets |
4715 | 4717 | * @param bool $oppositedm Add the direction mark opposite to your |
4716 | 4718 | * language, to display text properly |
4717 | - * @return HTML escaped string |
|
4719 | + * @return string escaped string |
|
4718 | 4720 | */ |
4719 | 4721 | function specialList( $page, $details, $oppositedm = true ) { |
4720 | 4722 | if ( !$details ) { |
@@ -4799,7 +4801,7 @@ discard block |
||
4799 | 4801 | /** |
4800 | 4802 | * Get the conversion rule title, if any. |
4801 | 4803 | * |
4802 | - * @return string |
|
4804 | + * @return boolean |
|
4803 | 4805 | */ |
4804 | 4806 | public function getConvRuleTitle() { |
4805 | 4807 | return $this->mConverter->getConvRuleTitle(); |
@@ -130,6 +130,11 @@ |
||
130 | 130 | } |
131 | 131 | } |
132 | 132 | |
133 | + /** |
|
134 | + * @param string $code |
|
135 | + * |
|
136 | + * @return string |
|
137 | + */ |
|
133 | 138 | protected function getFileName( $code ) { |
134 | 139 | if ( strval( $code ) === '' || strpos( $code, '/' ) !== false ) { |
135 | 140 | throw new MWException( __METHOD__ . ": Invalid language \"$code\"" ); |
@@ -691,7 +691,7 @@ |
||
691 | 691 | * |
692 | 692 | * @param string $code |
693 | 693 | * @param array $deps |
694 | - * @return array |
|
694 | + * @return string |
|
695 | 695 | */ |
696 | 696 | protected function readSourceFilesAndRegisterDeps( $code, &$deps ) { |
697 | 697 | global $IP; |
@@ -97,6 +97,10 @@ discard block |
||
97 | 97 | */ |
98 | 98 | public $custom; |
99 | 99 | |
100 | + /** |
|
101 | + * @param SpecialAllMessages $page |
|
102 | + * @param Language $langObj |
|
103 | + */ |
|
100 | 104 | function __construct( $page, $conds, $langObj = null ) { |
101 | 105 | parent::__construct( $page->getContext() ); |
102 | 106 | $this->mIndexField = 'am_title'; |
@@ -223,6 +227,9 @@ discard block |
||
223 | 227 | return $out; |
224 | 228 | } |
225 | 229 | |
230 | + /** |
|
231 | + * @param boolean $descending |
|
232 | + */ |
|
226 | 233 | function getAllMessages( $descending ) { |
227 | 234 | $messageNames = Language::getLocalisationCache()->getSubitemList( 'en', 'messages' ); |
228 | 235 | |
@@ -247,7 +254,7 @@ discard block |
||
247 | 254 | * @param array $messageNames |
248 | 255 | * @param string $langcode What language code |
249 | 256 | * @param bool $foreign Whether the $langcode is not the content language |
250 | - * @return array A 'pages' and 'talks' array with the keys of existing pages |
|
257 | + * @return string A 'pages' and 'talks' array with the keys of existing pages |
|
251 | 258 | */ |
252 | 259 | public static function getCustomisedStatuses( $messageNames, $langcode = 'en', $foreign = false ) { |
253 | 260 | // FIXME: This function should be moved to Language:: or something. |
@@ -439,6 +446,9 @@ discard block |
||
439 | 446 | return $arr; |
440 | 447 | } |
441 | 448 | |
449 | + /** |
|
450 | + * @param string $field |
|
451 | + */ |
|
442 | 452 | function getCellAttrs( $field, $value ) { |
443 | 453 | if ( $this->mCurrentRow->am_customised && $field === 'am_title' ) { |
444 | 454 | return array( 'rowspan' => '2', 'class' => $field ); |
@@ -179,6 +179,9 @@ |
||
179 | 179 | return Html::rawElement( 'li', null, $this->getLanguage()->specialList( $link, $count ) ) . "\n"; |
180 | 180 | } |
181 | 181 | |
182 | + /** |
|
183 | + * @param string $from |
|
184 | + */ |
|
182 | 185 | public function getStartForm( $from ) { |
183 | 186 | return Xml::tags( |
184 | 187 | 'form', |