Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -86,6 +86,11 @@ |
87 | 87 | return array_udiff( $a, $b, 'wfArrayDiff2_cmp' ); |
88 | 88 | } |
89 | 89 | |
| 90 | +/** |
| 91 | + * @param $a |
| 92 | + * @param $b |
| 93 | + * @return int |
| 94 | + */ |
90 | 95 | function wfArrayDiff2_cmp( $a, $b ) { |
91 | 96 | if ( !is_array( $a ) ) { |
92 | 97 | return strcmp( $a, $b ); |
Index: trunk/phase3/includes/objectcache/DBABagOStuff.php |
— | — | @@ -27,6 +27,8 @@ |
28 | 28 | |
29 | 29 | /** |
30 | 30 | * Encode value and expiry for storage |
| 31 | + * @param $value |
| 32 | + * @param $expiry |
31 | 33 | * |
32 | 34 | * @return string |
33 | 35 | */ |
Index: trunk/phase3/includes/db/LBFactory_Single.php |
— | — | @@ -86,8 +86,8 @@ |
87 | 87 | |
88 | 88 | /** |
89 | 89 | * |
90 | | - * @param $server |
91 | | - * @param $dbNameOverride |
| 90 | + * @param $server string |
| 91 | + * @param $dbNameOverride bool |
92 | 92 | * |
93 | 93 | * @return DatabaseBase |
94 | 94 | */ |
Index: trunk/phase3/includes/filerepo/LocalRepo.php |
— | — | @@ -49,13 +49,16 @@ |
50 | 50 | * filearchive table. This needs to be done in the repo because it needs to |
51 | 51 | * interleave database locks with file operations, which is potentially a |
52 | 52 | * remote operation. |
| 53 | + * |
| 54 | + * @param $storageKeys array |
| 55 | + * |
53 | 56 | * @return FileRepoStatus |
54 | 57 | */ |
55 | 58 | function cleanupDeletedBatch( $storageKeys ) { |
56 | 59 | $root = $this->getZonePath( 'deleted' ); |
57 | 60 | $dbw = $this->getMasterDB(); |
58 | 61 | $status = $this->newGood(); |
59 | | - $storageKeys = array_unique($storageKeys); |
| 62 | + $storageKeys = array_unique( $storageKeys ); |
60 | 63 | foreach ( $storageKeys as $key ) { |
61 | 64 | $hashPath = $this->getDeletedHashPath( $key ); |
62 | 65 | $path = "$root/$hashPath$key"; |
Index: trunk/phase3/includes/actions/DeleteAction.php |
— | — | @@ -39,6 +39,8 @@ |
40 | 40 | * check that the page is not too big and has not already been deleted. |
41 | 41 | * @throws ErrorPageError |
42 | 42 | * @see Action::checkCanExecute |
| 43 | + * |
| 44 | + * @param $user User |
43 | 45 | */ |
44 | 46 | protected function checkCanExecute( User $user ){ |
45 | 47 | |
Index: trunk/phase3/includes/api/ApiFormatXml.php |
— | — | @@ -86,6 +86,13 @@ |
87 | 87 | * |
88 | 88 | * If neither key is found, all keys become element names, and values become element content. |
89 | 89 | * The method is recursive, so the same rules apply to any sub-arrays. |
| 90 | + * |
| 91 | + * @param $elemName |
| 92 | + * @param $elemValue |
| 93 | + * @param $indent |
| 94 | + * @param $doublequote bool |
| 95 | + * |
| 96 | + * @return string |
90 | 97 | */ |
91 | 98 | public static function recXmlPrint( $elemName, $elemValue, $indent, $doublequote = false ) { |
92 | 99 | $retval = ''; |
Index: trunk/phase3/includes/api/ApiPageSet.php |
— | — | @@ -59,6 +59,7 @@ |
60 | 60 | * Constructor |
61 | 61 | * @param $query ApiQuery |
62 | 62 | * @param $resolveRedirects bool Whether redirects should be resolved |
| 63 | + * @param $convertTitles bool |
63 | 64 | */ |
64 | 65 | public function __construct( $query, $resolveRedirects = false, $convertTitles = false ) { |
65 | 66 | parent::__construct( $query, 'query' ); |
Index: trunk/phase3/includes/media/BitmapMetadataHandler.php |
— | — | @@ -109,11 +109,11 @@ |
110 | 110 | } |
111 | 111 | |
112 | 112 | /** Main entry point for jpeg's. |
113 | | - * |
114 | | - * @param string $file filename (with full path) |
115 | | - * @return metadata result array. |
116 | | - * @throws MWException on invalid file. |
117 | | - */ |
| 113 | + * |
| 114 | + * @param $filename string filename (with full path) |
| 115 | + * @return metadata result array. |
| 116 | + * @throws MWException on invalid file. |
| 117 | + */ |
118 | 118 | static function Jpeg ( $filename ) { |
119 | 119 | $showXMP = function_exists( 'xml_parser_create_ns' ); |
120 | 120 | $meta = new self(); |
— | — | @@ -143,14 +143,15 @@ |
144 | 144 | } |
145 | 145 | return $meta->getMetadataArray(); |
146 | 146 | } |
| 147 | + |
147 | 148 | /** Entry point for png |
148 | | - * At some point in the future this might |
149 | | - * merge the png various tEXt chunks to that |
150 | | - * are interesting, but for now it only does XMP |
151 | | - * |
152 | | - * @param $filename String full path to file |
153 | | - * @return Array Array for storage in img_metadata. |
154 | | - */ |
| 149 | + * At some point in the future this might |
| 150 | + * merge the png various tEXt chunks to that |
| 151 | + * are interesting, but for now it only does XMP |
| 152 | + * |
| 153 | + * @param $filename String full path to file |
| 154 | + * @return Array Array for storage in img_metadata. |
| 155 | + */ |
155 | 156 | static public function PNG ( $filename ) { |
156 | 157 | $showXMP = function_exists( 'xml_parser_create_ns' ); |
157 | 158 | |
Index: trunk/phase3/includes/cache/LinkBatch.php |
— | — | @@ -59,6 +59,8 @@ |
60 | 60 | /** |
61 | 61 | * Set the link list to a given 2-d array |
62 | 62 | * First key is the namespace, second is the DB key, value arbitrary |
| 63 | + * |
| 64 | + * @param $array array |
63 | 65 | */ |
64 | 66 | public function setArray( $array ) { |
65 | 67 | $this->data = $array; |
— | — | @@ -66,6 +68,8 @@ |
67 | 69 | |
68 | 70 | /** |
69 | 71 | * Returns true if no pages have been added, false otherwise. |
| 72 | + * |
| 73 | + * @return bool |
70 | 74 | */ |
71 | 75 | public function isEmpty() { |
72 | 76 | return ($this->getSize() == 0); |
— | — | @@ -73,6 +77,8 @@ |
74 | 78 | |
75 | 79 | /** |
76 | 80 | * Returns the size of the batch. |
| 81 | + * |
| 82 | + * @return int |
77 | 83 | */ |
78 | 84 | public function getSize() { |
79 | 85 | return count( $this->data ); |
— | — | @@ -82,10 +88,10 @@ |
83 | 89 | * Do the query and add the results to the LinkCache object |
84 | 90 | * Return an array mapping PDBK to ID |
85 | 91 | */ |
86 | | - public function execute() { |
87 | | - $linkCache = LinkCache::singleton(); |
88 | | - return $this->executeInto( $linkCache ); |
89 | | - } |
| 92 | + public function execute() { |
| 93 | + $linkCache = LinkCache::singleton(); |
| 94 | + return $this->executeInto( $linkCache ); |
| 95 | + } |
90 | 96 | |
91 | 97 | /** |
92 | 98 | * Do the query and add the results to a given LinkCache object |
— | — | @@ -105,6 +111,9 @@ |
106 | 112 | * As normal, titles will go into the static Title cache field. |
107 | 113 | * This function *also* stores extra fields of the title used for link |
108 | 114 | * parsing to avoid extra DB queries. |
| 115 | + * |
| 116 | + * @param $cache |
| 117 | + * @param $res |
109 | 118 | */ |
110 | 119 | public function addResultToCache( $cache, $res ) { |
111 | 120 | if ( !$res ) { |
Index: trunk/phase3/includes/job/DoubleRedirectJob.php |
— | — | @@ -23,7 +23,7 @@ |
24 | 24 | * Insert jobs into the job queue to fix redirects to the given title |
25 | 25 | * @param $reason String: the reason for the fix, see message double-redirect-fixed-<reason> |
26 | 26 | * @param $redirTitle Title: the title which has changed, redirects pointing to this title are fixed |
27 | | - * @param $destTitle Not used |
| 27 | + * @param $destTitle bool Not used |
28 | 28 | */ |
29 | 29 | public static function fixRedirects( $reason, $redirTitle, $destTitle = false ) { |
30 | 30 | # Need to use the master to get the redirect table updated in the same transaction |
Index: trunk/phase3/includes/ConfEditor.php |
— | — | @@ -84,6 +84,10 @@ |
85 | 85 | |
86 | 86 | /** |
87 | 87 | * Simple entry point for command-line testing |
| 88 | + * |
| 89 | + * @param $text string |
| 90 | + * |
| 91 | + * @return string |
88 | 92 | */ |
89 | 93 | static function test( $text ) { |
90 | 94 | try { |
Index: trunk/phase3/includes/ExternalStore.php |
— | — | @@ -78,7 +78,10 @@ |
79 | 79 | * Store a data item to an external store, identified by a partial URL |
80 | 80 | * The protocol part is used to identify the class, the rest is passed to the |
81 | 81 | * class itself as a parameter. |
82 | | - * @return string The URL of the stored data item, or false on error |
| 82 | + * @param $url |
| 83 | + * @param $data |
| 84 | + * @param $params array |
| 85 | + * @return string|false The URL of the stored data item, or false on error |
83 | 86 | */ |
84 | 87 | static function insert( $url, $data, $params = array() ) { |
85 | 88 | list( $proto, $params ) = explode( '://', $url, 2 ); |
Index: trunk/phase3/includes/HttpFunctions.php |
— | — | @@ -53,6 +53,8 @@ |
54 | 54 | /** |
55 | 55 | * Simple wrapper for Http::request( 'GET' ) |
56 | 56 | * @see Http::request() |
| 57 | + * |
| 58 | + * @return string |
57 | 59 | */ |
58 | 60 | public static function get( $url, $timeout = 'default', $options = array() ) { |
59 | 61 | $options['timeout'] = $timeout; |
— | — | @@ -62,6 +64,8 @@ |
63 | 65 | /** |
64 | 66 | * Simple wrapper for Http::request( 'POST' ) |
65 | 67 | * @see Http::request() |
| 68 | + * |
| 69 | + * @return string |
66 | 70 | */ |
67 | 71 | public static function post( $url, $options = array() ) { |
68 | 72 | return Http::request( 'POST', $url, $options ); |
Index: trunk/phase3/includes/Block.php |
— | — | @@ -94,7 +94,6 @@ |
95 | 95 | * |
96 | 96 | * @param $address String: IP address of user/anon |
97 | 97 | * @param $user Integer: user id of user |
98 | | - * @param $killExpired Boolean: delete expired blocks on load |
99 | 98 | * @return Block Object |
100 | 99 | * @deprecated since 1.18 |
101 | 100 | */ |
Index: trunk/phase3/includes/Import.php |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | |
41 | 41 | /** |
42 | 42 | * Creates an ImportXMLReader drawing from the source provided |
43 | | - */ |
| 43 | + */ |
44 | 44 | function __construct( $source ) { |
45 | 45 | $this->reader = new XMLReader(); |
46 | 46 | |
Index: trunk/phase3/includes/ImageFunctions.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | * i.e. articles where the image may occur inline. |
17 | 17 | * |
18 | 18 | * @param $name string the image name to check |
19 | | - * @param $contextTitle Title the page on which the image occurs, if known |
| 19 | + * @param $contextTitle Title|bool the page on which the image occurs, if known |
20 | 20 | * @return bool |
21 | 21 | */ |
22 | 22 | function wfIsBadImage( $name, $contextTitle = false ) { |