Remove else from UserGroupMembership
authorReedy <reedy@wikimedia.org>
Fri, 18 May 2018 19:39:26 +0000 (19:39 +0000)
committerReedy <reedy@wikimedia.org>
Fri, 18 May 2018 19:52:40 +0000 (19:52 +0000)
Change-Id: I7c18df1cab69df5f124c95b1ddb241e3f1be5927

includes/user/UserGroupMembership.php

index 9da0370..89cdc5f 100644 (file)
@@ -230,9 +230,8 @@ class UserGroupMembership {
        public function isExpired() {
                if ( !$this->expiry ) {
                        return false;
        public function isExpired() {
                if ( !$this->expiry ) {
                        return false;
-               } else {
-                       return wfTimestampNow() > $this->expiry;
                }
                }
+               return wfTimestampNow() > $this->expiry;
        }
 
        /**
        }
 
        /**
@@ -354,9 +353,8 @@ class UserGroupMembership {
                $ugm = self::newFromRow( $row );
                if ( !$ugm->isExpired() ) {
                        return $ugm;
                $ugm = self::newFromRow( $row );
                if ( !$ugm->isExpired() ) {
                        return $ugm;
-               } else {
-                       return false;
                }
                }
+               return false;
        }
 
        /**
        }
 
        /**
@@ -419,9 +417,8 @@ class UserGroupMembership {
                        }
                        return $context->msg( 'group-membership-link-with-expiry' )
                                ->params( $groupLink, $expiryDT, $expiryD, $expiryT )->text();
                        }
                        return $context->msg( 'group-membership-link-with-expiry' )
                                ->params( $groupLink, $expiryDT, $expiryD, $expiryT )->text();
-               } else {
-                       return $groupLink;
                }
                }
+               return $groupLink;
        }
 
        /**
        }
 
        /**