Merge "RCFilters: make isStructuredFilterUiEnabled public"
[lhc/web/wiklou.git] / includes / user / CentralIdLookup.php
index 4b833ba..2ced6e2 100644 (file)
@@ -31,8 +31,8 @@ abstract class CentralIdLookup implements IDBAccessObject {
        const AUDIENCE_PUBLIC = 1;
        const AUDIENCE_RAW = 2;
 
-       /** @var CentralIdLookup[][] */
-       private static $instances = array();
+       /** @var CentralIdLookup[] */
+       private static $instances = [];
 
        /** @var string */
        private $providerId;
@@ -71,7 +71,7 @@ abstract class CentralIdLookup implements IDBAccessObject {
                if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
                        throw new MWException( __METHOD__ . ' may only be called from unit tests!' );
                }
-               self::$instances = array();
+               self::$instances = [];
        }
 
        final public function getProviderId() {
@@ -153,7 +153,7 @@ abstract class CentralIdLookup implements IDBAccessObject {
        public function nameFromCentralId(
                $id, $audience = self::AUDIENCE_PUBLIC, $flags = self::READ_NORMAL
        ) {
-               $idToName = $this->lookupCentralIds( array( $id => null ), $audience, $flags );
+               $idToName = $this->lookupCentralIds( [ $id => null ], $audience, $flags );
                return $idToName[$id];
        }
 
@@ -170,7 +170,7 @@ abstract class CentralIdLookup implements IDBAccessObject {
        public function centralIdFromName(
                $name, $audience = self::AUDIENCE_PUBLIC, $flags = self::READ_NORMAL
        ) {
-               $nameToId = $this->lookupUserNames( array( $name => 0 ), $audience, $flags );
+               $nameToId = $this->lookupUserNames( [ $name => 0 ], $audience, $flags );
                return $nameToId[$name];
        }