Merge "Add config for serving main Page from the domain root"
[lhc/web/wiklou.git] / includes / resourceloader / DerivativeResourceLoaderContext.php
index cf0b3c2..0a1d5f7 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 /**
- * Derivative context for ResourceLoader modules.
- *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  */
 
 /**
+ * A mutable version of ResourceLoaderContext.
+ *
  * Allows changing specific properties of a context object,
- * without changing the main one. Inspired by DerivativeContext.
+ * without changing the main one. Inspired by MediaWiki's DerivativeContext.
  *
+ * @ingroup ResourceLoader
  * @since 1.24
  */
 class DerivativeResourceLoaderContext extends ResourceLoaderContext {
@@ -35,6 +36,7 @@ class DerivativeResourceLoaderContext extends ResourceLoaderContext {
         */
        private $context;
 
+       /** @var int|array */
        protected $modules = self::INHERIT_VALUE;
        protected $language = self::INHERIT_VALUE;
        protected $direction = self::INHERIT_VALUE;
@@ -54,7 +56,7 @@ class DerivativeResourceLoaderContext extends ResourceLoaderContext {
                if ( $this->modules === self::INHERIT_VALUE ) {
                        return $this->context->getModules();
                }
-               // @phan-suppress-next-line PhanTypeMismatchReturn
+
                return $this->modules;
        }