http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89104

Revision: 89104
Author:   reedy
Date:     2011-05-29 14:24:27 +0000 (Sun, 29 May 2011)
Log Message:
-----------
Even more documentation in various files

Modified Paths:
--------------
    trunk/phase3/includes/Block.php
    trunk/phase3/includes/ConfEditor.php
    trunk/phase3/includes/ExternalStore.php
    trunk/phase3/includes/GlobalFunctions.php
    trunk/phase3/includes/HttpFunctions.php
    trunk/phase3/includes/ImageFunctions.php
    trunk/phase3/includes/Import.php
    trunk/phase3/includes/actions/DeleteAction.php
    trunk/phase3/includes/api/ApiFormatXml.php
    trunk/phase3/includes/api/ApiPageSet.php
    trunk/phase3/includes/cache/LinkBatch.php
    trunk/phase3/includes/db/LBFactory_Single.php
    trunk/phase3/includes/filerepo/LocalRepo.php
    trunk/phase3/includes/job/DoubleRedirectJob.php
    trunk/phase3/includes/media/BitmapMetadataHandler.php
    trunk/phase3/includes/objectcache/DBABagOStuff.php

Modified: trunk/phase3/includes/Block.php
===================================================================
--- trunk/phase3/includes/Block.php     2011-05-29 14:01:47 UTC (rev 89103)
+++ trunk/phase3/includes/Block.php     2011-05-29 14:24:27 UTC (rev 89104)
@@ -94,7 +94,6 @@
         *
         * @param $address String: IP address of user/anon
         * @param $user Integer: user id of user
-        * @param $killExpired Boolean: delete expired blocks on load
         * @return Block Object
         * @deprecated since 1.18
         */

