Convert all array() syntax to []
[lhc/web/wiklou.git] / includes / password / PasswordPolicyChecks.php
index b1098f5..7ea87c3 100644 (file)
@@ -98,10 +98,10 @@ class PasswordPolicyChecks {
         * @return Status error if username and password match, and policy is true
         */
        public static function checkPasswordCannotMatchBlacklist( $policyVal, User $user, $password ) {
-               static $blockedLogins = array(
+               static $blockedLogins = [
                        'Useruser' => 'Passpass', 'Useruser1' => 'Passpass1', # r75589
                        'Apitestsysop' => 'testpass', 'Apitestuser' => 'testpass' # r75605
-               );
+               ];
 
                $status = Status::newGood();
                $username = $user->getName();
@@ -136,7 +136,7 @@ class PasswordPolicyChecks {
                        // in the common password file. Also check '' for people who use
                        // just whitespace.
                        $sitename = $langEn->lc( trim( $wgSitename ) );
-                       $hardcodedCommonPasswords = array( '', 'wiki', 'mediawiki', $sitename );
+                       $hardcodedCommonPasswords = [ '', 'wiki', 'mediawiki', $sitename ];
                        if ( in_array( $passwordKey, $hardcodedCommonPasswords ) ) {
                                $status->error( 'passwordtoopopular' );
                                return $status;