Merge "Leave table names with numbers untouched in DatabaseBase::generalizeSQL"
[lhc/web/wiklou.git] / includes / Block.php
index c393a79..aaabec9 100644 (file)
@@ -347,7 +347,7 @@ class Block {
        /**
         * Given a database row from the ipblocks table, initialize
         * member variables
-        * @param ResultWrapper $row A row from the ipblocks table
+        * @param stdClass $row A row from the ipblocks table
         */
        protected function initFromRow( $row ) {
                $this->setTarget( $row->ipb_address );
@@ -382,7 +382,7 @@ class Block {
 
        /**
         * Create a new Block object from a database row
-        * @param ResultWrapper $row Row from the ipblocks table
+        * @param stdClass $row Row from the ipblocks table
         * @return Block
         */
        public static function newFromRow( $row ) {
@@ -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 );
                } );
@@ -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