Fixup some trailing newlines
authorSam Reed <reedy@users.mediawiki.org>
Wed, 2 Feb 2011 10:42:17 +0000 (10:42 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Wed, 2 Feb 2011 10:42:17 +0000 (10:42 +0000)
Fixup indentation of a few methods

Add a couple of return type hints

includes/filerepo/File.php
includes/upload/UploadBase.php
includes/upload/UploadFromStash.php
includes/upload/UploadFromUrl.php
includes/upload/UploadStash.php

index bbcb4f9..f5ba3a4 100644 (file)
@@ -157,6 +157,7 @@ abstract class File {
 
        /**
         * Return the associated title object
+        * @return Title
         */
        public function getTitle() { return $this->title; }
        
@@ -269,14 +270,14 @@ abstract class File {
        /**
          *  Return true if the file is vectorized
          */
-        public function isVectorized() {
-                $handler = $this->getHandler();
-                if ( $handler ) {
-                        return $handler->isVectorized( $this );
-                } else {
-                        return false;
-                }
-        }
+       public function isVectorized() {
+               $handler = $this->getHandler();
+               if ( $handler ) {
+                       return $handler->isVectorized( $this );
+               } else {
+                       return false;
+               }
+       }
 
 
        /**
index 29fe73b..ea065a7 100644 (file)
@@ -1102,7 +1102,7 @@ abstract class UploadBase {
         * - File exists with normalized extension
         * - The file looks like a thumbnail and the original exists
         *
-        * @param $file The File object to check
+        * @param $file File The File object to check
         * @return mixed False if the file does not exists, else an array
         */
        public static function getExistsWarning( $file ) {
index 7f0f92e..804db6b 100644 (file)
@@ -25,24 +25,24 @@ class UploadFromStash extends UploadBase {
        }
 
        public function initialize( $name, $sessionKey, $sessionData ) {
-                       /**
-                        * Confirming a temporarily stashed upload.
-                        * We don't want path names to be forged, so we keep
-                        * them in the session on the server and just give
-                        * an opaque key to the user agent.
-                        */
+               /**
+                * Confirming a temporarily stashed upload.
+                * We don't want path names to be forged, so we keep
+                * them in the session on the server and just give
+                * an opaque key to the user agent.
+                */
 
-                       $this->initializePathInfo( $name,
-                               $this->getRealPath ( $sessionData['mTempPath'] ),
-                               $sessionData['mFileSize'],
-                               false
-                       );
-                       
-                       $this->mSessionKey = $sessionKey;
-                       $this->mVirtualTempPath = $sessionData['mTempPath'];
-                       $this->mFileProps = $sessionData['mFileProps'];
-                       $this->mSourceType = isset( $sessionData['mSourceType'] ) ?
-                               $sessionData['mSourceType'] : null;
+               $this->initializePathInfo( $name,
+                       $this->getRealPath ( $sessionData['mTempPath'] ),
+                       $sessionData['mFileSize'],
+                       false
+               );
+
+               $this->mSessionKey = $sessionKey;
+               $this->mVirtualTempPath = $sessionData['mTempPath'];
+               $this->mFileProps = $sessionData['mFileProps'];
+               $this->mSourceType = isset( $sessionData['mSourceType'] ) ?
+                       $sessionData['mSourceType'] : null;
        }
 
        public function initializeFromRequest( &$request ) {
index 8e4ffbf..7acb051 100644 (file)
@@ -187,7 +187,13 @@ class UploadFromUrl extends UploadBase {
                return parent::performUpload( $comment, $pageText, $watch, $user );
        }
 
-
+       /**
+        * @param  $comment
+        * @param  $pageText
+        * @param  $watch
+        * @param  $user User
+        * @return
+        */
        protected function insertJob( $comment, $pageText, $watch, $user ) {
                $sessionKey = $this->stashSession();
                $job = new UploadFromUrlJob( $this->getTitle(), array(
index 27e0ec1..ece13ea 100644 (file)
@@ -186,14 +186,12 @@ class UploadStash {
                return true;
        }
 
-
        /**
         * List all files in the stash.
         */
        public function listFiles() {
                return array_keys( $_SESSION[UploadBase::SESSION_KEYNAME] );
        }
-       
 
        /**
         * Find or guess extension -- ensuring that our extension matches our mime type.
@@ -269,8 +267,6 @@ class UploadStashFile extends UnregisteredLocalFile {
                        throw new UploadStashFileNotFoundException( 'cannot find path, or not a plain file' );
                }
 
-                       
-
                parent::__construct( false, $repo, $path, false );
 
                $this->name = basename( $this->path );
@@ -346,7 +342,6 @@ class UploadStashFile extends UnregisteredLocalFile {
                return SpecialPage::getTitleFor( 'UploadStash', $subPage )->getLocalURL();
        }
 
-
        /** 
         * Get a URL to access the thumbnail 
         * This is required because the model of how files work requires that 
@@ -397,7 +392,6 @@ class UploadStashFile extends UnregisteredLocalFile {
                return $this->getUrl();
        }
 
-
        /**
         * Getter for session key (the session-unique id by which this file's location & metadata is stored in the session)
         *