Convert all array() syntax to []
[lhc/web/wiklou.git] / includes / user / CentralIdLookup.php
index 4b833ba..f67a8d8 100644 (file)
@@ -32,7 +32,7 @@ abstract class CentralIdLookup implements IDBAccessObject {
        const AUDIENCE_RAW = 2;
 
        /** @var CentralIdLookup[][] */
-       private static $instances = array();
+       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];
        }