Modified: trunk/phase3/includes/ConfEditor.php
===================================================================
--- trunk/phase3/includes/ConfEditor.php        2011-05-29 14:01:47 UTC (rev 
89103)
+++ trunk/phase3/includes/ConfEditor.php        2011-05-29 14:24:27 UTC (rev 
89104)
@@ -84,6 +84,10 @@
 
        /**
         * Simple entry point for command-line testing
+        *
+        * @param $text string
+        *
+        * @return string
         */
        static function test( $text ) {
                try {

Modified: trunk/phase3/includes/ExternalStore.php
===================================================================
--- trunk/phase3/includes/ExternalStore.php     2011-05-29 14:01:47 UTC (rev 
89103)
+++ trunk/phase3/includes/ExternalStore.php     2011-05-29 14:24:27 UTC (rev 
89104)
@@ -78,7 +78,10 @@
         * Store a data item to an external store, identified by a partial URL
         * The protocol part is used to identify the class, the rest is passed 
to the
         * class itself as a parameter.
-        * @return string The URL of the stored data item, or false on error
+        * @param $url
+        * @param $data
+        * @param $params array
+        * @return string|false The URL of the stored data item, or false on 
error
         */
        static function insert( $url, $data, $params = array() ) {
                list( $proto, $params ) = explode( '://', $url, 2 );

Modified: trunk/phase3/includes/GlobalFunctions.php
===================================================================
--- trunk/phase3/includes/GlobalFunctions.php   2011-05-29 14:01:47 UTC (rev 
89103)
+++ trunk/phase3/includes/GlobalFunctions.php   2011-05-29 14:24:27 UTC (rev 
89104)
@@ -86,6 +86,11 @@
        return array_udiff( $a, $b, 'wfArrayDiff2_cmp' );
 }
 
+/**
+ * @param $a
+ * @param $b
+ * @return int
+ */
 function wfArrayDiff2_cmp( $a, $b ) {
        if ( !is_array( $a ) ) {
                return strcmp( $a, $b );

Modified: trunk/phase3/includes/HttpFunctions.php
===================================================================
--- trunk/phase3/includes/HttpFunctions.php     2011-05-29 14:01:47 UTC (rev 
89103)
+++ trunk/phase3/includes/HttpFunctions.php     2011-05-29 14:24:27 UTC (rev 
89104)
@@ -53,6 +53,8 @@
        /**
         * Simple wrapper for Http::request( 'GET' )
         * @see Http::request()
+        *
+        * @return string
         */
        public static function get( $url, $timeout = 'default', $options = 
array() ) {
                $options['timeout'] = $timeout;
@@ -62,6 +64,8 @@
        /**
         * Simple wrapper for Http::request( 'POST' )
         * @see Http::request()
+        *
+        * @return string
         */
        public static function post( $url, $options = array() ) {
                return Http::request( 'POST', $url, $options );

Modified: trunk/phase3/includes/ImageFunctions.php
===================================================================
--- trunk/phase3/includes/ImageFunctions.php    2011-05-29 14:01:47 UTC (rev 
89103)
+++ trunk/phase3/includes/ImageFunctions.php    2011-05-29 14:24:27 UTC (rev 
89104)
@@ -15,7 +15,7 @@
  *      i.e. articles where the image may occur inline.
  *
  * @param $name string the image name to check
- * @param $contextTitle Title the page on which the image occurs, if known
+ * @param $contextTitle Title|bool the page on which the image occurs, if known
  * @return bool
  */
 function wfIsBadImage( $name, $contextTitle = false ) {

Modified: trunk/phase3/includes/Import.php
===================================================================
--- trunk/phase3/includes/Import.php    2011-05-29 14:01:47 UTC (rev 89103)
+++ trunk/phase3/includes/Import.php    2011-05-29 14:24:27 UTC (rev 89104)
@@ -39,7 +39,7 @@
 
        /**
         * Creates an ImportXMLReader drawing from the source provided
-       */
+        */
        function __construct( $source ) {
                $this->reader = new XMLReader();
 

Modified: trunk/phase3/includes/actions/DeleteAction.php
===================================================================
--- trunk/phase3/includes/actions/DeleteAction.php      2011-05-29 14:01:47 UTC 
(rev 89103)
+++ trunk/phase3/includes/actions/DeleteAction.php      2011-05-29 14:24:27 UTC 
(rev 89104)
@@ -39,6 +39,8 @@
         * check that the page is not too big and has not already been deleted.
         * @throws ErrorPageError
         * @see Action::checkCanExecute
+        *
+        * @param $user User
         */
        protected function checkCanExecute( User $user ){
 

Modified: trunk/phase3/includes/api/ApiFormatXml.php
===================================================================
--- trunk/phase3/includes/api/ApiFormatXml.php  2011-05-29 14:01:47 UTC (rev 
89103)
+++ trunk/phase3/includes/api/ApiFormatXml.php  2011-05-29 14:24:27 UTC (rev 
89104)
@@ -86,6 +86,13 @@
         *
         * If neither key is found, all keys become element names, and values 
become element content.
         * The method is recursive, so the same rules apply to any sub-arrays.
+        * 
+        * @param $elemName
+        * @param $elemValue
+        * @param $indent
+        * @param $doublequote bool
+        *
+        * @return string
         */
        public static function recXmlPrint( $elemName, $elemValue, $indent, 
$doublequote = false ) {
                $retval = '';

Modified: trunk/phase3/includes/api/ApiPageSet.php
===================================================================
--- trunk/phase3/includes/api/ApiPageSet.php    2011-05-29 14:01:47 UTC (rev 
89103)
+++ trunk/phase3/includes/api/ApiPageSet.php    2011-05-29 14:24:27 UTC (rev 
89104)
@@ -59,6 +59,7 @@
         * Constructor
         * @param $query ApiQuery
         * @param $resolveRedirects bool Whether redirects should be resolved
+        * @param $convertTitles bool
         */
        public function __construct( $query, $resolveRedirects = false, 
$convertTitles = false ) {
                parent::__construct( $query, 'query' );

Modified: trunk/phase3/includes/cache/LinkBatch.php
===================================================================
--- trunk/phase3/includes/cache/LinkBatch.php   2011-05-29 14:01:47 UTC (rev 
89103)
+++ trunk/phase3/includes/cache/LinkBatch.php   2011-05-29 14:24:27 UTC (rev 
89104)
@@ -59,6 +59,8 @@
        /**
         * Set the link list to a given 2-d array
         * First key is the namespace, second is the DB key, value arbitrary
+        *
+        * @param $array array
         */
        public function setArray( $array ) {
                $this->data = $array;
@@ -66,6 +68,8 @@
 
        /**
         * Returns true if no pages have been added, false otherwise.
+        *
+        * @return bool
         */
        public function isEmpty() {
                return ($this->getSize() == 0);
@@ -73,6 +77,8 @@
 
        /**
         * Returns the size of the batch.
+        *
+        * @return int
         */
        public function getSize() {
                return count( $this->data );
@@ -82,10 +88,10 @@
         * Do the query and add the results to the LinkCache object
         * Return an array mapping PDBK to ID
         */
-        public function execute() {
-               $linkCache = LinkCache::singleton();
-               return $this->executeInto( $linkCache );
-        }
+       public function execute() {
+               $linkCache = LinkCache::singleton();
+               return $this->executeInto( $linkCache );
+       }
 
        /**
         * Do the query and add the results to a given LinkCache object
@@ -105,6 +111,9 @@
         * As normal, titles will go into the static Title cache field.
         * This function *also* stores extra fields of the title used for link
         * parsing to avoid extra DB queries.
+        *
+        * @param $cache
+        * @param $res
         */
        public function addResultToCache( $cache, $res ) {
                if ( !$res ) {

Modified: trunk/phase3/includes/db/LBFactory_Single.php
===================================================================
--- trunk/phase3/includes/db/LBFactory_Single.php       2011-05-29 14:01:47 UTC 
(rev 89103)
+++ trunk/phase3/includes/db/LBFactory_Single.php       2011-05-29 14:24:27 UTC 
(rev 89104)
@@ -86,8 +86,8 @@
 
        /**
         *
-        * @param $server
-        * @param $dbNameOverride
+        * @param $server string
+        * @param $dbNameOverride bool
         *
         * @return DatabaseBase
         */

Modified: trunk/phase3/includes/filerepo/LocalRepo.php
===================================================================
--- trunk/phase3/includes/filerepo/LocalRepo.php        2011-05-29 14:01:47 UTC 
(rev 89103)
+++ trunk/phase3/includes/filerepo/LocalRepo.php        2011-05-29 14:24:27 UTC 
(rev 89104)
@@ -49,13 +49,16 @@
         * filearchive table. This needs to be done in the repo because it 
needs to
         * interleave database locks with file operations, which is potentially 
a
         * remote operation.
+        *
+        * @param $storageKeys array
+        *
         * @return FileRepoStatus
         */
        function cleanupDeletedBatch( $storageKeys ) {
                $root = $this->getZonePath( 'deleted' );
                $dbw = $this->getMasterDB();
                $status = $this->newGood();
-               $storageKeys = array_unique($storageKeys);
+               $storageKeys = array_unique( $storageKeys );
                foreach ( $storageKeys as $key ) {
                        $hashPath = $this->getDeletedHashPath( $key );
                        $path = "$root/$hashPath$key";

Modified: trunk/phase3/includes/job/DoubleRedirectJob.php
===================================================================
--- trunk/phase3/includes/job/DoubleRedirectJob.php     2011-05-29 14:01:47 UTC 
(rev 89103)
+++ trunk/phase3/includes/job/DoubleRedirectJob.php     2011-05-29 14:24:27 UTC 
(rev 89104)
@@ -23,7 +23,7 @@
         * Insert jobs into the job queue to fix redirects to the given title
         * @param $reason String: the reason for the fix, see message 
double-redirect-fixed-<reason>
         * @param $redirTitle Title: the title which has changed, redirects 
pointing to this title are fixed
-        * @param $destTitle Not used
+        * @param $destTitle bool Not used
         */
        public static function fixRedirects( $reason, $redirTitle, $destTitle = 
false ) {
                # Need to use the master to get the redirect table updated in 
the same transaction

Modified: trunk/phase3/includes/media/BitmapMetadataHandler.php
===================================================================
--- trunk/phase3/includes/media/BitmapMetadataHandler.php       2011-05-29 
14:01:47 UTC (rev 89103)
+++ trunk/phase3/includes/media/BitmapMetadataHandler.php       2011-05-29 
14:24:27 UTC (rev 89104)
@@ -109,11 +109,11 @@
        }
 
        /** Main entry point for jpeg's.
-       *
-       * @param string $file filename (with full path)
-       * @return metadata result array.
-       * @throws MWException on invalid file.
-       */
+        *
+        * @param $filename string filename (with full path)
+        * @return metadata result array.
+        * @throws MWException on invalid file.
+        */
        static function Jpeg ( $filename ) {
                $showXMP = function_exists( 'xml_parser_create_ns' );
                $meta = new self();
@@ -143,14 +143,15 @@
                }
                return $meta->getMetadataArray();
        }
+
        /** Entry point for png
-       * At some point in the future this might
-       * merge the png various tEXt chunks to that
-       * are interesting, but for now it only does XMP
-       *
-       * @param $filename String full path to file
-       * @return Array Array for storage in img_metadata.
-       */
+        * At some point in the future this might
+        * merge the png various tEXt chunks to that
+        * are interesting, but for now it only does XMP
+        *
+        * @param $filename String full path to file
+        * @return Array Array for storage in img_metadata.
+        */
        static public function PNG ( $filename ) {
                $showXMP = function_exists( 'xml_parser_create_ns' );
 

Modified: trunk/phase3/includes/objectcache/DBABagOStuff.php
===================================================================
--- trunk/phase3/includes/objectcache/DBABagOStuff.php  2011-05-29 14:01:47 UTC 
(rev 89103)
+++ trunk/phase3/includes/objectcache/DBABagOStuff.php  2011-05-29 14:24:27 UTC 
(rev 89104)
@@ -27,6 +27,8 @@
 
        /**
         * Encode value and expiry for storage
+        * @param $value
+        * @param $expiry
         *
         * @return string
         */


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to