Fix spelling of word "necessary"
[lhc/web/wiklou.git] / includes / upload / UploadStash.php
index ce087bf..8ddbd04 100644 (file)
@@ -18,7 +18,6 @@
  * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
- * @ingroup Upload
  */
 
 /**
@@ -53,7 +52,7 @@
  */
 class UploadStash {
        // Format of the key for files -- has to be suitable as a filename itself (e.g. ab12cd34ef.jpg)
-       const KEY_FORMAT_REGEX = '/^[\w-\.]+\.\w*$/';
+       const KEY_FORMAT_REGEX = '/^[\w\-\.]+\.\w*$/';
        const MAX_US_PROPS_SIZE = 65535;
 
        /**
@@ -82,7 +81,7 @@ class UploadStash {
         * (should replace it eventually).
         *
         * @param FileRepo $repo
-        * @param User $user (default null)
+        * @param User|null $user
         */
        public function __construct( FileRepo $repo, $user = null ) {
                // this might change based on wiki's configuration.
@@ -203,7 +202,7 @@ class UploadStash {
         * database, along with other metadata.
         *
         * @param string $path Path to file you want stashed
-        * @param string $sourceType The type of upload that generated this file
+        * @param string|null $sourceType The type of upload that generated this file
         *   (currently, I believe, 'file' or null)
         * @throws UploadStashBadPathException
         * @throws UploadStashFileException
@@ -326,7 +325,7 @@ class UploadStash {
                );
 
                // store the insertid in the class variable so immediate retrieval
-               // (possibly laggy) isn't necesary.
+               // (possibly laggy) isn't necessary.
                $this->fileMetadata[$key]['us_id'] = $dbw->insertId();
 
                # create the UploadStashFile object for this file.
@@ -576,6 +575,9 @@ class UploadStash {
        }
 }
 
+/**
+ * @ingroup Upload
+ */
 class UploadStashFile extends UnregisteredLocalFile {
        private $fileKey;
        private $urlName;
@@ -765,6 +767,9 @@ class UploadStashFile extends UnregisteredLocalFile {
        }
 }
 
+/**
+ * @ingroup Upload
+ */
 class UploadStashException extends MWException implements ILocalizedException {
        /** @var string|array|MessageSpecifier */
        protected $messageSpec;
@@ -772,7 +777,8 @@ class UploadStashException extends MWException implements ILocalizedException {
        /**
         * @param string|array|MessageSpecifier $messageSpec See Message::newFromSpecifier
         * @param int $code Exception code
-        * @param Exception|Throwable $previous The previous exception used for the exception chaining.
+        * @param Exception|Throwable|null $previous The previous exception used for the exception
+        *  chaining.
         */
        public function __construct( $messageSpec, $code = 0, $previous = null ) {
                $this->messageSpec = $messageSpec;
@@ -788,23 +794,44 @@ class UploadStashException extends MWException implements ILocalizedException {
        }
 }
 
+/**
+ * @ingroup Upload
+ */
 class UploadStashFileNotFoundException extends UploadStashException {
 }
 
+/**
+ * @ingroup Upload
+ */
 class UploadStashBadPathException extends UploadStashException {
 }
 
+/**
+ * @ingroup Upload
+ */
 class UploadStashFileException extends UploadStashException {
 }
 
+/**
+ * @ingroup Upload
+ */
 class UploadStashZeroLengthFileException extends UploadStashException {
 }
 
+/**
+ * @ingroup Upload
+ */
 class UploadStashNotLoggedInException extends UploadStashException {
 }
 
+/**
+ * @ingroup Upload
+ */
 class UploadStashWrongOwnerException extends UploadStashException {
 }
 
+/**
+ * @ingroup Upload
+ */
 class UploadStashNoSuchKeyException extends UploadStashException {
 }