SpecialJavaScriptTest: Use Config instead of globals
[lhc/web/wiklou.git] / includes / Block.php
index 1a585b9..45bae28 100644 (file)
@@ -967,7 +967,7 @@ class Block {
 
                $method = __METHOD__;
                $dbw = wfGetDB( DB_MASTER );
-               $dbw->onTransactionIdle( function() use ( $dbw, $method ) {
+               $dbw->onTransactionIdle( function () use ( $dbw, $method ) {
                        $dbw->delete( 'ipblocks',
                                array( 'ipb_expiry < ' . $dbw->addQuotes( $dbw->timestamp() ) ), $method );
                } );
@@ -1104,13 +1104,13 @@ class Block {
         *  - Other softblocks are chosen over autoblocks
         *  - If there are multiple exact or range blocks at the same level, the one chosen
         *    is random
-
+        *
         * @param array $ipChain List of IPs (strings). This is used to determine how "close"
         *        a block is to the server, and if a block matches exactly, or is in a range.
         *        The order is furthest from the server to nearest e.g., (Browser, proxy1, proxy2,
         *        local-squid, ...)
         * @param array $block Array of blocks
-        * @return Block|null the "best" block from the list
+        * @return Block|null The "best" block from the list
         */
        public static function chooseBlock( array $blocks, array $ipChain ) {
                if ( !count( $blocks ) ) {
@@ -1123,7 +1123,7 @@ class Block {
 
                // Sort hard blocks before soft ones and secondarily sort blocks
                // that disable account creation before those that don't.
-               usort( $blocks, function( Block $a, Block $b ) {
+               usort( $blocks, function ( Block $a, Block $b ) {
                        $aWeight = (int)$a->isHardblock() . (int)$a->prevents( 'createaccount' );
                        $bWeight = (int)$b->isHardblock() . (int)$b->prevents( 'createaccount' );
                        return strcmp( $bWeight, $aWeight ); // highest weight first