Merge "copy paste comment should probably have end instead of start"
[lhc/web/wiklou.git] / includes / Block.php
index eab1754..34b89e7 100644 (file)
@@ -249,7 +249,7 @@ class Block {
                # passed by some callers (bug 29116)
                if ( $vagueTarget != '' ) {
                        list( $target, $type ) = self::parseTarget( $vagueTarget );
-                       switch( $type ) {
+                       switch ( $type ) {
                                case self::TYPE_USER:
                                        # Slightly weird, but who are we to argue?
                                        $conds['ipb_address'][] = (string)$target;
@@ -511,7 +511,7 @@ class Block {
         * @return Array
         */
        protected function getDatabaseArray( $db = null ) {
-               if( !$db ) {
+               if ( !$db ) {
                        $db = wfGetDB( DB_SLAVE );
                }
                $expiry = $db->encodeExpiry( $this->mExpiry );
@@ -683,7 +683,7 @@ class Block {
                if ( $ipblock ) {
                        # Check if the block is an autoblock and would exceed the user block
                        # if renewed. If so, do nothing, otherwise prolong the block time...
-                       if ( $ipblock->mAuto && // @TODO: why not compare $ipblock->mExpiry?
+                       if ( $ipblock->mAuto && // @todo Why not compare $ipblock->mExpiry?
                                $this->mExpiry > Block::getAutoblockExpiry( $ipblock->mTimestamp )
                        ) {
                                # Reset block timestamp to now and its expiry to
@@ -795,7 +795,7 @@ class Block {
         * @return String IP in Hex form
         */
        public function getRangeStart() {
-               switch( $this->type ) {
+               switch ( $this->type ) {
                        case self::TYPE_USER:
                                return '';
                        case self::TYPE_IP:
@@ -809,12 +809,12 @@ class Block {
        }
 
        /**
-        * Get the IP address at the start of the range in Hex form
+        * Get the IP address at the end of the range in Hex form
         * @throws MWException
         * @return String IP in Hex form
         */
        public function getRangeEnd() {
-               switch( $this->type ) {
+               switch ( $this->type ) {
                        case self::TYPE_USER:
                                return '';
                        case self::TYPE_IP:
@@ -911,7 +911,7 @@ class Block {
         * @return Bool
         */
        public function prevents( $action, $x = null ) {
-               switch( $action ) {
+               switch ( $action ) {
                        case 'edit':
                                # For now... <evil laugh>
                                return true;
@@ -1092,7 +1092,7 @@ class Block {
         * @param Bool $isAnon Exclude anonymous-only blocks if false
         * @param Bool $fromMaster Whether to query the master or slave database
         * @return Array of Blocks
-        * @since 1.21
+        * @since 1.22
         */
        public static function getBlocksForIPList( array $ipChain, $isAnon, $fromMaster = false ) {
                if ( !count( $ipChain ) ) {
@@ -1173,7 +1173,7 @@ class Block {
         * @param Array $block Array of blocks
         * @return Block|null the "best" block from the list
         */
-       public static function chooseBlock( array $blocks, array $ipChain  ) {
+       public static function chooseBlock( array $blocks, array $ipChain ) {
                if ( !count( $blocks ) ) {
                        return null;
                } elseif ( count( $blocks ) == 1 ) {