Merge "Cleanup execution flow through SpecialSearch::execute()"
[lhc/web/wiklou.git] / includes / site / Site.php
index c0246bc..6a97a50 100644 (file)
@@ -91,21 +91,21 @@ class Site implements Serializable {
         *
         * @var array[]
         */
-       protected $localIds = array();
+       protected $localIds = [];
 
        /**
         * @since 1.21
         *
         * @var array
         */
-       protected $extraData = array();
+       protected $extraData = [];
 
        /**
         * @since 1.21
         *
         * @var array
         */
-       protected $extraConfig = array();
+       protected $extraConfig = [];
 
        /**
         * @since 1.21
@@ -499,11 +499,11 @@ class Site implements Serializable {
         */
        public function addLocalId( $type, $identifier ) {
                if ( $this->localIds === false ) {
-                       $this->localIds = array();
+                       $this->localIds = [];
                }
 
                if ( !array_key_exists( $type, $this->localIds ) ) {
-                       $this->localIds[$type] = array();
+                       $this->localIds[$type] = [];
                }
 
                if ( !in_array( $identifier, $this->localIds[$type] ) ) {
@@ -543,7 +543,7 @@ class Site implements Serializable {
        public function getInterwikiIds() {
                return array_key_exists( self::ID_INTERWIKI, $this->localIds )
                        ? $this->localIds[self::ID_INTERWIKI]
-                       : array();
+                       : [];
        }
 
        /**
@@ -557,7 +557,7 @@ class Site implements Serializable {
        public function getNavigationIds() {
                return array_key_exists( self::ID_EQUIVALENT, $this->localIds )
                        ? $this->localIds[self::ID_EQUIVALENT] :
-                       array();
+                       [];
        }
 
        /**
@@ -588,7 +588,7 @@ class Site implements Serializable {
                }
 
                if ( !array_key_exists( 'paths', $this->extraData ) ) {
-                       $this->extraData['paths'] = array();
+                       $this->extraData['paths'] = [];
                }
 
                $this->extraData['paths'][$pathType] = $fullUrl;
@@ -617,7 +617,7 @@ class Site implements Serializable {
         * @return string[]
         */
        public function getAllPaths() {
-               return array_key_exists( 'paths', $this->extraData ) ? $this->extraData['paths'] : array();
+               return array_key_exists( 'paths', $this->extraData ) ? $this->extraData['paths'] : [];
        }
 
        /**
@@ -658,7 +658,7 @@ class Site implements Serializable {
         * @return string
         */
        public function serialize() {
-               $fields = array(
+               $fields = [
                        'globalid' => $this->globalId,
                        'type' => $this->type,
                        'group' => $this->group,
@@ -670,7 +670,7 @@ class Site implements Serializable {
                        'forward' => $this->forward,
                        'internalid' => $this->internalId,
 
-               );
+               ];
 
                return serialize( $fields );
        }