Index: trunk/phase3/maintenance/tests/phpunit/includes/api/RandomImageGenerator.php |
— | — | @@ -68,10 +68,10 @@ |
69 | 69 | /** |
70 | 70 | * Writes random images with random filenames to disk in the directory you specify, or current working directory |
71 | 71 | * |
72 | | - * @param {Integer} number of filenames to write |
73 | | - * @param {String} format, optional, must be understood by ImageMagick, such as 'jpg' or 'gif' |
74 | | - * @param {String} directory, optional (will default to current working directory) |
75 | | - * @return {Array} filenames we just wrote |
| 72 | + * @param $number Integer: number of filenames to write |
| 73 | + * @param $format String: optional, must be understood by ImageMagick, such as 'jpg' or 'gif' |
| 74 | + * @param $dir String: directory, optional (will default to current working directory) |
| 75 | + * @return Array: filenames we just wrote |
76 | 76 | */ |
77 | 77 | function writeImages( $number, $format = 'jpg', $dir = null ) { |
78 | 78 | $filenames = $this->getRandomFilenames( $number, $format, $dir ); |
— | — | @@ -85,10 +85,10 @@ |
86 | 86 | * Return a number of randomly-generated filenames |
87 | 87 | * Each filename uses two words randomly drawn from the dictionary, like elephantine_spatula.jpg |
88 | 88 | * |
89 | | - * @param {Integer} number of filenames to generate |
90 | | - * @param {String} extension, optional, defaults to 'jpg' |
91 | | - * @param {String} directory, optional, defaults to current working directory |
92 | | - * @return {Array} of filenames |
| 89 | + * @param $number Integer: of filenames to generate |
| 90 | + * @param $extension String: optional, defaults to 'jpg' |
| 91 | + * @param $dir String: optional, defaults to current working directory |
| 92 | + * @return Array: of filenames |
93 | 93 | */ |
94 | 94 | private function getRandomFilenames( $number, $extension = 'jpg', $dir = null ) { |
95 | 95 | if ( is_null( $dir ) ) { |
— | — | @@ -226,8 +226,8 @@ |
227 | 227 | /** |
228 | 228 | * Get an array of random pairs of random words, like array( array( 'foo', 'bar' ), array( 'quux', 'baz' ) ); |
229 | 229 | * |
230 | | - * @param {Integer} number of pairs |
231 | | - * @return {Array} of two-element arrays |
| 230 | + * @param $number Integer: number of pairs |
| 231 | + * @return Array: of two-element arrays |
232 | 232 | */ |
233 | 233 | private function getRandomWordPairs( $number ) { |
234 | 234 | $lines = $this->getRandomLines( $number * 2 ); |
— | — | @@ -246,9 +246,8 @@ |
247 | 247 | * |
248 | 248 | * Will throw exception if the file could not be read or if it had fewer lines than requested. |
249 | 249 | * |
250 | | - * @param {Integer} number of lines desired |
251 | | - * @string {String} path to file |
252 | | - * @return {Array} of exactly n elements, drawn randomly from lines the file |
| 250 | + * @param $number_desired Integer: number of lines desired |
| 251 | + * @return Array: of exactly n elements, drawn randomly from lines the file |
253 | 252 | */ |
254 | 253 | private function getRandomLines( $number_desired ) { |
255 | 254 | $filepath = $this->dictionaryFile; |
Index: trunk/phase3/maintenance/tests/phpunit/includes/api/ApiUploadTest.php |
— | — | @@ -578,7 +578,7 @@ |
579 | 579 | |
580 | 580 | /** |
581 | 581 | * Helper function -- remove files and associated articles by Title |
582 | | - * @param {Title} title to be removed |
| 582 | + * @param $title Title: title to be removed |
583 | 583 | */ |
584 | 584 | public function deleteFileByTitle( $title ) { |
585 | 585 | if ( $title->exists() ) { |
— | — | @@ -601,7 +601,7 @@ |
602 | 602 | |
603 | 603 | /** |
604 | 604 | * Helper function -- remove files and associated articles with a particular filename |
605 | | - * @param {String} filename to be removed |
| 605 | + * @param $fileName String: filename to be removed |
606 | 606 | */ |
607 | 607 | public function deleteFileByFileName( $fileName ) { |
608 | 608 | return $this->deleteFileByTitle( Title::newFromText( $fileName, NS_FILE ) ); |
— | — | @@ -610,7 +610,7 @@ |
611 | 611 | |
612 | 612 | /** |
613 | 613 | * Helper function -- given a file on the filesystem, find matching content in the db (and associated articles) and remove them. |
614 | | - * @param {String} path to file on the filesystem |
| 614 | + * @param $filePath String: path to file on the filesystem |
615 | 615 | */ |
616 | 616 | public function deleteFileByContent( $filePath ) { |
617 | 617 | $hash = File::sha1Base36( $filePath ); |
— | — | @@ -625,10 +625,10 @@ |
626 | 626 | /** |
627 | 627 | * Fake an upload by dumping the file into temp space, and adding info to $_FILES. |
628 | 628 | * (This is what PHP would normally do). |
629 | | - * @param {String}: fieldname - name this would have in the upload form |
630 | | - * @param {String}: fileName - name to title this |
631 | | - * @param {String}: mime type |
632 | | - * @param {String}: filePath - path where to find file contents |
| 629 | + * @param $fieldName String: name this would have in the upload form |
| 630 | + * @param $fileName String: name to title this |
| 631 | + * @param $type String: mime type |
| 632 | + * @param $filePath String: path where to find file contents |
633 | 633 | */ |
634 | 634 | function fakeUploadFile( $fieldName, $fileName, $type, $filePath ) { |
635 | 635 | $tmpName = tempnam( wfTempDir(), "" ); |
Index: trunk/phase3/includes/upload/UploadBase.php |
— | — | @@ -627,8 +627,8 @@ |
628 | 628 | * This method returns the file object, which also has a 'sessionKey' property which can be passed through a form or |
629 | 629 | * API request to find this stashed file again. |
630 | 630 | * |
631 | | - * @param {String}: $key (optional) the session key used to find the file info again. If not supplied, a key will be autogenerated. |
632 | | - * @return {File}: stashed file |
| 631 | + * @param $key String: (optional) the session key used to find the file info again. If not supplied, a key will be autogenerated. |
| 632 | + * @return File: stashed file |
633 | 633 | */ |
634 | 634 | public function stashSessionFile( $key = null ) { |
635 | 635 | $stash = new UploadStash(); |
— | — | @@ -644,8 +644,8 @@ |
645 | 645 | /** |
646 | 646 | * Stash a file in a temporary directory, returning a key which can be used to find the file again. See stashSessionFile(). |
647 | 647 | * |
648 | | - * @param {String}: $key (optional) the session key used to find the file info again. If not supplied, a key will be autogenerated. |
649 | | - * @return {String}: session key |
| 648 | + * @param $key String: (optional) the session key used to find the file info again. If not supplied, a key will be autogenerated. |
| 649 | + * @return String: session key |
650 | 650 | */ |
651 | 651 | public function stashSession( $key = null ) { |
652 | 652 | return $this->stashSessionFile( $key )->getSessionKey(); |
— | — | @@ -1202,8 +1202,8 @@ |
1203 | 1203 | * 'metadata' was requested. Oddly, we have to pass the "result" object down just so it can do that |
1204 | 1204 | * with the appropriate format, presumably. |
1205 | 1205 | * |
1206 | | - * @param {ApiResult} |
1207 | | - * @return {Array} image info |
| 1206 | + * @param $result ApiResult: |
| 1207 | + * @return Array: image info |
1208 | 1208 | */ |
1209 | 1209 | public function getImageInfo( $result ) { |
1210 | 1210 | $file = $this->getLocalFile(); |
Index: trunk/phase3/includes/api/ApiQueryImageInfo.php |
— | — | @@ -180,8 +180,8 @@ |
181 | 181 | |
182 | 182 | /** |
183 | 183 | * From parameters, construct a 'scale' array |
184 | | - * @param {Array} $params |
185 | | - * @return {null|Array} key-val array of 'width' and 'height', or null |
| 184 | + * @param $params Array: |
| 185 | + * @return Array or Null: key-val array of 'width' and 'height', or null |
186 | 186 | */ |
187 | 187 | public function getScale( $params ) { |
188 | 188 | $p = $this->getModulePrefix(); |