Merge "MovePage: Fix old, old bug with moving over redirects"
[lhc/web/wiklou.git] / includes / site / SiteList.php
index 6992450..a94aa0b 100644 (file)
@@ -27,7 +27,6 @@
  * @author Jeroen De Dauw < jeroendedauw@gmail.com >
  */
 class SiteList extends GenericArrayObject {
-
        /**
         * Internal site identifiers pointing to their sites offset value.
         *
@@ -35,7 +34,7 @@ class SiteList extends GenericArrayObject {
         *
         * @var array Array of integer
         */
-       protected $byInternalId = array();
+       protected $byInternalId = [];
 
        /**
         * Global site identifiers pointing to their sites offset value.
@@ -44,7 +43,7 @@ class SiteList extends GenericArrayObject {
         *
         * @var array Array of string
         */
-       protected $byGlobalId = array();
+       protected $byGlobalId = [];
 
        /**
         * Navigational site identifiers alias inter-language prefixes
@@ -54,7 +53,7 @@ class SiteList extends GenericArrayObject {
         *
         * @var array Array of string
         */
-       protected $byNavigationId = array();
+       protected $byNavigationId = [];
 
        /**
         * @see GenericArrayObject::getObjectType
@@ -176,7 +175,7 @@ class SiteList extends GenericArrayObject {
         * @return bool
         */
        public function isEmpty() {
-               return $this->byGlobalId === array();
+               return $this->byGlobalId === [];
        }
 
        /**
@@ -278,7 +277,7 @@ class SiteList extends GenericArrayObject {
                $group = new self();
 
                /**
-                * @var \Site $site
+                * @var Site $site
                 */
                foreach ( $this as $site ) {
                        if ( $site->getGroup() === $groupName ) {
@@ -320,15 +319,15 @@ class SiteList extends GenericArrayObject {
         * @return array
         */
        protected function getSerializationData() {
-               //NOTE: When changing the structure, either implement unserialize() to handle the
+               // NOTE: When changing the structure, either implement unserialize() to handle the
                //      old structure too, or update SERIAL_VERSION_ID to kill any caches.
                return array_merge(
                        parent::getSerializationData(),
-                       array(
+                       [
                                'internalIds' => $this->byInternalId,
                                'globalIds' => $this->byGlobalId,
                                'navigationIds' => $this->byNavigationId
-                       )
+                       ]
                );
        }
 
@@ -350,10 +349,4 @@ class SiteList extends GenericArrayObject {
 
                return $serializationData;
        }
-
 }
-
-/**
- * @deprecated
- */
-class SiteArray extends SiteList {}