Index: trunk/extensions/Translate/FFS.php |
— | — | @@ -73,7 +73,12 @@ |
74 | 74 | * @ingroup FFS |
75 | 75 | */ |
76 | 76 | class SimpleFFS implements FFS { |
| 77 | + |
| 78 | + /** |
| 79 | + * @var FileBasedMessageGroup |
| 80 | + */ |
77 | 81 | protected $group; |
| 82 | + |
78 | 83 | protected $writePath; |
79 | 84 | protected $extra; |
80 | 85 | |
— | — | @@ -83,12 +88,30 @@ |
84 | 89 | $this->extra = $conf['FILES']; |
85 | 90 | } |
86 | 91 | |
| 92 | + /** |
| 93 | + * @param $group FileBasedMessageGroup |
| 94 | + */ |
87 | 95 | public function setGroup( FileBasedMessageGroup $group ) { $this->group = $group; } |
| 96 | + |
| 97 | + /** |
| 98 | + * @return FileBasedMessageGroup |
| 99 | + */ |
88 | 100 | public function getGroup() { return $this->group; } |
89 | 101 | |
| 102 | + /** |
| 103 | + * @param $writePath string |
| 104 | + */ |
90 | 105 | public function setWritePath( $writePath ) { $this->writePath = $writePath; } |
| 106 | + |
| 107 | + /** |
| 108 | + * @return string |
| 109 | + */ |
91 | 110 | public function getWritePath() { return $this->writePath; } |
92 | 111 | |
| 112 | + /** |
| 113 | + * @param $code string|bool |
| 114 | + * @return bool |
| 115 | + */ |
93 | 116 | public function exists( $code = false ) { |
94 | 117 | if ( $code === false ) { |
95 | 118 | $code = $this->group->getSourceLanguage(); |
— | — | @@ -106,6 +129,11 @@ |
107 | 130 | return true; |
108 | 131 | } |
109 | 132 | |
| 133 | + /** |
| 134 | + * @param $code string |
| 135 | + * @return array|bool |
| 136 | + * @throws MWException |
| 137 | + */ |
110 | 138 | public function read( $code ) { |
111 | 139 | if ( !$this->exists( $code ) ) { |
112 | 140 | return false; |
— | — | @@ -120,6 +148,11 @@ |
121 | 149 | return $this->readFromVariable( $input ); |
122 | 150 | } |
123 | 151 | |
| 152 | + /** |
| 153 | + * @param $data array |
| 154 | + * @return array |
| 155 | + * @throws MWException |
| 156 | + */ |
124 | 157 | public function readFromVariable( $data ) { |
125 | 158 | $parts = explode( "\0\0\0\0", $data ); |
126 | 159 | |
— | — | @@ -155,6 +188,9 @@ |
156 | 189 | ); |
157 | 190 | } |
158 | 191 | |
| 192 | + /** |
| 193 | + * @param $collection MessageCollection |
| 194 | + */ |
159 | 195 | public function write( MessageCollection $collection ) { |
160 | 196 | $writePath = $this->writePath; |
161 | 197 | |
— | — | @@ -186,6 +222,10 @@ |
187 | 223 | } |
188 | 224 | } |
189 | 225 | |
| 226 | + /** |
| 227 | + * @param $collection MessageCollection |
| 228 | + * @return |
| 229 | + */ |
190 | 230 | public function writeIntoVariable( MessageCollection $collection ) { |
191 | 231 | $sourceFile = $this->group->getSourceFilePath( $collection->code ); |
192 | 232 | $this->tryReadSource( $sourceFile, $collection ); |
— | — | @@ -193,6 +233,10 @@ |
194 | 234 | return $this->writeReal( $collection ); |
195 | 235 | } |
196 | 236 | |
| 237 | + /** |
| 238 | + * @param $collection MessageCollection |
| 239 | + * @return string |
| 240 | + */ |
197 | 241 | protected function writeReal( MessageCollection $collection ) { |
198 | 242 | $output = ''; |
199 | 243 | |
— | — | @@ -212,6 +256,10 @@ |
213 | 257 | return $output; |
214 | 258 | } |
215 | 259 | |
| 260 | + /** |
| 261 | + * @param $filename string |
| 262 | + * @param $collection MessageCollection |
| 263 | + */ |
216 | 264 | protected function tryReadSource( $filename, $collection ) { |
217 | 265 | $sourceText = $this->tryReadFile( $filename ); |
218 | 266 | |
— | — | @@ -224,6 +272,11 @@ |
225 | 273 | } |
226 | 274 | } |
227 | 275 | |
| 276 | + /** |
| 277 | + * @param $filename string |
| 278 | + * @return bool|string |
| 279 | + * @throws MWException |
| 280 | + */ |
228 | 281 | protected function tryReadFile( $filename ) { |
229 | 282 | if ( !$filename ) { |
230 | 283 | return false; |
— | — | @@ -245,6 +298,11 @@ |
246 | 299 | return $data; |
247 | 300 | } |
248 | 301 | |
| 302 | + /** |
| 303 | + * @param $authors array |
| 304 | + * @param $code string |
| 305 | + * @return array |
| 306 | + */ |
249 | 307 | protected function filterAuthors( array $authors, $code ) { |
250 | 308 | global $wgTranslateAuthorBlacklist; |
251 | 309 | $groupId = $this->group->getId(); |
— | — | @@ -274,6 +332,10 @@ |
275 | 333 | return $authors; |
276 | 334 | } |
277 | 335 | |
| 336 | + /** |
| 337 | + * @param $data string |
| 338 | + * @return string |
| 339 | + */ |
278 | 340 | public static function fixNewLines( $data ) { |
279 | 341 | $data = str_replace( "\r\n", "\n", $data ); |
280 | 342 | $data = str_replace( "\r", "\n", $data ); |
— | — | @@ -294,6 +356,9 @@ |
295 | 357 | class JavaFFS extends SimpleFFS { |
296 | 358 | protected $keySeparator = '='; |
297 | 359 | |
| 360 | + /** |
| 361 | + * @param $group FileBasedMessageGroup |
| 362 | + */ |
298 | 363 | public function __construct( FileBasedMessageGroup $group ) { |
299 | 364 | parent::__construct( $group ); |
300 | 365 | |
— | — | @@ -304,12 +369,18 @@ |
305 | 370 | |
306 | 371 | // READ |
307 | 372 | |
| 373 | + /** |
| 374 | + * @param $data array |
| 375 | + * @return array |
| 376 | + * @throws MWException |
| 377 | + */ |
308 | 378 | public function readFromVariable( $data ) { |
309 | 379 | $data = self::fixNewLines( $data ); |
310 | 380 | $lines = array_map( 'ltrim', explode( "\n", $data ) ); |
311 | 381 | $authors = $messages = array(); |
312 | 382 | $linecontinuation = false; |
313 | 383 | |
| 384 | + $value = ''; |
314 | 385 | foreach ( $lines as $line ) { |
315 | 386 | if ( $linecontinuation ) { |
316 | 387 | $linecontinuation = false; |
— | — | @@ -364,6 +435,10 @@ |
365 | 436 | |
366 | 437 | // Write |
367 | 438 | |
| 439 | + /** |
| 440 | + * @param $collection MessageCollection |
| 441 | + * @return string |
| 442 | + */ |
368 | 443 | protected function writeReal( MessageCollection $collection ) { |
369 | 444 | $header = $this->doHeader( $collection ); |
370 | 445 | $header .= $this->doAuthors( $collection ); |
— | — | @@ -397,6 +472,10 @@ |
398 | 473 | } |
399 | 474 | } |
400 | 475 | |
| 476 | + /** |
| 477 | + * @param $collection MessageCollection |
| 478 | + * @return string |
| 479 | + */ |
401 | 480 | protected function doHeader( MessageCollection $collection ) { |
402 | 481 | if ( isset( $this->extra['header'] ) ) { |
403 | 482 | $output = $this->extra['header']; |
— | — | @@ -413,6 +492,10 @@ |
414 | 493 | return $output; |
415 | 494 | } |
416 | 495 | |
| 496 | + /** |
| 497 | + * @param $collection MessageCollection |
| 498 | + * @return string |
| 499 | + */ |
417 | 500 | protected function doAuthors( MessageCollection $collection ) { |
418 | 501 | $output = ''; |
419 | 502 | $authors = $collection->getAuthors(); |
— | — | @@ -433,11 +516,18 @@ |
434 | 517 | abstract class JavaScriptFFS extends SimpleFFS { |
435 | 518 | /** |
436 | 519 | * Message keys format. |
| 520 | + * |
| 521 | + * @param $string |
| 522 | + * |
| 523 | + * @return string |
437 | 524 | */ |
438 | 525 | abstract protected function transformKey( $key ); |
439 | 526 | |
440 | 527 | /** |
441 | 528 | * Header of message file. |
| 529 | + * |
| 530 | + * @param $code string |
| 531 | + * @param $authors array |
442 | 532 | */ |
443 | 533 | abstract protected function header( $code, $authors ); |
444 | 534 | |
— | — | @@ -446,6 +536,10 @@ |
447 | 537 | */ |
448 | 538 | abstract protected function footer(); |
449 | 539 | |
| 540 | + /** |
| 541 | + * @param $data array |
| 542 | + * @return array |
| 543 | + */ |
450 | 544 | public function readFromVariable( $data ) { |
451 | 545 | /* Parse authors list */ |
452 | 546 | $authors = preg_replace( "#/\* Translators\:\n(.*?)\n \*/(.*)#s", '$1', $data ); |
— | — | @@ -543,6 +637,10 @@ |
544 | 638 | ); |
545 | 639 | } |
546 | 640 | |
| 641 | + /** |
| 642 | + * @param $collection MessageCollection |
| 643 | + * @return string |
| 644 | + */ |
547 | 645 | public function writeReal( MessageCollection $collection ) { |
548 | 646 | $header = $this->header( $collection->code, $collection->getAuthors() ); |
549 | 647 | |
— | — | @@ -578,6 +676,10 @@ |
579 | 677 | return $header . $body . $this->footer(); |
580 | 678 | } |
581 | 679 | |
| 680 | + /** |
| 681 | + * @param $authors array |
| 682 | + * @return string |
| 683 | + */ |
582 | 684 | protected function authorsList( $authors ) { |
583 | 685 | if ( count( $authors ) === 0 ) { |
584 | 686 | return ''; |
— | — | @@ -594,6 +696,10 @@ |
595 | 697 | return substr( " * Translators:\n$authorsList", 0, -1 ); |
596 | 698 | } |
597 | 699 | |
| 700 | + /** |
| 701 | + * @param $string string |
| 702 | + * @return string |
| 703 | + */ |
598 | 704 | protected static function unescapeJsString( $string ) { |
599 | 705 | // See ECMA 262 section 7.8.4 for string literal format |
600 | 706 | $pairs = array( |
— | — | @@ -631,10 +737,20 @@ |
632 | 738 | * @ingroup FFS |
633 | 739 | */ |
634 | 740 | class OpenLayersFFS extends JavaScriptFFS { |
| 741 | + |
| 742 | + /** |
| 743 | + * @param $key string |
| 744 | + * @return string |
| 745 | + */ |
635 | 746 | protected function transformKey( $key ) { |
636 | 747 | return "'$key'"; |
637 | 748 | } |
638 | 749 | |
| 750 | + /** |
| 751 | + * @param $code string |
| 752 | + * @param $authors array |
| 753 | + * @return string |
| 754 | + */ |
639 | 755 | protected function header( $code, $authors ) { |
640 | 756 | $names = Language::getLanguageNames(); |
641 | 757 | $name = $names[ $code ]; |
— | — | @@ -665,6 +781,9 @@ |
666 | 782 | /** @endcond */ |
667 | 783 | } |
668 | 784 | |
| 785 | + /** |
| 786 | + * @return string |
| 787 | + */ |
669 | 788 | protected function footer() { |
670 | 789 | return "});\n"; |
671 | 790 | } |
— | — | @@ -675,10 +794,21 @@ |
676 | 795 | * @ingroup FFS |
677 | 796 | */ |
678 | 797 | class ShapadoJsFFS extends JavaScriptFFS { |
| 798 | + |
| 799 | + /** |
| 800 | + * @param $key string |
| 801 | + * |
| 802 | + * @return string |
| 803 | + */ |
679 | 804 | protected function transformKey( $key ) { |
680 | 805 | return $key; |
681 | 806 | } |
682 | 807 | |
| 808 | + /** |
| 809 | + * @param $code string |
| 810 | + * @param $authors array |
| 811 | + * @return string |
| 812 | + */ |
683 | 813 | protected function header( $code, $authors ) { |
684 | 814 | global $wgSitename; |
685 | 815 | |
— | — | @@ -700,6 +830,9 @@ |
701 | 831 | /** @endcond */ |
702 | 832 | } |
703 | 833 | |
| 834 | + /** |
| 835 | + * @return string |
| 836 | + */ |
704 | 837 | protected function footer() { |
705 | 838 | return "};\n\n"; |
706 | 839 | } |
— | — | @@ -714,6 +847,10 @@ |
715 | 848 | */ |
716 | 849 | class YamlFFS extends SimpleFFS { |
717 | 850 | |
| 851 | + /** |
| 852 | + * @param $data |
| 853 | + * @return array |
| 854 | + */ |
718 | 855 | public function readFromVariable( $data ) { |
719 | 856 | // Authors first. |
720 | 857 | $matches = array(); |
— | — | @@ -740,6 +877,10 @@ |
741 | 878 | ); |
742 | 879 | } |
743 | 880 | |
| 881 | + /** |
| 882 | + * @param $collection MessageCollection |
| 883 | + * @return string |
| 884 | + */ |
744 | 885 | protected function writeReal( MessageCollection $collection ) { |
745 | 886 | $output = $this->doHeader( $collection ); |
746 | 887 | $output .= $this->doAuthors( $collection ); |
— | — | @@ -775,6 +916,10 @@ |
776 | 917 | return $output; |
777 | 918 | } |
778 | 919 | |
| 920 | + /** |
| 921 | + * @param $collection MessageCollection |
| 922 | + * @return string |
| 923 | + */ |
779 | 924 | protected function doHeader( MessageCollection $collection ) { |
780 | 925 | global $wgSitename; |
781 | 926 | global $wgTranslateYamlLibrary; |
— | — | @@ -792,6 +937,10 @@ |
793 | 938 | return $output; |
794 | 939 | } |
795 | 940 | |
| 941 | + /** |
| 942 | + * @param $collection MessageCollection |
| 943 | + * @return string |
| 944 | + */ |
796 | 945 | protected function doAuthors( MessageCollection $collection ) { |
797 | 946 | $output = ''; |
798 | 947 | $authors = $collection->getAuthors(); |
— | — | @@ -807,6 +956,10 @@ |
808 | 957 | /** |
809 | 958 | * Flattens multidimensional array by using the path to the value as key |
810 | 959 | * with each individual key separated by a dot. |
| 960 | + * |
| 961 | + * @param $messages array |
| 962 | + * |
| 963 | + * @return array |
811 | 964 | */ |
812 | 965 | protected function flatten( $messages ) { |
813 | 966 | $flat = true; |
— | — | @@ -816,7 +969,8 @@ |
817 | 970 | continue; |
818 | 971 | } |
819 | 972 | |
820 | | - $flat = false; break; |
| 973 | + $flat = false; |
| 974 | + break; |
821 | 975 | } |
822 | 976 | |
823 | 977 | if ( $flat ) { |
— | — | @@ -852,6 +1006,10 @@ |
853 | 1007 | /** |
854 | 1008 | * Performs the reverse operation of flatten. Each dot in the key starts a |
855 | 1009 | * new subarray in the final array. |
| 1010 | + * |
| 1011 | + * @param $messages array |
| 1012 | + * |
| 1013 | + * @return array |
856 | 1014 | */ |
857 | 1015 | protected function unflatten( $messages ) { |
858 | 1016 | $array = array(); |
— | — | @@ -902,13 +1060,21 @@ |
903 | 1061 | return $array; |
904 | 1062 | } |
905 | 1063 | |
| 1064 | + /** |
| 1065 | + * @param $value |
| 1066 | + * @return bool |
| 1067 | + */ |
906 | 1068 | public function flattenPlural( $value ) { |
907 | 1069 | return false; |
908 | 1070 | } |
909 | 1071 | |
910 | 1072 | /** |
911 | 1073 | * Override this. Return false to skip processing this value. Otherwise |
912 | | - * return array with keys and values. |
| 1074 | + * |
| 1075 | + * @param $key string |
| 1076 | + * @param $value string |
| 1077 | + * |
| 1078 | + * @return array with keys and values. |
913 | 1079 | */ |
914 | 1080 | public function unflattenPlural( $key, $value ) { |
915 | 1081 | return array( $key => $value ); |
— | — | @@ -933,6 +1099,10 @@ |
934 | 1100 | |
935 | 1101 | /** |
936 | 1102 | * Flattens ruby plural arrays into special plural syntax. |
| 1103 | + * |
| 1104 | + * @param $messages array |
| 1105 | + * |
| 1106 | + * @return bool|string |
937 | 1107 | */ |
938 | 1108 | public function flattenPlural( $messages ) { |
939 | 1109 | |
— | — | @@ -966,6 +1136,11 @@ |
967 | 1137 | |
968 | 1138 | /** |
969 | 1139 | * Converts the special plural syntax to array or ruby style plurals |
| 1140 | + * |
| 1141 | + * @param $key string |
| 1142 | + * @param $message string |
| 1143 | + * |
| 1144 | + * @return bool|array |
970 | 1145 | */ |
971 | 1146 | public function unflattenPlural( $key, $message ) { |
972 | 1147 | // Quick escape. |
— | — | @@ -1053,6 +1228,9 @@ |
1054 | 1229 | return $alts; |
1055 | 1230 | } |
1056 | 1231 | |
| 1232 | + /** |
| 1233 | + * @return string |
| 1234 | + */ |
1057 | 1235 | protected function placeholder() { |
1058 | 1236 | static $i = 0; |
1059 | 1237 | |
— | — | @@ -1068,6 +1246,10 @@ |
1069 | 1247 | private $fw = null; |
1070 | 1248 | static $data = null; |
1071 | 1249 | |
| 1250 | + /** |
| 1251 | + * @param $code |
| 1252 | + * @return array |
| 1253 | + */ |
1072 | 1254 | public function read( $code ) { |
1073 | 1255 | // TODO: Improve this code to not use static variables. |
1074 | 1256 | if ( !isset( self::$data[$this->group->getId()] ) ) { |
— | — | @@ -1091,6 +1273,9 @@ |
1092 | 1274 | return array( 'MESSAGES' => self::$data[$this->group->getId()][$code] ); |
1093 | 1275 | } |
1094 | 1276 | |
| 1277 | + /** |
| 1278 | + * @param $collection MessageCollection |
| 1279 | + */ |
1095 | 1280 | public function write( MessageCollection $collection ) { |
1096 | 1281 | if ( $this->fw === null ) { |
1097 | 1282 | $sourceLanguage = $this->group->getSourceLanguage(); |
— | — | @@ -1124,6 +1309,10 @@ |
1125 | 1310 | fwrite( $this->fw, "\t},\n" ); |
1126 | 1311 | } |
1127 | 1312 | |
| 1313 | + /** |
| 1314 | + * @param $collection MessageCollection |
| 1315 | + * @return string |
| 1316 | + */ |
1128 | 1317 | public function writeIntoVariable( MessageCollection $collection ) { |
1129 | 1318 | return <<<PHP |
1130 | 1319 | # -*- coding: utf-8 -*- |
— | — | @@ -1134,6 +1323,10 @@ |
1135 | 1324 | PHP; |
1136 | 1325 | } |
1137 | 1326 | |
| 1327 | + /** |
| 1328 | + * @param $collection MessageCollection |
| 1329 | + * @return string |
| 1330 | + */ |
1138 | 1331 | protected function writeBlock( MessageCollection $collection ) { |
1139 | 1332 | $block = ''; |
1140 | 1333 | $messages = array(); |
— | — | @@ -1160,6 +1353,10 @@ |
1161 | 1354 | return $block; |
1162 | 1355 | } |
1163 | 1356 | |
| 1357 | + /** |
| 1358 | + * @param $collection MessageCollection |
| 1359 | + * @return string |
| 1360 | + */ |
1164 | 1361 | protected function doAuthors( MessageCollection $collection ) { |
1165 | 1362 | $output = ''; |
1166 | 1363 | |
Index: trunk/extensions/Translate/tag/RenderJob.php |
— | — | @@ -14,6 +14,11 @@ |
15 | 15 | * @ingroup PageTranslation JobQueue |
16 | 16 | */ |
17 | 17 | class RenderJob extends Job { |
| 18 | + |
| 19 | + /** |
| 20 | + * @param $target Title |
| 21 | + * @return RenderJob |
| 22 | + */ |
18 | 23 | public static function newJob( Title $target ) { |
19 | 24 | global $wgTranslateFuzzyBotName; |
20 | 25 | |
— | — | @@ -87,6 +92,9 @@ |
88 | 93 | return $this->params['summary']; |
89 | 94 | } |
90 | 95 | |
| 96 | + /** |
| 97 | + * @param $user User |
| 98 | + */ |
91 | 99 | public function setUser( $user ) { |
92 | 100 | if ( $user instanceof User ) { |
93 | 101 | $this->params['user'] = $user->getName(); |
— | — | @@ -97,6 +105,8 @@ |
98 | 106 | |
99 | 107 | /** |
100 | 108 | * Get a user object for doing edits. |
| 109 | + * |
| 110 | + * @return User |
101 | 111 | */ |
102 | 112 | public function getUser() { |
103 | 113 | return User::newFromName( $this->params['user'], false ); |
Index: trunk/extensions/Translate/TranslateEditAddons.php |
— | — | @@ -22,6 +22,8 @@ |
23 | 23 | * Hooks: SkinTemplateNavigation, SkinTemplateTabs |
24 | 24 | * @param $skin Skin |
25 | 25 | * @param $tabs Array |
| 26 | + * |
| 27 | + * @return bool |
26 | 28 | */ |
27 | 29 | static function addNavigationTabs( $skin, &$tabs ) { |
28 | 30 | global $wgRequest; |
Index: trunk/extensions/Translate/utils/Font.php |
— | — | @@ -19,6 +19,8 @@ |
20 | 20 | /** |
21 | 21 | * Searches for suitable font in the system. |
22 | 22 | * @param $code \string Language code. |
| 23 | + * |
| 24 | + * @return bool|string |
23 | 25 | */ |
24 | 26 | public static function find( $code ) { |
25 | 27 | if ( ini_get( 'open_basedir' ) ) { |
Index: trunk/extensions/Translate/utils/TranslationMemoryUpdater.php |
— | — | @@ -15,6 +15,13 @@ |
16 | 16 | /** |
17 | 17 | * Shovels the new translation into translation memory. |
18 | 18 | * Hook: Translate:newTranslation |
| 19 | + * |
| 20 | + * @param $handle MessageHandle |
| 21 | + * @param $revision |
| 22 | + * @param $text string |
| 23 | + * @param $user User |
| 24 | + * |
| 25 | + * @return bool |
19 | 26 | */ |
20 | 27 | public static function update( MessageHandle $handle, $revision, $text, User $user ) { |
21 | 28 | global $wgContLang; |
Index: trunk/extensions/Translate/utils/TranslateYaml.php |
— | — | @@ -41,6 +41,9 @@ |
42 | 42 | |
43 | 43 | /** |
44 | 44 | * Merges a document template (base) to actual definition (specific) |
| 45 | + * @param $base |
| 46 | + * @param $specific |
| 47 | + * @return array |
45 | 48 | */ |
46 | 49 | public static function mergeTemplate( $base, $specific ) { |
47 | 50 | foreach ( $specific as $key => $value ) { |
Index: trunk/extensions/Translate/utils/TranslationHelpers.php |
— | — | @@ -1145,7 +1145,8 @@ |
1146 | 1146 | protected static $serviceFailurePeriod = 900; |
1147 | 1147 | |
1148 | 1148 | /** |
1149 | | - * Checks whether the given service has exceeded failure count */ |
| 1149 | + * Checks whether the given service has exceeded failure count |
| 1150 | + */ |
1150 | 1151 | public static function checkTranslationServiceFailure( $service ) { |
1151 | 1152 | global $wgMemc; |
1152 | 1153 | |
— | — | @@ -1197,6 +1198,9 @@ |
1198 | 1199 | } |
1199 | 1200 | } |
1200 | 1201 | |
| 1202 | + /** |
| 1203 | + * @param $out OutputPage |
| 1204 | + */ |
1201 | 1205 | public static function addModules( OutputPage $out ) { |
1202 | 1206 | $out->addModules( 'ext.translate.quickedit' ); |
1203 | 1207 | |
Index: trunk/extensions/Translate/utils/RevTag.php |
— | — | @@ -16,6 +16,8 @@ |
17 | 17 | |
18 | 18 | /** |
19 | 19 | * Determines the schema version. |
| 20 | + * |
| 21 | + * @return int |
20 | 22 | */ |
21 | 23 | public static function checkSchema() { |
22 | 24 | if ( self::$schema !== false ) { |
— | — | @@ -33,7 +35,7 @@ |
34 | 36 | /** |
35 | 37 | * Returns value suitable for rt_type field. |
36 | 38 | * @param $tag string tag name |
37 | | - * return int|string |
| 39 | + * @return int|string |
38 | 40 | */ |
39 | 41 | public static function getType( $tag ) { |
40 | 42 | if ( self::checkSchema() === 2 ) { |
Index: trunk/extensions/Translate/specials/SpecialMagic.php |
— | — | @@ -42,6 +42,8 @@ |
43 | 43 | |
44 | 44 | /** |
45 | 45 | * @see SpecialPage::getDescription |
| 46 | + * |
| 47 | + * @return string |
46 | 48 | */ |
47 | 49 | function getDescription() { |
48 | 50 | return wfMsg( 'translate-magic-pagename' ); |