Improve/add to documentation
authorSam Reed <reedy@users.mediawiki.org>
Sat, 24 Dec 2011 23:11:25 +0000 (23:11 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sat, 24 Dec 2011 23:11:25 +0000 (23:11 +0000)
Add braces

Explicitly define member variable

includes/SpecialPage.php
includes/specials/SpecialContributions.php
includes/specials/SpecialUserlogin.php
includes/upload/UploadFromUrl.php

index c859f00..17a36ec 100644 (file)
@@ -672,7 +672,7 @@ class SpecialPage {
        /**
         * Gets the context this SpecialPage is executed in
         *
-        * @return IContextSource
+        * @return IContextSource|RequestContext
         * @since 1.18
         */
        public function getContext() {
index 6d6714b..6ed4b20 100644 (file)
@@ -268,6 +268,7 @@ class SpecialContributions extends SpecialPage {
         * @param $talkpage Title: Talk page
         * @param $target User: Target user object
         * @param $subject User: The viewing user ($wgUser might be still checked in some cases)
+        * @return array
         */
        public static function getUserLinks( Title $userpage, Title $talkpage, User $target, User $subject ) {
 
@@ -716,10 +717,16 @@ class ContribsPager extends ReverseChronologicalPager {
                return $revLens;
        }
 
+       /**
+        * @return string
+        */
        function getStartBody() {
                return "<ul>\n";
        }
 
+       /**
+        * @return string
+        */
        function getEndBody() {
                return "</ul>\n";
        }
index 83ab234..4882058 100644 (file)
@@ -1072,8 +1072,9 @@ class LoginForm extends SpecialPage {
                # Prepare language selection links as needed
                if( $wgLoginLanguageSelector ) {
                        $template->set( 'languages', $this->makeLanguageSelector() );
-                       if( $this->mLanguage )
+                       if( $this->mLanguage ) {
                                $template->set( 'uselang', $this->mLanguage );
+                       }
                }
 
                // Use loginend-https for HTTPS requests if it's not blank, loginend otherwise
index a7aa30b..747b842 100644 (file)
@@ -7,12 +7,11 @@
  * @author Bryan Tong Minh
  * @author Michael Dale
  */
-
 class UploadFromUrl extends UploadBase {
        protected $mAsync, $mUrl;
        protected $mIgnoreWarnings = true;
 
-       protected $mTempPath;
+       protected $mTempPath, $mTmpHandle;
 
        /**
         * Checks if the user is allowed to use the upload-by-URL feature. If the
@@ -78,6 +77,7 @@ class UploadFromUrl extends UploadBase {
 
        /**
         * @param $request WebRequest object
+        * @return bool
         */
        public static function isValidRequest( $request ) {
                global $wgUser;
@@ -88,8 +88,14 @@ class UploadFromUrl extends UploadBase {
                        && $wgUser->isAllowed( 'upload_by_url' );
        }
 
+       /**
+        * @return string
+        */
        public function getSourceType() { return 'url'; }
 
+       /**
+        * @return Status
+        */
        public function fetchFile() {
                if ( !Http::isValidURI( $this->mUrl ) ) {
                        return Status::newFatal( 'http-invalid-url' );
@@ -133,6 +139,7 @@ class UploadFromUrl extends UploadBase {
        /**
         * Download the file, save it to the temporary file and update the file
         * size and set $mRemoveTempFile to true.
+        * @return Status
         */
        protected function reallyFetchFile() {
                if ( $this->mTempPath === false ) {